@manycore/custom-sdk 1.13.7 → 1.13.8-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +8 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- window.__customSdkVersion = '1.13.7';!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(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"],t):"object"==typeof exports?exports.CustomSdk=t(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):e.CustomSdk=t(e.servkit,e._,e.React,e.ReactDOM,e["@manycore/custom-miniapp-sdk"])}(window,(function(__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__2__,__WEBPACK_EXTERNAL_MODULE__11__,__WEBPACK_EXTERNAL_MODULE__91__,__WEBPACK_EXTERNAL_MODULE__249__){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2094)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t,r){e.exports=r(1347)},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__2__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolTranslators=t.TranslatorWithContext=t.Translator=t.CompositeCurve2dData=t.SurfaceOfLinearExtrusionData=t.PolylineCurve3dData=t.PolylineCurve2dData=t.GeneralTrimmedSurfaceData=t.RectTrimmedSurfaceData=t.TrimmedSurfaceData=t.NurbsSurfaceData=t.NurbsCurve3dData=t.SurfaceDataConverter=t.CurveDataConverter=t.DataConverter=t.SurfaceToData=t.CurveToData=t.ToroidalSurfaceData=t.SurfaceData=t.Ray3dData=t.PlaneData=t.LineSeg3dData=t.Line3dData=t.Ellipse3dData=t.EllipticalArc3dData=t.EllipticalArc2dData=t.Ellipse2dData=t.RevolveSurfaceData=t.CylindricalSurfaceData=t.Curve3dData=t.ConicalSurfaceData=t.CompositeCurve3dData=t.Circle3dData=t.BoundedCurve3dData=t.Arc3dData=t.GeomLoop2dData=t.GeomFace2dData=t.Ray2dData=t.LineSeg2dData=t.Line2dData=t.Curve3dOnSurfacesData=t.CurveOnSurfaceData=t.Curve2dData=t.Circle2dData=t.BoundedCurve2dData=t.BezierCurve2dData=t.Arc2dData=t.Vector3dData=t.Vector2dData=t.Point3dData=t.Point2dData=t.MVector3dData=t.MVector2dData=t.MPoint3dData=t.MPoint2dData=t.IntervalData=t.CCS3dData=t.CCS2dData=t.TriangledMeshData=t.Transform3dData=t.Transform2dData=t.QuaternionData=t.EulerData=t.Matrix4Data=t.Matrix3Data=t.BezierCurve3dData=t.BBox3dData=t.BBox2dData=t.triangulateOnNurbs=t.triangulateOnDevelopable=t.triangulateOnRevSurface=t.Triangulate=t.simplifyPolygons=t.clipping=t.addRect=t.simplifyPolygonsByHorizontal=t.TriangulatePolygon=t.TriangulateRevSurface=void 0,t.TriangulateNurbs=t.TriangulateDevelopable=t.TriangulatePlane=t.SurfaceUVUtils=t.LoopCentroid=t.ClipperOffset=t.Path3dOffset=t.Path2dOffset=t.PathRectify=t.LineArcDistance=t.CurveDistance=t.FacesBoolean=t.DetectLoop=t.LoopSimplify=t.LoopNormal=t.LoopInLoop=t.LoopCCW=t.LoopArea=t.Curve2dOverlap=t.CurveOverlap=t.LoopUtils=t.PtInLoop=t.SurfaceIntersect=t.CurveSurfaceIntersect=t.Curve2dIntersect=t.CurveIntersect=t.SurfaceOfLinearExtrusion=t.ToroidalSurface=t.GeneralTrimmedSurface=t.RevolveSurface=t.RectTrimmedSurface=t.TrimmedSurface=t.BoundedSurface=t.NurbsSurface=t.ConicalSurface=t.CylindricalSurface=t.Plane=t.ElementarySurface=t.Surface=t.EllipticalArc3d=t.Arc3d=t.Curve3dOnSurfaces=t.CurveOnSurface=t.Ellipse3d=t.Circle3d=t.ConicCurve3d=t.NurbsCurve3d=t.PolylineCurve3d=t.LineSeg3d=t.Ray3d=t.Line3d=t.CompositeCurve3d=t.CompositeCurve2d=t.BoundedCurve3d=t.BezierCurve3d=t.Curve3d=t.GeomLoop2d=t.GeomFace2d=t.EllipticalArc2d=t.Ellipse2d=t.BezierCurve2d=t.Arc2d=t.Circle2d=t.Ray2d=t.PolylineCurve2d=t.NurbsCurve2d=t.LineSeg2d=t.Line2d=t.BoundedCurve2d=t.Curve2d=t.RectMeshNode=t.SurfacePoint=t.TriangledMesh=t.Transform3d=t.Transform2d=t.CCS3d=t.CCS2d=t.BBox3d=t.BBox2d=t.UV=t.Matrix4=t.Matrix3=t.Quaternion=t.Interval=t.EulerOrder=t.Euler=t.MVector3d=t.MVector2d=t.Vector3d=t.Vector2d=t.MPoint3d=t.MPoint2d=t.Point3d=t.Point2d=t.Num=t.rpSolve=t.legendreGaussIntegration=t.Tolerance=t.Axis3d=t.Axis2d=void 0;var n=r(1348),i=mr(n),o=r(562),A=mr(o),a=r(87),s=mr(a),u=r(150),c=mr(u),l=r(118),g=r(70),f=r(369),h=r(41),p=mr(h),d=r(370),I=r(109),y=mr(I),C=r(167),E=mr(C),B=r(444),v=mr(B),m=r(773),Q=mr(m),b=mr(r(563)),_=mr(r(774)),S=mr(r(19)),w=mr(r(33)),D=mr(r(56)),R=r(295),M=r(371),x=vr(r(13)),P=mr(r(564)),T=mr(r(775)),F=r(194),O=r(76),L=mr(r(40)),k=mr(r(43)),N=r(776),G=r(777),U=r(445),j=r(296),V=r(778),Y=r(446),H=r(565),K=r(566),q=r(1351),J=r(1352),W=r(1353),z=r(1354),X=r(130),Z=r(151),$=r(779),ee=r(1355),te=r(1356),re=r(1357),ne=r(372),ie=r(297),oe=vr(r(298)),Ae=vr(r(316)),ae=vr(r(787)),se=vr(r(1371)),ue=vr(r(1373)),ce=r(303),le=r(378),ge=r(170),fe=r(305),he=r(789),pe=r(304),de=r(379),Ie=r(380),ye=r(790),Ce=r(580),Ee=r(381),Be=r(306),ve=r(307),me=r(382),Qe=r(308),be=r(310),_e=r(154),Se=r(309),we=r(793),De=r(387),Re=r(386),Me=r(383),xe=r(453),Pe=r(389),Te=r(384),Fe=r(311),Oe=r(454),Le=r(312),ke=r(313),Ne=r(314),Ge=r(390),Ue=r(391),je=r(315),Ve=r(385),Ye=r(456),He=r(392),Ke=r(263),qe=r(393),Je=r(395),We=r(578),ze=r(94),Xe=r(196),Ze=r(195),$e=r(119),et=r(172),tt=r(300),rt=r(95),nt=r(110),it=r(579),ot=r(581),At=r(57),at=r(45),st=r(105),ut=r(121),ct=r(261),lt=r(61),gt=r(131),ft=r(120),ht=r(388),pt=r(77),dt=r(458),It=r(567),yt=r(171),Ct=r(262),Et=r(373),Bt=r(198),vt=r(132),mt=r(376),Qt=r(168),bt=r(169),_t=r(455),St=r(58),wt=r(62),Dt=r(106),Rt=r(317),Mt=r(49),xt=r(197),Pt=r(152),Tt=r(457),Ft=r(318),Ot=r(572),Lt=r(394),kt=r(199),Nt=r(576),Gt=r(1375),Ut=r(26),jt=r(1385),Vt=vr(r(821)),Yt=vr(r(1389)),Ht=vr(r(822)),Kt=vr(r(299)),qt=vr(r(1390)),Jt=vr(r(88)),Wt=vr(r(1393)),zt=vr(r(461)),Xt=vr(r(302)),Zt=vr(r(153)),$t=vr(r(791)),er=vr(r(792)),tr=vr(r(375)),rr=vr(r(1395)),nr=vr(r(219)),ir=vr(r(1396)),or=vr(r(1397)),Ar=vr(r(826)),ar=vr(r(1404)),sr=vr(r(577)),ur=vr(r(320)),cr=vr(r(462)),lr=vr(r(218)),gr=r(1405),fr=vr(gr),hr=r(1406),pr=vr(hr),dr=vr(r(1407)),Ir=vr(r(1409)),yr=r(1410),Cr=vr(yr),Er=r(377),Br=r(396);function vr(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function mr(e){return e&&e.__esModule?e:{default:e}}var Qr=Object.assign({},Ae,ae),br=Object.assign({},Qr,se);t.Axis2d=i.default,t.Axis3d=A.default,t.Tolerance=x,t.legendreGaussIntegration=d.legendreGaussIntegration,t.rpSolve=M.rpSolve,t.Num=S.default,t.Point2d=w.default,t.Point3d=D.default,t.MPoint2d=v.default,t.MPoint3d=Q.default,t.Vector2d=L.default,t.Vector3d=k.default,t.MVector2d=b.default,t.MVector3d=_.default,t.Euler=f.Euler,t.EulerOrder=f.EulerOrder,t.Interval=p.default,t.Quaternion=R.Quaternion,t.Matrix3=y.default,t.Matrix4=E.default,t.UV=O.UV,t.BBox2d=s.default,t.BBox3d=c.default,t.CCS2d=l.CCS2d,t.CCS3d=g.CCS3d,t.Transform2d=P.default,t.Transform3d=T.default,t.TriangledMesh=F.TriangledMesh,t.SurfacePoint=Er.SurfacePoint,t.RectMeshNode=Er.RectMeshNode,t.Curve2d=tt.Curve2d,t.BoundedCurve2d=Ze.BoundedCurve2d,t.Line2d=At.Line2d,t.LineSeg2d=at.LineSeg2d,t.NurbsCurve2d=st.NurbsCurve2d,t.PolylineCurve2d=ut.PolylineCurve2d,t.Ray2d=ct.Ray2d,t.Circle2d=$e.Circle2d,t.Arc2d=ze.Arc2d,t.BezierCurve2d=Xe.BezierCurve2d,t.Ellipse2d=rt.Ellipse2d,t.EllipticalArc2d=nt.EllipticalArc2d,t.GeomFace2d=it.GeomFace2d,t.GeomLoop2d=ot.GeomLoop2d,t.Curve3d=Et.Curve3d,t.BezierCurve3d=gt.BezierCurve3d,t.BoundedCurve3d=ft.BoundedCurve3d,t.CompositeCurve2d=et.CompositeCurve2d,t.CompositeCurve3d=dt.CompositeCurve3d,t.Line3d=St.Line3d,t.Ray3d=Pt.Ray3d,t.LineSeg3d=wt.LineSeg3d,t.PolylineCurve3d=xt.PolylineCurve3d,t.NurbsCurve3d=Dt.NurbsCurve3d,t.ConicCurve3d=It.ConicCurve3d,t.Circle3d=pt.Circle3d,t.Ellipse3d=Qt.Ellipse3d,t.CurveOnSurface=Ct.CurveOnSurface,t.Curve3dOnSurfaces=Bt.Curve3dOnSurfaces,t.Arc3d=lt.Arc3d,t.EllipticalArc3d=bt.EllipticalArc3d,t.Surface=Ot.Surface,t.ElementarySurface=mt.ElementarySurface,t.Plane=Mt.Plane,t.CylindricalSurface=vt.CylindricalSurface,t.ConicalSurface=yt.ConicalSurface,t.NurbsSurface=Rt.NurbsSurface,t.BoundedSurface=ht.BoundedSurface,t.TrimmedSurface=Nt.TrimmedSurface,t.RectTrimmedSurface=Tt.RectTrimmedSurface,t.RevolveSurface=Ft.RevolveSurface,t.GeneralTrimmedSurface=_t.GeneralTrimmedSurface,t.ToroidalSurface=kt.ToroidalSurface,t.SurfaceOfLinearExtrusion=Lt.SurfaceOfLinearExtrusion,t.CurveIntersect=Kt,t.Curve2dIntersect=Jt,t.CurveSurfaceIntersect=qt,t.SurfaceIntersect=Wt,t.PtInLoop=nr,t.LoopUtils=ir,t.CurveOverlap=sr,t.Curve2dOverlap=ur,t.LoopArea=Xt,t.LoopCCW=Zt,t.LoopInLoop=er,t.LoopNormal=tr,t.LoopSimplify=rr,t.DetectLoop=zt,t.FacesBoolean=Vt,t.CurveDistance=Yt,t.LineArcDistance=Ht,t.PathRectify=cr,t.Path2dOffset=Ar,t.Path3dOffset=ar,t.ClipperOffset=or,t.LoopCentroid=$t,t.SurfaceUVUtils=lr,t.TriangulatePlane=dr,t.TriangulateDevelopable=fr,t.TriangulateNurbs=pr,t.TriangulateRevSurface=Cr,t.TriangulatePolygon=Ir,t.simplifyPolygonsByHorizontal=Br.simplifyPolygonsByHorizontal,t.addRect=Br.addRect,t.clipping=Br.clipping,t.simplifyPolygons=Br.simplifyPolygons,t.Triangulate=Ir,t.triangulateOnRevSurface=yr.triangulateOnRevSurface,t.triangulateOnDevelopable=gr.triangulateOnDevelopable,t.triangulateOnNurbs=hr.triangulateOnNurbs,t.BBox2dData=N.BBox2dData,t.BBox3dData=G.BBox3dData,t.BezierCurve3dData=be.BezierCurve3dData,t.Matrix3Data=H.Matrix3Data,t.Matrix4Data=K.Matrix4Data,t.EulerData=V.EulerData,t.QuaternionData=$.QuaternionData,t.Transform2dData=ee.Transform2dData,t.Transform3dData=te.Transform3dData,t.TriangledMeshData=re.TriangledMeshData,t.CCS2dData=U.CCS2dData,t.CCS3dData=j.CCS3dData,t.IntervalData=Y.IntervalData,t.MPoint2dData=q.MPoint2dData,t.MPoint3dData=J.MPoint3dData,t.MVector2dData=W.MVector2dData,t.MVector3dData=z.MVector3dData,t.Point2dData=X.Point2dData,t.Point3dData=Z.Point3dData,t.Vector2dData=ne.Vector2dData,t.Vector3dData=ie.Vector3dData,t.Arc2dData=ce.Arc2dData,t.BezierCurve2dData=le.BezierCurve2dData,t.BoundedCurve2dData=ge.BoundedCurve2dData,t.Circle2dData=fe.Circle2dData,t.Curve2dData=pe.Curve2dData,t.CurveOnSurfaceData=Re.CurveOnSurfaceData,t.Curve3dOnSurfacesData=xe.Curve3dOnSurfacesData,t.Line2dData=Ee.Line2dData,t.LineSeg2dData=Be.LineSeg2dData,t.Ray2dData=me.Ray2dData,t.GeomFace2dData=ye.GeomFace2dData,t.GeomLoop2dData=Ce.GeomLoop2dData,t.Arc3dData=Qe.Arc3dData,t.BoundedCurve3dData=_e.BoundedCurve3dData,t.Circle3dData=Se.Circle3dData,t.CompositeCurve3dData=we.CompositeCurve3dData,t.ConicalSurfaceData=De.ConicalSurfaceData,t.Curve3dData=Me.Curve3dData,t.CylindricalSurfaceData=Pe.CylindricalSurfaceData,t.RevolveSurfaceData=He.RevolveSurfaceData,t.Ellipse2dData=de.Ellipse2dData,t.EllipticalArc2dData=Ie.EllipticalArc2dData,t.EllipticalArc3dData=Fe.EllipticalArc3dData,t.Ellipse3dData=Te.Ellipse3dData,t.Line3dData=Le.Line3dData,t.LineSeg3dData=ke.LineSeg3dData,t.PlaneData=Ue.PlaneData,t.Ray3dData=Ve.Ray3dData,t.SurfaceData=Ke.SurfaceData,t.ToroidalSurfaceData=Je.ToroidalSurfaceData,t.CurveToData=oe,t.SurfaceToData=ue,t.DataConverter=br,t.CurveDataConverter=Qr,t.SurfaceDataConverter=se,t.NurbsCurve3dData=Ne.NurbsCurve3dData,t.NurbsSurfaceData=Ge.NurbsSurfaceData,t.TrimmedSurfaceData=We.TrimmedSurfaceData,t.RectTrimmedSurfaceData=Ye.RectTrimmedSurfaceData,t.GeneralTrimmedSurfaceData=Oe.GeneralTrimmedSurfaceData,t.PolylineCurve2dData=ve.PolylineCurve2dData,t.PolylineCurve3dData=je.PolylineCurve3dData,t.SurfaceOfLinearExtrusionData=qe.SurfaceOfLinearExtrusionData,t.CompositeCurve2dData=he.CompositeCurve2dData,t.Translator=Ut.Translator,t.TranslatorWithContext=jt.TranslatorWithContext,t.ProtocolTranslators=Gt.ProtocolTranslators},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
1
+ window.__customSdkVersion = '1.13.8-beta.1';!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(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"],t):"object"==typeof exports?exports.CustomSdk=t(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):e.CustomSdk=t(e.servkit,e._,e.React,e.ReactDOM,e["@manycore/custom-miniapp-sdk"])}(window,(function(__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__2__,__WEBPACK_EXTERNAL_MODULE__11__,__WEBPACK_EXTERNAL_MODULE__91__,__WEBPACK_EXTERNAL_MODULE__249__){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2094)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t,r){e.exports=r(1347)},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__2__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolTranslators=t.TranslatorWithContext=t.Translator=t.CompositeCurve2dData=t.SurfaceOfLinearExtrusionData=t.PolylineCurve3dData=t.PolylineCurve2dData=t.GeneralTrimmedSurfaceData=t.RectTrimmedSurfaceData=t.TrimmedSurfaceData=t.NurbsSurfaceData=t.NurbsCurve3dData=t.SurfaceDataConverter=t.CurveDataConverter=t.DataConverter=t.SurfaceToData=t.CurveToData=t.ToroidalSurfaceData=t.SurfaceData=t.Ray3dData=t.PlaneData=t.LineSeg3dData=t.Line3dData=t.Ellipse3dData=t.EllipticalArc3dData=t.EllipticalArc2dData=t.Ellipse2dData=t.RevolveSurfaceData=t.CylindricalSurfaceData=t.Curve3dData=t.ConicalSurfaceData=t.CompositeCurve3dData=t.Circle3dData=t.BoundedCurve3dData=t.Arc3dData=t.GeomLoop2dData=t.GeomFace2dData=t.Ray2dData=t.LineSeg2dData=t.Line2dData=t.Curve3dOnSurfacesData=t.CurveOnSurfaceData=t.Curve2dData=t.Circle2dData=t.BoundedCurve2dData=t.BezierCurve2dData=t.Arc2dData=t.Vector3dData=t.Vector2dData=t.Point3dData=t.Point2dData=t.MVector3dData=t.MVector2dData=t.MPoint3dData=t.MPoint2dData=t.IntervalData=t.CCS3dData=t.CCS2dData=t.TriangledMeshData=t.Transform3dData=t.Transform2dData=t.QuaternionData=t.EulerData=t.Matrix4Data=t.Matrix3Data=t.BezierCurve3dData=t.BBox3dData=t.BBox2dData=t.triangulateOnNurbs=t.triangulateOnDevelopable=t.triangulateOnRevSurface=t.Triangulate=t.simplifyPolygons=t.clipping=t.addRect=t.simplifyPolygonsByHorizontal=t.TriangulatePolygon=t.TriangulateRevSurface=void 0,t.TriangulateNurbs=t.TriangulateDevelopable=t.TriangulatePlane=t.SurfaceUVUtils=t.LoopCentroid=t.ClipperOffset=t.Path3dOffset=t.Path2dOffset=t.PathRectify=t.LineArcDistance=t.CurveDistance=t.FacesBoolean=t.DetectLoop=t.LoopSimplify=t.LoopNormal=t.LoopInLoop=t.LoopCCW=t.LoopArea=t.Curve2dOverlap=t.CurveOverlap=t.LoopUtils=t.PtInLoop=t.SurfaceIntersect=t.CurveSurfaceIntersect=t.Curve2dIntersect=t.CurveIntersect=t.SurfaceOfLinearExtrusion=t.ToroidalSurface=t.GeneralTrimmedSurface=t.RevolveSurface=t.RectTrimmedSurface=t.TrimmedSurface=t.BoundedSurface=t.NurbsSurface=t.ConicalSurface=t.CylindricalSurface=t.Plane=t.ElementarySurface=t.Surface=t.EllipticalArc3d=t.Arc3d=t.Curve3dOnSurfaces=t.CurveOnSurface=t.Ellipse3d=t.Circle3d=t.ConicCurve3d=t.NurbsCurve3d=t.PolylineCurve3d=t.LineSeg3d=t.Ray3d=t.Line3d=t.CompositeCurve3d=t.CompositeCurve2d=t.BoundedCurve3d=t.BezierCurve3d=t.Curve3d=t.GeomLoop2d=t.GeomFace2d=t.EllipticalArc2d=t.Ellipse2d=t.BezierCurve2d=t.Arc2d=t.Circle2d=t.Ray2d=t.PolylineCurve2d=t.NurbsCurve2d=t.LineSeg2d=t.Line2d=t.BoundedCurve2d=t.Curve2d=t.RectMeshNode=t.SurfacePoint=t.TriangledMesh=t.Transform3d=t.Transform2d=t.CCS3d=t.CCS2d=t.BBox3d=t.BBox2d=t.UV=t.Matrix4=t.Matrix3=t.Quaternion=t.Interval=t.EulerOrder=t.Euler=t.MVector3d=t.MVector2d=t.Vector3d=t.Vector2d=t.MPoint3d=t.MPoint2d=t.Point3d=t.Point2d=t.Num=t.rpSolve=t.legendreGaussIntegration=t.Tolerance=t.Axis3d=t.Axis2d=void 0;var n=r(1348),i=mr(n),o=r(562),A=mr(o),a=r(87),s=mr(a),u=r(150),c=mr(u),l=r(118),g=r(70),f=r(369),h=r(41),p=mr(h),d=r(370),I=r(109),y=mr(I),C=r(167),E=mr(C),B=r(444),v=mr(B),m=r(773),Q=mr(m),b=mr(r(563)),_=mr(r(774)),S=mr(r(19)),w=mr(r(33)),D=mr(r(56)),R=r(295),M=r(371),x=vr(r(13)),P=mr(r(564)),T=mr(r(775)),F=r(194),O=r(76),L=mr(r(40)),k=mr(r(43)),N=r(776),G=r(777),U=r(445),j=r(296),V=r(778),Y=r(446),H=r(565),K=r(566),q=r(1351),J=r(1352),W=r(1353),z=r(1354),X=r(130),Z=r(151),$=r(779),ee=r(1355),te=r(1356),re=r(1357),ne=r(372),ie=r(297),oe=vr(r(298)),Ae=vr(r(316)),ae=vr(r(787)),se=vr(r(1371)),ue=vr(r(1373)),ce=r(303),le=r(378),ge=r(170),fe=r(305),he=r(789),pe=r(304),de=r(379),Ie=r(380),ye=r(790),Ce=r(580),Ee=r(381),Be=r(306),ve=r(307),me=r(382),Qe=r(308),be=r(310),_e=r(154),Se=r(309),we=r(793),De=r(387),Re=r(386),Me=r(383),xe=r(453),Pe=r(389),Te=r(384),Fe=r(311),Oe=r(454),Le=r(312),ke=r(313),Ne=r(314),Ge=r(390),Ue=r(391),je=r(315),Ve=r(385),Ye=r(456),He=r(392),Ke=r(263),qe=r(393),Je=r(395),We=r(578),ze=r(94),Xe=r(196),Ze=r(195),$e=r(119),et=r(172),tt=r(300),rt=r(95),nt=r(110),it=r(579),ot=r(581),At=r(57),at=r(45),st=r(105),ut=r(121),ct=r(261),lt=r(61),gt=r(131),ft=r(120),ht=r(388),pt=r(77),dt=r(458),It=r(567),yt=r(171),Ct=r(262),Et=r(373),Bt=r(198),vt=r(132),mt=r(376),Qt=r(168),bt=r(169),_t=r(455),St=r(58),wt=r(62),Dt=r(106),Rt=r(317),Mt=r(49),xt=r(197),Pt=r(152),Tt=r(457),Ft=r(318),Ot=r(572),Lt=r(394),kt=r(199),Nt=r(576),Gt=r(1375),Ut=r(26),jt=r(1385),Vt=vr(r(821)),Yt=vr(r(1389)),Ht=vr(r(822)),Kt=vr(r(299)),qt=vr(r(1390)),Jt=vr(r(88)),Wt=vr(r(1393)),zt=vr(r(461)),Xt=vr(r(302)),Zt=vr(r(153)),$t=vr(r(791)),er=vr(r(792)),tr=vr(r(375)),rr=vr(r(1395)),nr=vr(r(219)),ir=vr(r(1396)),or=vr(r(1397)),Ar=vr(r(826)),ar=vr(r(1404)),sr=vr(r(577)),ur=vr(r(320)),cr=vr(r(462)),lr=vr(r(218)),gr=r(1405),fr=vr(gr),hr=r(1406),pr=vr(hr),dr=vr(r(1407)),Ir=vr(r(1409)),yr=r(1410),Cr=vr(yr),Er=r(377),Br=r(396);function vr(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function mr(e){return e&&e.__esModule?e:{default:e}}var Qr=Object.assign({},Ae,ae),br=Object.assign({},Qr,se);t.Axis2d=i.default,t.Axis3d=A.default,t.Tolerance=x,t.legendreGaussIntegration=d.legendreGaussIntegration,t.rpSolve=M.rpSolve,t.Num=S.default,t.Point2d=w.default,t.Point3d=D.default,t.MPoint2d=v.default,t.MPoint3d=Q.default,t.Vector2d=L.default,t.Vector3d=k.default,t.MVector2d=b.default,t.MVector3d=_.default,t.Euler=f.Euler,t.EulerOrder=f.EulerOrder,t.Interval=p.default,t.Quaternion=R.Quaternion,t.Matrix3=y.default,t.Matrix4=E.default,t.UV=O.UV,t.BBox2d=s.default,t.BBox3d=c.default,t.CCS2d=l.CCS2d,t.CCS3d=g.CCS3d,t.Transform2d=P.default,t.Transform3d=T.default,t.TriangledMesh=F.TriangledMesh,t.SurfacePoint=Er.SurfacePoint,t.RectMeshNode=Er.RectMeshNode,t.Curve2d=tt.Curve2d,t.BoundedCurve2d=Ze.BoundedCurve2d,t.Line2d=At.Line2d,t.LineSeg2d=at.LineSeg2d,t.NurbsCurve2d=st.NurbsCurve2d,t.PolylineCurve2d=ut.PolylineCurve2d,t.Ray2d=ct.Ray2d,t.Circle2d=$e.Circle2d,t.Arc2d=ze.Arc2d,t.BezierCurve2d=Xe.BezierCurve2d,t.Ellipse2d=rt.Ellipse2d,t.EllipticalArc2d=nt.EllipticalArc2d,t.GeomFace2d=it.GeomFace2d,t.GeomLoop2d=ot.GeomLoop2d,t.Curve3d=Et.Curve3d,t.BezierCurve3d=gt.BezierCurve3d,t.BoundedCurve3d=ft.BoundedCurve3d,t.CompositeCurve2d=et.CompositeCurve2d,t.CompositeCurve3d=dt.CompositeCurve3d,t.Line3d=St.Line3d,t.Ray3d=Pt.Ray3d,t.LineSeg3d=wt.LineSeg3d,t.PolylineCurve3d=xt.PolylineCurve3d,t.NurbsCurve3d=Dt.NurbsCurve3d,t.ConicCurve3d=It.ConicCurve3d,t.Circle3d=pt.Circle3d,t.Ellipse3d=Qt.Ellipse3d,t.CurveOnSurface=Ct.CurveOnSurface,t.Curve3dOnSurfaces=Bt.Curve3dOnSurfaces,t.Arc3d=lt.Arc3d,t.EllipticalArc3d=bt.EllipticalArc3d,t.Surface=Ot.Surface,t.ElementarySurface=mt.ElementarySurface,t.Plane=Mt.Plane,t.CylindricalSurface=vt.CylindricalSurface,t.ConicalSurface=yt.ConicalSurface,t.NurbsSurface=Rt.NurbsSurface,t.BoundedSurface=ht.BoundedSurface,t.TrimmedSurface=Nt.TrimmedSurface,t.RectTrimmedSurface=Tt.RectTrimmedSurface,t.RevolveSurface=Ft.RevolveSurface,t.GeneralTrimmedSurface=_t.GeneralTrimmedSurface,t.ToroidalSurface=kt.ToroidalSurface,t.SurfaceOfLinearExtrusion=Lt.SurfaceOfLinearExtrusion,t.CurveIntersect=Kt,t.Curve2dIntersect=Jt,t.CurveSurfaceIntersect=qt,t.SurfaceIntersect=Wt,t.PtInLoop=nr,t.LoopUtils=ir,t.CurveOverlap=sr,t.Curve2dOverlap=ur,t.LoopArea=Xt,t.LoopCCW=Zt,t.LoopInLoop=er,t.LoopNormal=tr,t.LoopSimplify=rr,t.DetectLoop=zt,t.FacesBoolean=Vt,t.CurveDistance=Yt,t.LineArcDistance=Ht,t.PathRectify=cr,t.Path2dOffset=Ar,t.Path3dOffset=ar,t.ClipperOffset=or,t.LoopCentroid=$t,t.SurfaceUVUtils=lr,t.TriangulatePlane=dr,t.TriangulateDevelopable=fr,t.TriangulateNurbs=pr,t.TriangulateRevSurface=Cr,t.TriangulatePolygon=Ir,t.simplifyPolygonsByHorizontal=Br.simplifyPolygonsByHorizontal,t.addRect=Br.addRect,t.clipping=Br.clipping,t.simplifyPolygons=Br.simplifyPolygons,t.Triangulate=Ir,t.triangulateOnRevSurface=yr.triangulateOnRevSurface,t.triangulateOnDevelopable=gr.triangulateOnDevelopable,t.triangulateOnNurbs=hr.triangulateOnNurbs,t.BBox2dData=N.BBox2dData,t.BBox3dData=G.BBox3dData,t.BezierCurve3dData=be.BezierCurve3dData,t.Matrix3Data=H.Matrix3Data,t.Matrix4Data=K.Matrix4Data,t.EulerData=V.EulerData,t.QuaternionData=$.QuaternionData,t.Transform2dData=ee.Transform2dData,t.Transform3dData=te.Transform3dData,t.TriangledMeshData=re.TriangledMeshData,t.CCS2dData=U.CCS2dData,t.CCS3dData=j.CCS3dData,t.IntervalData=Y.IntervalData,t.MPoint2dData=q.MPoint2dData,t.MPoint3dData=J.MPoint3dData,t.MVector2dData=W.MVector2dData,t.MVector3dData=z.MVector3dData,t.Point2dData=X.Point2dData,t.Point3dData=Z.Point3dData,t.Vector2dData=ne.Vector2dData,t.Vector3dData=ie.Vector3dData,t.Arc2dData=ce.Arc2dData,t.BezierCurve2dData=le.BezierCurve2dData,t.BoundedCurve2dData=ge.BoundedCurve2dData,t.Circle2dData=fe.Circle2dData,t.Curve2dData=pe.Curve2dData,t.CurveOnSurfaceData=Re.CurveOnSurfaceData,t.Curve3dOnSurfacesData=xe.Curve3dOnSurfacesData,t.Line2dData=Ee.Line2dData,t.LineSeg2dData=Be.LineSeg2dData,t.Ray2dData=me.Ray2dData,t.GeomFace2dData=ye.GeomFace2dData,t.GeomLoop2dData=Ce.GeomLoop2dData,t.Arc3dData=Qe.Arc3dData,t.BoundedCurve3dData=_e.BoundedCurve3dData,t.Circle3dData=Se.Circle3dData,t.CompositeCurve3dData=we.CompositeCurve3dData,t.ConicalSurfaceData=De.ConicalSurfaceData,t.Curve3dData=Me.Curve3dData,t.CylindricalSurfaceData=Pe.CylindricalSurfaceData,t.RevolveSurfaceData=He.RevolveSurfaceData,t.Ellipse2dData=de.Ellipse2dData,t.EllipticalArc2dData=Ie.EllipticalArc2dData,t.EllipticalArc3dData=Fe.EllipticalArc3dData,t.Ellipse3dData=Te.Ellipse3dData,t.Line3dData=Le.Line3dData,t.LineSeg3dData=ke.LineSeg3dData,t.PlaneData=Ue.PlaneData,t.Ray3dData=Ve.Ray3dData,t.SurfaceData=Ke.SurfaceData,t.ToroidalSurfaceData=Je.ToroidalSurfaceData,t.CurveToData=oe,t.SurfaceToData=ue,t.DataConverter=br,t.CurveDataConverter=Qr,t.SurfaceDataConverter=se,t.NurbsCurve3dData=Ne.NurbsCurve3dData,t.NurbsSurfaceData=Ge.NurbsSurfaceData,t.TrimmedSurfaceData=We.TrimmedSurfaceData,t.RectTrimmedSurfaceData=Ye.RectTrimmedSurfaceData,t.GeneralTrimmedSurfaceData=Oe.GeneralTrimmedSurfaceData,t.PolylineCurve2dData=ve.PolylineCurve2dData,t.PolylineCurve3dData=je.PolylineCurve3dData,t.SurfaceOfLinearExtrusionData=qe.SurfaceOfLinearExtrusionData,t.CompositeCurve2dData=he.CompositeCurve2dData,t.Translator=Ut.Translator,t.TranslatorWithContext=jt.TranslatorWithContext,t.ProtocolTranslators=Gt.ProtocolTranslators},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -63,7 +63,7 @@ e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.
63
63
  Version 1.9.0
64
64
  https://localforage.github.io/localForage
65
65
  (c) 2013-2017 Mozilla, Apache License 2.0
66
- */A=function(){return function e(t,r,n){function i(A,a){if(!r[A]){if(!t[A]){if(o)return o(A,!0);var s=new Error("Cannot find module '"+A+"'");throw s.code="MODULE_NOT_FOUND",s}var u=r[A]={exports:{}};t[A][0].call(u.exports,(function(e){var r=t[A][1][e];return i(r||e)}),u,u.exports,e,t,r,n)}return r[A].exports}for(var o=!1,A=0;A<n.length;A++)i(n[A]);return i}({1:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,A=new i(c),a=e.document.createTextNode("");A.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var s=new e.MessageChannel;s.port1.onmessage=c,r=function(){s.port2.postMessage(0)}}var u=[];function c(){var e,t;n=!0;for(var r=u.length;r;){for(t=u,u=[],e=-1;++e<r;)t[e]();r=u.length}n=!1}t.exports=function(e){1!==u.push(e)||n||r()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var n=e(1);function i(){}var o={},A=["REJECTED"],s=["FULFILLED"],u=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function g(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return o.reject(e,t)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function f(e){var t=e&&e.then;if(e&&("object"===a(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var A=p((function(){t(i,n)}));"error"===A.status&&n(A.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===A)return this;var r=new this.constructor(i);return this.state!==u?g(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){g(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){o.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){g(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=s,e.outcome=t;for(var i=-1,A=e.queue.length;++i<A;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=A,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A=new Array(r),a=0,s=-1,u=new this(i);++s<r;)c(e[s],s);return u;function c(e,i){t.resolve(e).then((function(e){A[i]=e,++a!==r||n||(n=!0,o.resolve(u,A))}),(function(e){n||(n=!0,o.reject(u,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A,a=-1,s=new this(i);++a<r;)A=e[a],t.resolve(A).then((function(e){n||(n=!0,o.resolve(s,e))}),(function(e){n||(n=!0,o.reject(s,e))}));return s}},{1:1}],3:[function(e,t,n){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},i=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var A=Promise;function s(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function l(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var g=void 0,f={},h=Object.prototype.toString;function p(e){return"boolean"==typeof g?A.resolve(g):function(e){return new A((function(t){var r=e.transaction("local-forage-detect-blob-support","readwrite"),n=o([""]);r.objectStore("local-forage-detect-blob-support").put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return g=e}))}function d(e){var t=f[e.name],r={};r.promise=new A((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function I(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function y(e,t){var r=f[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function C(e,t){return new A((function(r,n){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);d(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var A=i.open.apply(i,o);t&&(A.onupgradeneeded=function(t){var r=A.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore("local-forage-detect-blob-support")}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),A.onerror=function(e){e.preventDefault(),n(A.error)},A.onsuccess=function(){r(A.result),I(e)}}))}function E(e){return C(e,!1)}function B(e){return C(e,!0)}function v(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,i=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||r){if(r){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function m(e){return o([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}(atob(e.data))],{type:e.type})}function Q(e){return e&&e.__local_forage_encoded_blob}function b(e){var t=this,r=t._initReady().then((function(){var e=f[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(r,e,e),r}function _(e,t,r,n){void 0===n&&(n=1);try{var i=e.db.transaction(e.storeName,t);r(null,i)}catch(i){if(n>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return A.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),B(e)})).then((function(){return function(e){d(e);for(var t=f[e.name],r=t.forages,n=0;n<r.length;n++){var i=r[n];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,E(e).then((function(t){return e.db=t,v(e)?B(e):t})).then((function(n){e.db=t.db=n;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=n})).catch((function(t){throw y(e,t),t}))}(e).then((function(){_(e,t,r,n-1)}))})).catch(r);r(i)}}var S={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var i=f[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},f[r.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=b);var o=[];function a(){return A.resolve()}for(var s=0;s<i.forages.length;s++){var u=i.forages[s];u!==t&&o.push(u._initReady().catch(a))}var c=i.forages.slice(0);return A.all(o).then((function(){return r.db=i.db,E(r)})).then((function(e){return r.db=e,v(r,t._defaultConfig.version)?B(r):e})).then((function(e){r.db=i.db=e,t._dbInfo=r;for(var n=0;n<c.length;n++){var o=c[n];o!==t&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))},_support:function(){try{if(!i||!i.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).openCursor(),a=1;A.onsuccess=function(){var r=A.result;if(r){var n=r.value;Q(n)&&(n=m(n));var i=e(n,r.key,a++);void 0!==i?t(i):r.continue()}else t()},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).get(e);A.onsuccess=function(){var e=A.result;void 0===e&&(e=null),Q(e)&&(e=m(e)),t(e)},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=new A((function(r,i){var o;n.ready().then((function(){return o=n._dbInfo,"[object Blob]"===h.call(t)?p(o.db).then((function(e){return e?t:(r=t,new A((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:r.type})},n.readAsBinaryString(r)})));var r})):t})).then((function(t){_(n._dbInfo,"readwrite",(function(o,A){if(o)return i(o);try{var a=A.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var s=a.put(t,e);A.oncomplete=function(){void 0===t&&(t=null),r(t)},A.onabort=A.onerror=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readwrite",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){n(A.error)},o.onabort=function(){var e=A.error?A.error:A.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readwrite",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){e<0?t(null):r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName),a=!1,s=A.openKeyCursor();s.onsuccess=function(){var r=s.result;r?0===e||a?t(r.key):(a=!0,r.advance(e)):t(null)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),A=[];o.onsuccess=function(){var t=o.result;t?(A.push(t.key),t.continue()):e(A)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,o=this;if(e.name){var a=e.name===r.name&&o._dbInfo.db,u=a?A.resolve(o._dbInfo.db):E(e).then((function(t){var r=f[e.name],n=r.forages;r.db=t;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=t;return t}));n=e.storeName?u.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;d(e);var n=f[e.name],o=n.forages;t.close();for(var a=0;a<o.length;a++){var s=o[a];s._dbInfo.db=null,s._dbInfo.version=r}return new A((function(t,n){var o=i.open(e.name,r);o.onerror=function(e){o.result.close(),n(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<o.length;t++){var r=o[t];r._dbInfo.db=e,I(r._dbInfo)}})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}})):u.then((function(t){d(e);var r=f[e.name],n=r.forages;t.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new A((function(t,r){var n=i.deleteDatabase(e.name);n.onerror=n.onblocked=function(e){var t=n.result;t&&t.close(),r(e)},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}})).then((function(e){r.db=e;for(var t=0;t<n.length;t++)I(n[t]._dbInfo)})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}))}else n=A.reject("Invalid arguments");return s(n,t),n}},w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=/^~~local_forage_type~([^~]+)~/,R="__lfsc__:".length,M=R+"arbf".length,x=Object.prototype.toString;function P(e){var t,r,n,i,o,A=.75*e.length,a=e.length,s=0;"="===e[e.length-1]&&(A--,"="===e[e.length-2]&&A--);var u=new ArrayBuffer(A),c=new Uint8Array(u);for(t=0;t<a;t+=4)r=w.indexOf(e[t]),n=w.indexOf(e[t+1]),i=w.indexOf(e[t+2]),o=w.indexOf(e[t+3]),c[s++]=r<<2|n>>4,c[s++]=(15&n)<<4|i>>2,c[s++]=(3&i)<<6|63&o;return u}function T(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=w[r[t]>>2],n+=w[(3&r[t])<<4|r[t+1]>>4],n+=w[(15&r[t+1])<<2|r[t+2]>>6],n+=w[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var F={serialize:function(e,t){var r="";if(e&&(r=x.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===x.call(e.buffer))){var n,i="__lfsc__:";e instanceof ArrayBuffer?(n=e,i+="arbf"):(n=e.buffer,"[object Int8Array]"===r?i+="si08":"[object Uint8Array]"===r?i+="ui08":"[object Uint8ClampedArray]"===r?i+="uic8":"[object Int16Array]"===r?i+="si16":"[object Uint16Array]"===r?i+="ur16":"[object Int32Array]"===r?i+="si32":"[object Uint32Array]"===r?i+="ui32":"[object Float32Array]"===r?i+="fl32":"[object Float64Array]"===r?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+T(n))}else if("[object Blob]"===r){var o=new FileReader;o.onload=function(){var r="~~local_forage_type~"+e.type+"~"+T(this.result);t("__lfsc__:blob"+r)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,R))return JSON.parse(e);var t,r=e.substring(M),n=e.substring(R,M);if("blob"===n&&D.test(r)){var i=r.match(D);t=i[1],r=r.substring(i[0].length)}var A=P(r);switch(n){case"arbf":return A;case"blob":return o([A],{type:t});case"si08":return new Int8Array(A);case"ui08":return new Uint8Array(A);case"uic8":return new Uint8ClampedArray(A);case"si16":return new Int16Array(A);case"ur16":return new Uint16Array(A);case"si32":return new Int32Array(A);case"ui32":return new Uint32Array(A);case"fl32":return new Float32Array(A);case"fl64":return new Float64Array(A);default:throw new Error("Unkown type: "+n)}},stringToBuffer:P,bufferToString:T};function O(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function L(e,t,r,n,i,o){e.executeSql(r,n,i,(function(e,A){A.code===A.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,A):O(e,t,(function(){e.executeSql(r,n,i,o)}),o)}),o):o(e,A)}),o)}function k(e,t,r,n){var i=this;e=c(e);var o=new A((function(o,A){i.ready().then((function(){void 0===t&&(t=null);var a=t,s=i._dbInfo;s.serializer.serialize(t,(function(t,u){u?A(u):s.db.transaction((function(r){L(r,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){A(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void o(k.apply(i,[e,a,r,n-1]));A(t)}}))}))})).catch(A)}));return s(o,r),o}function N(e){return new A((function(t,r){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}var G={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var i=new A((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(i){O(i,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=F,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT * FROM "+i.storeName,[],(function(r,n){for(var o=n.rows,A=o.length,a=0;a<A;a++){var s=o.item(a),u=s.value;if(u&&(u=i.serializer.deserialize(u)),void 0!==(u=e(u,s.key,a+1)))return void t(u)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=i.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){return k.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,r){var n=r.rows.item(0).c;e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var n=r.rows.length?r.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],i=0;i<r.rows.length;i++)n.push(r.rows.item(i).key);e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,i=this;return s(n=e.name?new A((function(t){var n;n=e.name===r.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(N(n))})).then((function(e){return new A((function(t,r){e.db.transaction((function(n){function i(e){return new A((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var o=[],a=0,s=e.storeNames.length;a<s;a++)o.push(i(e.storeNames[a]));A.all(o).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):A.reject("Invalid arguments"),t),n}};function U(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function j(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var V={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=U(e,this._defaultConfig),j()?(this._dbInfo=t,t.serializer=F,A.resolve()):A.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,i=n.length,o=localStorage.length,A=1,a=0;a<o;a++){var s=localStorage.key(a);if(0===s.indexOf(n)){var u=localStorage.getItem(s);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,s.substring(i),A++)))return u}}}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new A((function(i,o){var A=n._dbInfo;A.serializer.serialize(t,(function(t,n){if(n)o(n);else try{localStorage.setItem(A.keyPrefix+e,t),i(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return s(n,t),n},clear:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],i=0;i<r;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&n.push(o.substring(e.keyPrefix.length))}return n}));return s(r,e),r},dropInstance:function(e,t){if(t=l.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var n,i=this;return s(n=e.name?new A((function(t){e.storeName?t(U(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):A.reject("Invalid arguments"),t),n}},Y=function(e,t){for(var r,n,i=e.length,o=0;o<i;){if((r=e[o])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;o++}return!1},H=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},K={},q={},J={INDEXEDDB:S,WEBSQL:G,LOCALSTORAGE:V},W=[J.INDEXEDDB._driver,J.WEBSQL._driver,J.LOCALSTORAGE._driver],z=["dropInstance"],X=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(z),Z={description:"",driver:W.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function $(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function ee(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(H(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var te=new(function(){function e(t){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J)if(J.hasOwnProperty(r)){var n=J[r],i=n._driver;this[r]=i,K[i]||this.defineDriver(n)}this._defaultConfig=ee({},Z),this._config=ee({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new A((function(t,r){try{var n=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(i);for(var o=X.concat("_initStorage"),a=0,u=o.length;a<u;a++){var c=o[a];if((!Y(z,c)||e[c])&&"function"!=typeof e[c])return void r(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=A.reject(t);return s(r,arguments[arguments.length-1]),r}},r=0,n=z.length;r<n;r++){var i=z[r];e[i]||(e[i]=t(i))}}();var l=function(r){K[n]&&console.info("Redefining LocalForage driver: "+n),K[n]=e,q[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(l,r):l(!!e._support):l(!0)}catch(e){r(e)}}));return u(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=K[e]?A.resolve(K[e]):A.reject(new Error("Driver not found."));return u(n,t,r),n},e.prototype.getSerializer=function(e){var t=A.resolve(F);return u(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;H(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){n._config.driver=n.driver()}function a(e){return n._extend(e),o(),n._ready=n._initStorage(n._config),n._ready}var s=null!==this._driverSet?this._driverSet.catch((function(){return A.resolve()})):A.resolve();return this._driverSet=s.then((function(){var e=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var i=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(i).then(a).catch(r)}o();var s=new Error("No available storage method found.");return n._driverSet=A.reject(s),n._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return n._driverSet=A.reject(e),n._driverSet})),u(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!q[e]},e.prototype._extend=function(e){ee(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=X.length;e<t;e++)$(this,X[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=te},{3:3}]},{},[4])(4)},"object"===a(t)&&void 0!==e?e.exports=A():(i=[],void 0===(o="function"==typeof(n=A)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(144))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=function(){t.stop(),t.autoSaveTimer=window.setInterval((function(){t.state.dirty&&(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV||t.mergeState({autoSaveSignalCount:t.state.autoSaveSignalCount+1}))}),18e4)},t.stop=function(){t.autoSaveTimer&&(clearInterval(t.autoSaveTimer),t.autoSaveTimer=void 0)},t}return(0,n.__extends)(t,e),t.prototype.initState=function(){this.updateState({autoSaveSignalCount:0,dirty:!1})},t.prototype.markDirty=function(e){this.mergeState({dirty:e})},t}(i.default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logDocumentLoad=function(e,t){(0,n.sendKTrackerEvent)("toolLoad",{type:e,errorMsg:t})};var n=r(938)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ModelUpdateType",{enumerable:!0,get:function(){return i.ModelUpdateType}}),t.default=t.MultiBackupItem=void 0;var n=r(4),i=r(290),o=r(1879),A=r(659),a=r(2),s=r(1007);function u(e,t){var r=new Map;return e.forEach((function(e,n){r.set(n,t(e,n))})),r}var c=function(e){function t(t){var r=e.call(this,t)||this;return r.multiData=u(t,(function(e){return{data:new e.BackupItemImpl(e.model),BackupItemImpl:e.BackupItemImpl}})),r}return(0,n.__extends)(t,e),t.prototype.toModel=function(){return u(this.multiData,(function(e){return{model:e.data.toModel(),BackupItemImpl:e.BackupItemImpl}}))},t}(i.BackupItem);function l(e,t,r){var i=r.value;return(0,n.__assign)((0,n.__assign)({},r),{value:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.started)i.apply(this,e);else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw new Error("method "+t+" can only be called after app started.")}})}t.MultiBackupItem=c;var g=function(e){function t(r){var n=e.call(this,{getModel:function(){return u(n.documentSources,(function(e){var t=e.getModel();if(!t)throw new Error("MultiDocumentManager: getModel() return undefined for: "+e.key);return{model:t,BackupItemImpl:e.BackupItemImpl}}))},onUpdateModel:function(e,t){n.mapEachPrioritySync((function(r){r.forEach((function(r){var n=e.get(r.key);if(!n)throw new Error('No backup model for "'+r.key+"\", perhaps it's been added after this backup triggered.");r.onUpdateModel(n.model,t)}))}))},onUpdateState:r.onUpdateState,maxBackupStep:r.maxBackupStep,useHybridStorage:r.useHybridStorage})||this;return n.started=!1,n.cancelLoadToken=o.CancelToken.source(),n.id="kafDocument"+t.instanceCount++,n.monitoredRequestedKeySet=new Set,n.monitorSourceFetch=function(e,t,r){var i=e+r;return n.monitoredRequestedKeySet.has(i)?t:(n.monitoredRequestedKeySet.add(i),n.reportSource(e,t,r))},n.onModelChange=r.onModelChange||a.noop,n.onPause=r.onPause||a.noop,n.onToggleAutoBackup=r.onToggleAutoBackup||a.noop,n.onResume=r.onResume||a.noop,n}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"documentSources",{get:function(){return this.internalDocumentSources||(this.internalDocumentSources=new Map),this.internalDocumentSources},enumerable:!0,configurable:!0}),t.prototype.getBackupItemImpl=function(){return c},t.prototype.setId=function(e){this.id=e},t.prototype.getId=function(){return this.id},t.prototype.onModelChanges=function(e){this.started&&(this.requestCommit(),this.onModelChange())},t.prototype.toggleAutoBackup=function(t){e.prototype.toggleAutoBackup.call(this,t),this.onToggleAutoBackup(t)},t.prototype.commit=function(){e.prototype.commit.call(this)},t.prototype.onLoadSessionStart=function(){var e=(0,s.createDocumentLoadReporter)(),t=e.reportSource,r=e.statisticsPromise,n=e.getStatistics;(0,e.setTotal)(this.documentSources.size),this.loadStatisticsPromise=r,this.getStatisticsSync=n,this.reportSource=t,this.monitoredRequestedKeySet.clear()},t.prototype.createFetchDocumentPromises=function(e,r){var n=this,i=this.getDocumentsSortedByPriority(t.getDocFetchPriority),o=new Map;return i.reduce((function(t,i){return t.then((function(){var t=[];return i.documents.forEach((function(i){if(void 0!==i.fetch){var A=n.monitorSourceFetch(i.key,i.fetch({isInitialLoad:e,reloadInfo:r}),"fetch");t.push(A),o.set(i.key,A)}})),Promise.all(t)}))}),Promise.resolve()),o},t.prototype.openDocuments=function(){var e=this;this.onLoadSessionStart();var t=this.createFetchDocumentPromises(!0);return this.mapEachPriority((function(r){return Promise.all(r.map((function(r){return(t.get(r.key)||Promise.resolve()).then((function(t){return e.monitorSourceFetch(r.key,r.open(t),"open")}))})))}))},t.prototype.loadUntilCancel=function(e,t){var r=this;return this.cancelLoadToken=o.CancelToken.source(),Promise.race([e,this.cancelLoadToken.token.promise]).then((function(e){if((0,A.isCancel)(e))return e;t&&t(),r.requestCommit(),r.commit()}))},t.prototype.start=function(){var e=this;if(this.started)throw new Error("Cannot start twice");return this.loadUntilCancel(this.openDocuments(),(function(){e.started=!0,e.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!0,e.onDocumentChange),e.afterInit&&e.afterInit(e.onDocumentChange)})),e.toggleAutoBackup(!0)}))},t.prototype.reloadDocuments=function(e){var t=this;this.onLoadSessionStart();var r={data:e},n=this.createFetchDocumentPromises(!1,r);return this.mapEachPriority((function(e){return Promise.all(e.map((function(e){var i=e.reload;return i?(n.get(e.key)||Promise.resolve()).then((function(n){return t.monitorSourceFetch(e.key,i(r,n),"open")})):Promise.resolve()})))}))},t.prototype.reload=function(e){return this.clearBackupHistory(),this.pause(),this.loadUntilCancel(this.reloadDocuments(e),this.resume.bind(this))},t.prototype.pause=function(){this.toggleAutoBackup(!1),this.onPause(),this.started=!1},t.prototype.resume=function(){this.started=!0,this.onResume(),this.toggleAutoBackup(!0)},t.prototype.beforeDispose=function(){this.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!1,a.noop),e.beforeDispose&&e.beforeDispose()})),this.toggleAutoBackup(!1),this.cancelLoadToken.cancel("DocumentManager has been disposed"),this.started=!1},t.prototype.getLoadStatistics=function(e){return void 0===e&&(e=!0),e?(this.loadStatisticsPromise||console.error("Please wail until the document load completed"),this.loadStatisticsPromise):this.getStatisticsSync()},t.prototype.beforeSaveDocument=function(e){if(!this.started)return!1;var t=!0;return this.documentSources.forEach((function(r){r.beforeSaveDocument&&(r.beforeSaveDocument(e)||(t=!1))})),t},t.prototype.saveDocument=function(e,t){var r=this.generateActionId(),i={actionId:r};return t&&(i=(0,n.__assign)((0,n.__assign)({},t),{actionId:r})),this.mapEachPriority((function(t){return Promise.all(t.map((function(t){return t.saveDocument(e,i)})))}))},t.prototype.clearDocument=function(e,t){this.mapEachPrioritySync((function(r){r.forEach((function(r){t&&!t(r)||r.clearDocument({data:e})}))}))},t.prototype.addDocumentSource=function(e){var t=this;if(this.started)throw new Error("MultiDocumentManager: currently don't support to dynamicly add/remove document source after app started.");if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(e.updateListeners&&console.warn("[Deprecated]:updateListeners,请在 afterInit 方法内监听数据变化,在 beforeDispose 内移除监听"),!e.updateListeners&&!e.afterInit))throw Error("updateListeners 和 afterInit 请至少实现一个");var r=e.key;if(this.documentSources.get(r))throw new Error("MultiDocumentManager: duplicate document source key: "+e.key);this.documentSources.set(r,(0,n.__assign)((0,n.__assign)({},e),{onDocumentChange:function(){return t.onModelChanges(r)}}))},t.prototype.getDocumentsSortedByPriority=function(e){var t,r,n,i={};return t=this.documentSources,r=function(t,r){var n=e(t);i[n]||(i[n]=[]),i[n].push(t)},n=[],t.forEach((function(e,t){n.push(r(e,t))})),Object.keys(i).map((function(e){var t=parseFloat(e);return{priority:t,documents:i[t]}})).sort((function(e,t){return t.priority-e.priority}))},t.prototype.mapEachPriority=function(e){return this.getDocumentsSortedByPriority(t.getDocPriority).reduce((function(t,r){return t=t.then((function(){return e(r.documents,r.priority)}))}),Promise.resolve())},t.prototype.mapEachPrioritySync=function(e){this.getDocumentsSortedByPriority(t.getDocPriority).forEach((function(t){e(t.documents,t.priority)}))},t.prototype.generateActionId=function(){return Date.now()+"-"+this.id},t.instanceCount=0,t.getDocFetchPriority=function(e){return e.fetchPriority||0},t.getDocPriority=function(e){return e.priority||0},(0,n.__decorate)([l],t.prototype,"toggleAutoBackup",null),(0,n.__decorate)([l],t.prototype,"commit",null),t}(i.default);t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1880),i=function(){function e(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){return t=e}));var r=this;e((function(e){r.reason||(r.reason=new n.Cancel(e),t(r.reason))}))}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var t=function(){};return{token:new e((function(e){return t=e})),cancel:t}},e}();t.CancelToken=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.message=e}return e.prototype.__CANCEL__=function(){},e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e}();t.Cancel=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.scoped=function(e){return function(t,r,o){return(0,i.__assign)((0,i.__assign)({},o),{value:function(){for(var t,r,i=this,A=[],a=0;a<arguments.length;a++)A[a]=arguments[a];var s=A.find((function(e){var t;return!0===(null===(t=e)||void 0===t?void 0:t.isScope)}));if(!s||!s.valid)return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING?void(s?s.valid||console.warn("Scope is not valid!"):console.warn("No scope found!")):null===(t=o.value)||void 0===t?void 0:t.apply(this,A);var u=function(){s.push((function(){e.apply(i,A)}))};try{var c=null===(r=o.value)||void 0===r?void 0:r.apply(this,A);return c&&("object"===n(c)||"function"==typeof c)&&(c instanceof Promise||"function"==typeof c.then)?c.then(u):u(),c}catch(e){throw e}}})}},t.ScopeGroup=void 0;var i=r(4);var o=function(){function e(e,t,r,n){this.parent=e,this.onScopeDispose=t,this.pushChange=r,this.isValid=n,this.isScope=!0,this.disposed=!1}return Object.defineProperty(e.prototype,"valid",{get:function(){return!this.disposed&&this.isValid(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alive",{get:function(){return!this.disposed},enumerable:!0,configurable:!0}),e.prototype.push=function(e){this.valid?this.pushChange(this,e):console.warn("Scope is not valid!")},e.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.onScopeDispose(this))},e}(),A=function(){function e(){var e=this;this.changeStack=[],this.lockedScope=new Set,this.onScopeDispose=function(t){e.sequenceRestore(t)},this.pushChange=function(t,r){e.changeStack.push({scope:t,restore:r})},this.isScopeValid=function(t){for(var r=-1,n=e.changeStack.length-1;n>0;n--)if(e.changeStack[n].scope===t){r=n;break}return!e.lockedScope.has(t)&&(-1===r||r===e.changeStack.length-1)}}return e.prototype.sequenceRestore=function(e){for(var t,r,n=[];this.changeStack.length;){var o=this.changeStack[this.changeStack.length-1];if(o.scope.alive)break;this.changeStack.pop(),n.push(o)}try{for(var A=(0,i.__values)(n),a=A.next();!a.done;a=A.next()){a.value.restore()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=A.return)&&r.call(A)}finally{if(t)throw t.error}}},e.prototype.lock=function(e){e.parent===this&&this.lockedScope.add(e)},e.prototype.unLock=function(e){this.lockedScope.delete(e)},e.prototype.createScope=function(){return new o(this,this.onScopeDispose,this.pushChange,this.isScopeValid)},e.prototype.dispose=function(){for(;this.changeStack.length;){this.changeStack.pop().restore()}[].forEach((function(e){return e.alive&&e.dispose()}))},e}();t.ScopeGroup=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scopedState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Object.defineProperty(t.prototype,A,{value:e,writable:!1,enumerable:!1,configurable:!1}),(0,o.scopedObject)({diff:s,getter:c,restore:u})(t)}};var n=r(4),i=r(2),o=r(1040),A=Symbol("scoped_property");var a,s=(a=new Set,function(e,t){var r={};return Object.keys(e).forEach((function(e){a.add(e)})),Object.keys(t).forEach((function(e){a.add(e)})),a.forEach((function(n){e[n]!==t[n]&&(r[n]={from:e[n],to:t[n]})})),a.clear(),r});function u(e){var t=(0,n.__assign)({},this.state);Object.keys(e).forEach((function(r){var n=e[r];Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&n.to!==t[r]&&console.error("Scoped state "+r+" changed outside current scope!"),t[r]=n.from})),this.state=t}function c(){var e=this[A];return function(e,t){return t&&t.length?(0,i.pick)(e,t):(0,n.__assign)({},e)}(this.state,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"drawPolygonWithHole",{enumerable:!0,get:function(){return n.drawPolygonWithHole}}),Object.defineProperty(t,"drawBox",{enumerable:!0,get:function(){return n.drawBox}}),Object.defineProperty(t,"drawPolyline",{enumerable:!0,get:function(){return n.drawPolyline}}),Object.defineProperty(t,"drawLine",{enumerable:!0,get:function(){return n.drawLine}}),Object.defineProperty(t,"drawDashLine",{enumerable:!0,get:function(){return n.drawDashLine}}),Object.defineProperty(t,"drawPolygon",{enumerable:!0,get:function(){return n.drawPolygon}}),Object.defineProperty(t,"drawPolyDashLine",{enumerable:!0,get:function(){return n.drawPolyDashLine}}),Object.defineProperty(t,"drawSector",{enumerable:!0,get:function(){return n.drawSector}}),Object.defineProperty(t,"drawRect",{enumerable:!0,get:function(){return n.drawRect}});var n=r(995)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"generatePopMesh",{enumerable:!0,get:function(){return n.generatePopMesh}}),Object.defineProperty(t,"updateMaterials",{enumerable:!0,get:function(){return n.updateMaterials}}),Object.defineProperty(t,"updateTransform",{enumerable:!0,get:function(){return n.updateTransform}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return n.loadComponent}});var n=r(1041)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ContainerType2D",{enumerable:!0,get:function(){return n.ContainerType2D}});var n=r(229)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.SelectControls2D}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1887)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1016)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pureWithCustomizedCompare",{enumerable:!0,get:function(){return n.pureWithCustomizedCompare}}),Object.defineProperty(t,"pureWithPickKeys",{enumerable:!0,get:function(){return n.pureWithPickKeys}}),Object.defineProperty(t,"pureWithOmitKeys",{enumerable:!0,get:function(){return n.pureWithOmitKeys}});var n=r(1889)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pureWithCustomizedCompare=function e(t){void 0===t&&(t={});return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!(i=this.props,A=e,a=t,s=Object.keys(i),u=Object.keys(A),s.length===u.length&&s.every((function(e){return(a[e]||o)(i[e],A[e])}))&&(0,n.default)(this.state,r));var i,A,a,s,u},r}},t.pureWithPickKeys=function e(t){return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!function(e,t,r){return r.every((function(r){return o(e[r],t[r])}))}(this.props,e,t)||!(0,n.default)(this.state,r)},r}},t.pureWithOmitKeys=function e(t){var r=t.reduce((function(e,t){return e[t]=!0,e}),{});return function(t){return t.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+t.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),t.prototype.shouldComponentUpdate=function(e,t){return!function(e,t,r){var n=Object.keys(e).filter((function(e){return!r[e]})),i=Object.keys(t).filter((function(e){return!r[e]}));return n.length===i.length&&n.every((function(r){return o(e[r],t[r])}))}(this.props,e,r)||!(0,n.default)(this.state,t)},t}};var n=r(264),i=r(186);function o(e,t){return e===t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__expectedPublicAPIs__=void 0;t.__expectedPublicAPIs__=""},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RenderSystem2D",{enumerable:!0,get:function(){return n.RenderSystem2D}}),Object.defineProperty(t,"RenderSystem3D",{enumerable:!0,get:function(){return n.RenderSystem3D}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"InferenceSystem3D",{enumerable:!0,get:function(){return i.InferenceSystem3D}}),Object.defineProperty(t,"EntityListSystem",{enumerable:!0,get:function(){return o.EntityListSystem}}),Object.defineProperty(t,"VisibleEntityListSystem",{enumerable:!0,get:function(){return A.default}});var n=r(229),i=r(412),o=r(183),A=r(204)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectionFeature",{enumerable:!0,get:function(){return n.SelectionFeature}}),Object.defineProperty(t,"HintFeature",{enumerable:!0,get:function(){return i.HintFeature}}),Object.defineProperty(t,"WithObjectEventListenersFeature",{enumerable:!0,get:function(){return o.Feature}});var n=r(409),i=r(670),o=r(976)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DocumentEvents",{enumerable:!0,get:function(){return n.DocumentEvents}}),Object.defineProperty(t,"combine",{enumerable:!0,get:function(){return n.combine}}),Object.defineProperty(t,"Language",{enumerable:!0,get:function(){return n.Language}}),Object.defineProperty(t,"EVENT_STOPPED",{enumerable:!0,get:function(){return n.EVENT_STOPPED}}),Object.defineProperty(t,"InteractionEventType",{enumerable:!0,get:function(){return n.InteractionEventType}});var n=r(1042)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(512),o=r(1898),A=r(692),a=r(693),s=function(){function e(){}return e.prototype.setPrecision=function(e){this.precisionMap=e},e.prototype.setGlobalUnit=function(e){var t=this.getGlobalUnitInfoMap(e);t&&(this.currentGlobalUnitInfoMap=t)},e.prototype.setGlobalLengthUnit=function(e){var t=this.getGlobalLengthUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{length:t}))},e.prototype.setGlobalAreaUnit=function(e){var t=this.getGlobalAreaUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{area:t}))},e.prototype.getDisplayText=function(e,t,r,n,o){var A;if(void 0===r&&(r=!1),o){if(o.customUnitInfo){if((0,a.getQuantityTypeForUnit)(o.customUnitInfo.unitType)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customUnitInfo.unitType and quantityType do not match.");return""}A=(0,a.getUnitInstance)(o.customUnitInfo.unitType),n=o.customUnitInfo.precision}if(o.customBaseUnit){if((0,a.getQuantityTypeForUnit)(o.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customBaseUnit and quantityType do not match.");return""}var s=(0,a.getDefaultBaseUnitForQuantity)(t);if(!s)return"";e=(0,a.convertBetweenUnits)(e,o.customBaseUnit,s)}}if(!A){var u=this.getGlobalUnitInfo(t),c=void 0;if(u){if(c=u.precision,this.precisionMap){var l=this.precisionMap.tool_length_and_precision,g=this.precisionMap.tool_area_and_precision;switch(t){case"length":l&&l.unit&&i.factorMap[l.unit]===u.unit.factor&&void 0!==l.precision&&(c=l.precision);break;case"area":g&&g.unit&&i.factorMap[g.unit]===u.unit.factor&&void 0!==g.precision&&(c=g.precision)}}A=u.unit,n=void 0===n?c:n}}if(A&&n)return A.getDisplayText(e,r,n);if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): illegal input.");return""},e.prototype.getValueFromDisplayText=function(e,t,r,n){var i;if(void 0===r&&(r=!1),n&&n.customUnit){if((0,a.getQuantityTypeForUnit)(n.customUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customUnit and quantityType do not match.");return 0}i=(0,a.getUnitInstance)(n.customUnit)}if(!i){var o=this.getGlobalUnitInfo(t);o&&(i=o.unit)}if(i){var A=i.getValueFromDisplayText(e,r);if(n&&n.customBaseUnit){if((0,a.getQuantityTypeForUnit)(n.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customBaseUnit and quantityType do not match.");return 0}var s=(0,a.getDefaultBaseUnitForQuantity)(t);s&&(A=(0,a.convertBetweenUnits)(A,s,n.customBaseUnit))}return A}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): 'currentGlobalUnitInfoMap' is not defined or illegal 'quantityType'");return 0},e.prototype.getGlobalUnitInfo=function(e){if(this.currentGlobalUnitInfoMap)return this.currentGlobalUnitInfoMap[e]},e.prototype.getGlobalUnitInfoMap=function(e){var t;switch(e){case A.GlobalUnitType.mm:t=o.globalUnitInfoMaps.metricSystem.millimeter;break;case A.GlobalUnitType.m:t=o.globalUnitInfoMaps.metricSystem.meter;break;case A.GlobalUnitType.ft:t=o.globalUnitInfoMaps.imperialSystem.foot;break;default:if(String(e).match(/^1\d{2}$/)){var r=this.getGlobalLengthUnitInfo(Number(String(e)[1])),n=this.getGlobalAreaUnitInfo(Number(String(e)[2]));r&&n&&(t={length:r,area:n})}else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}return t},e.prototype.getGlobalLengthUnitInfo=function(e){var t;switch(e){case i.LengthUnitType.mm:t=o.globalLengthUnitInfoMaps.metricSystem.millimeter;break;case i.LengthUnitType.m:t=o.globalLengthUnitInfoMaps.metricSystem.meter;break;case i.LengthUnitType.ft:t=o.globalLengthUnitInfoMaps.imperialSystem.foot;break;case i.LengthUnitType.in:t=o.globalLengthUnitInfoMaps.imperialSystem.inch;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalLengthUnitInfo(): illegal globalLengthUnitType")}return t},e.prototype.getGlobalAreaUnitInfo=function(e){var t;switch(e){case i.AreaUnitType.sqMm:t=o.globalAreaUnitInfoMaps.metricSystem.millimeter;break;case i.AreaUnitType.sqM:t=o.globalAreaUnitInfoMaps.metricSystem.meter;break;case i.AreaUnitType.sqFt:t=o.globalAreaUnitInfoMaps.imperialSystem.foot;break;case i.AreaUnitType.mats:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.mats;break;case i.AreaUnitType.tsubo:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.tsubo;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalAreaUnitInfo(): illegal globalAreaUnitType")}return t},e}();t.default=s},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.tsubo=t.mats=t.squareMillimeter=t.squareMeter=t.squareFoot=t.footAndInch=t.inch=t.millimeter=t.meter=void 0;var i=n(r(1896)),o=r(513),A=n(r(1897)),a=new i.default("m",o.FACTORS.m2mm,o.regexMap.number,o.regexMap.meterText);t.meter=a;var s=new i.default("mm",o.FACTORS.mm2mm,o.regexMap.number,o.regexMap.millimeterText);t.millimeter=s;var u=new i.default("''",o.FACTORS.inch2mm,o.regexMap.number,o.regexMap.inchText);t.inch=u;var c=new A.default;t.footAndInch=c;var l=new i.default("ft²",o.FACTORS.sqft2sqmm,o.regexMap.number,o.regexMap.squareFootText);t.squareFoot=l;var g=new i.default("m²",o.FACTORS.sqm2sqmm,o.regexMap.number,o.regexMap.squareMeterText);t.squareMeter=g;var f=new i.default("mm²",o.FACTORS.sqmm2sqmm,o.regexMap.number,o.regexMap.squareMillimeterText);t.squareMillimeter=f;var h=new i.default("mats",o.FACTORS.mats2sqmm,o.regexMap.number,o.regexMap.matsText);t.mats=h;var p=new i.default("tsubo",o.FACTORS.tsubo2sqmm,o.regexMap.number,o.regexMap.tsuboText);t.tsubo=p},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(1043),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.factor=r,this.regexWithoutUnit=n,this.regexWithUnit=o}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return t?"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r)).concat(this.name):"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r))}},{key:"getValueFromDisplayText",value:function(e,t){return t?this.getValueFromFirstNumber(this.regexWithUnit,e):this.getValueFromFirstNumber(this.regexWithoutUnit,e)}},{key:"getValueFromFirstNumber",value:function(e,t){var r=(0,A.testStringAndExtractNumbers)(e,t);return void 0!==r[0]?r[0]*this.factor:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=a},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(513),a=r(1043),s=function(){function e(){(0,i.default)(this,e),this.factor=0}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return this.getFootAndInchText(e)}},{key:"getValueFromDisplayText",value:function(e,t){return this.getValueFromFootAndInchText(e)}},{key:"getFootAndInchText",value:function(e){var t=(0,a.numberPrecisionOperationAndRound)(e/A.FACTORS.inch2mm,0),r=Math.floor(t/A.FACTORS.foot2inch),n=t-r*A.FACTORS.foot2inch;return"".concat(r,"'").concat(n,"''")}},{key:"getValueFromFootAndInchText",value:function(e){var t,r;return A.regexMap.number.test(e)||A.regexMap.inchText.test(e)?(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])):A.regexMap.footAndInchText.test(e)&&(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])*A.FACTORS.foot2inch,2===t.length&&(r+=Number(t[1]))),void 0!==r?r*A.FACTORS.inch2mm:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalLengthUnitInfoMaps=t.globalAreaUnitInfoMaps=t.globalUnitInfoMaps=void 0;var n=r(512),i={metricSystem:{meter:{length:{precision:.001,unit:n.meter},area:{precision:.01,unit:n.squareMeter}},millimeter:{length:{precision:1,unit:n.millimeter},area:{precision:.01,unit:n.squareMeter}}},imperialSystem:{foot:{length:{precision:1,unit:n.footAndInch},area:{precision:1,unit:n.squareFoot}}}};t.globalUnitInfoMaps=i;var o={metricSystem:{meter:{precision:.01,unit:n.squareMeter},millimeter:{precision:.01,unit:n.squareMillimeter}},imperialSystem:{foot:{precision:.01,unit:n.squareFoot}},JapaneseUnitSystem:{mats:{precision:.01,unit:n.mats},tsubo:{precision:.01,unit:n.tsubo}}};t.globalAreaUnitInfoMaps=o;var A={metricSystem:{meter:{precision:.001,unit:n.meter},millimeter:{precision:1,unit:n.millimeter}},imperialSystem:{foot:{precision:1,unit:n.footAndInch},inch:{precision:.01,unit:n.inch}}};t.globalLengthUnitInfoMaps=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.TransactionDocument}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"flatEntitiesCreator",{enumerable:!0,get:function(){return o.flatEntitiesCreator}}),Object.defineProperty(t,"HighlightSystem2D",{enumerable:!0,get:function(){return A.HighlightSystem2D}}),Object.defineProperty(t,"HighlightSystem3D",{enumerable:!0,get:function(){return A.HighlightSystem3D}});var n=r(1900),i=r(412),o=r(1904),A=r(499)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.default}});var n=r(1901)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1902),i=r(1903),o=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=i.TransactionDocumentStatus.None,this.onDocumentChange=function(e,r,n){t.status!==i.TransactionDocumentStatus.Aborting&&t.activeTransaction.record(e,r,n),t.status===i.TransactionDocumentStatus.None&&t.onBackupRecord&&t.onBackupRecord(e,r,n)},this.updateDocument=e.updateDocument,this.onBackupRecord=e.onBackupRecord,this.maxBackupStep=e.maxBackupStep||25,this.openTransaction()}return e.prototype.setMaxBackupStep=function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)},e.prototype.openTransaction=function(){this.redoStack.length=0,this.activeTransaction=this.createTransaction()},e.prototype.commitTransaction=function(){this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-(this.maxBackupStep+1)),this.undoStack.push(this.activeTransaction),this.openTransaction()},e.prototype.abortTransaction=function(){this.status=i.TransactionDocumentStatus.Aborting,this.activeTransaction.recover(),this.status=i.TransactionDocumentStatus.None,this.activeTransaction=this.createTransaction()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Undoing,this.undoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.redoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.redo=function(){return 0!==this.redoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Redoing,this.redoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.undoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.createTransaction=function(){return new n.default(this.updateDocument)},e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function e(e){this.updateDocument=e,this.records=new Map}return e.prototype.record=function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)},e.prototype.recover=function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){e.updateDocument(r,n,t)}))}))},e.prototype.isEmpty=function(){return 0===this.records.size},e}();t.default=n},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDocumentStatus=void 0,t.TransactionDocumentStatus=n,function(e){e[e.None=0]="None",e[e.Undoing=1]="Undoing",e[e.Redoing=2]="Redoing",e[e.Aborting=3]="Aborting"}(n||(t.TransactionDocumentStatus=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatEntitiesCreator=function(e){var t=[],r=[];return function(n){var i=t,o=r;if(n!==i){for(var A=[],a=i.length,s=n.length,u=0;u<a&&u<s;u++){if(i[u]!==(f=n[u]))break;A.push(o[u])}if(u===a)for(;u<s;u++)A.push(e(n[u]));else{for(var c=new Map,l=u;l<a;l++)c.set(i[l],o[l]);for(var g=u;g<s;g++){var f=n[g],h=c.get(f);void 0===h?A.push(e(f)):A.push(h)}}return t=n,r=A,Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK&&(Object.freeze(t),Object.freeze(r)),A}return r}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"perf",{enumerable:!0,get:function(){return n.perf}});var n=r(232)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KAFApp=void 0;var n=r(4),i=r(211),o=r(143),A=r(1044),a=r(1048),s=r(232),u=r(492),c=r(137),l=r(11),g=r(91);function f(e){var t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.position="absolute",t.style.top="0",t.style.width="100%",t.style.height="100%",document.body.appendChild(t)),t}var h={fpsDetectorEnabled:!0},p=function(){function t(){this.appNodeId="kaf-app-"+t.AppCount++,this.pluginManager=new i.PluginManager,this.started=!1,this.registerPlugin(A.AppServicePlugin)}return t.prototype.registerPlugin=function(e){if(this.started)throw new Error("KAFApp.registerPlugin: cannot register plugin after App is started.");return this.pluginManager.registerPlugin(e),this},t.prototype.getPlugin=function(e){return this.pluginManager.getPlugin(e)},t.prototype.start=function(t){var r=this;if(this.started)throw new Error("KAFApp.start: App is already started.");t=(0,n.__assign)((0,n.__assign)({},h),t),this.started=!0;var i=(0,s.measurePluginLoadTiming)(this.pluginManager);this.pluginManager.loadAll(),i();var p=this.pluginManager.getPlugin(A.AppServicePlugin);this.fpsDetector=new s.FpsDetector(p.logger),this.fpsDataMerger=new s.FpsDataMerger({onMerged:function(e){return p.logger.fpsMerged(e)}}),p.stateManager.toolbox[u.setAppIdSymbol](this.appNodeId),p.stateManager.document[u.setAppIdSymbol](this.appNodeId),t.fpsDetectorEnabled?this.keepLoggingFps():this.fpsDetector.dispose(),(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)&&(window.kafProfiler=(0,a.profiler)(),window.kafDebuger=(0,a.debugManager)()),(0,o.config)({onError:p.logger.error}),p.stateManager.document.start(),p.stateManager.document.getLoadStatistics().then((function(e){(0,s.setDocumentsTiming)(e,r.appNodeId)}));var d,I,y=p.getLayout();d=y&&l.createElement(y,null),I={logger:p.logger,fpsDetector:this.fpsDetector,fpsDataMerger:this.fpsDataMerger,kafCoreState:p.stateManager,nodeId:this.appNodeId},g.render(l.createElement(c.RootStateContext.Provider,{value:{rootState:I.kafCoreState}},l.createElement(A.App,{logger:I.logger,fpsDetector:I.fpsDetector,fpsDataMerger:I.fpsDataMerger,appNodeId:I.nodeId},d)),f(I.nodeId)),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kafApp=this)},t.prototype.dispose=function(){var e,t;this.pluginManager.unloadAll(),e={nodeId:this.appNodeId},t=f(e.nodeId),g.unmountComponentAtNode(t),t.remove(),this.fpsDetector.dispose(),this.started=!1},t.prototype.getAppNodeId=function(){return this.appNodeId},t.prototype.keepLoggingFps=function(){var e=this;this.fpsDetector.on("frame",(function(t,r){r&&e.fpsDataMerger.add(t.duration)})),(0,s.initPerf)()},t.AppCount=0,t}();t.KAFApp=p}).call(this,r(86))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MountedViews=void 0;var n=r(4),i=r(137),o=r(2),A=r(11),a=r(91),s=r(510),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=document.createElement("span"),t.viewKeyMap=new WeakMap,t}return(0,n.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props.mountedViews.map((function(t,r){return A.createElement(s.ViewMountOrderContext.Provider,{key:e.getViewKey(t),value:r},A.createElement(t,null))})).reverse();return a.createPortal(t,this.placeholder)},t.prototype.componentWillUnmount=function(){this.placeholder=void 0},t.prototype.getViewKey=function(e){var t=this.viewKeyMap.get(e);return void 0===t&&(t=(0,o.uniqueId)("mounted-view-"),this.viewKeyMap.set(e,t)),t},t}(A.PureComponent);t.MountedViews=u;var c=(0,i.connect)((function(e){return{root:e}}),(function(e){return{mountedViews:e.root.__INTERNAL__mountedAppViews}}),u);t.default=c},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppServicePlugin=void 0;var n=r(4),i=r(211),o=r(1046),A=r(690),a=r(672),s=r(677),u=r(274),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootState=new A.default,t.logger=new s.Logger,t.enableConflictSessionCheck=function(e,r){t.getSessionManager().prepareSession(e,r)},t}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"stateManager",{get:function(){return this.rootState},enumerable:!0,configurable:!0}),t.prototype.onInitialize=function(){var e=this;this.rootState=new A.default,this.rootState.initState(),this.kaf2AppService=this.dependencies.get(a.AppServicePlugin),this.rootState[A.RootState_setKaf2](this.kaf2AppService.state),this.rootState.toolbox.provideToolContext(u.ToolContextInternal,(function(){return{rootState:e.rootState}})),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kaf=this)},t.prototype.onDispose=function(){this.rootState.dispose(),this.getSessionManager().stopSessionChecking(),this.layout=void 0},t.prototype.setLayout=function(e){if(this.layout)throw new Error("Layout cannot be set twice.");this.layout=e},t.prototype.getLayout=function(){return this.layout},t.prototype.addDocumentSource=function(e){this.rootState.document.addDocumentSource(e)},t.prototype.mountView=function(e){this.rootState.__INTERNAL__addMountedAppView(e)},t.prototype.getSessionManager=function(){var e=this;return this.sessionManager||(this.sessionManager=new o.default((function(t){t?e.rootState.document.autoSave.start():e.rootState.document.autoSave.stop()}))),this.sessionManager},t.prototype.registerEntityDocument=function(e){this.kaf2AppService.registerDocument(e)},t.dependencies=[a.AppServicePlugin],t}(i.BasePlugin);t.AppServicePlugin=c},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(343),i=r(4),o=r(228),A=r(1042),a=r(683),s=r(11),u=r(232),c=r(1049),l=r(1050);r(1911);var g,f={"./DebugComponent.module.scss":{"debug-root":"ui-debug-root_47b7b","debug-button":"ui-debug-button_73a33","debug-setting":"ui-debug-setting_bb0cc","debug-setting-row":"ui-debug-setting-row_94ade","debug-setting-row-title":"ui-debug-setting-row-title_6b6be","debug-setting-row-content":"ui-debug-setting-row-content_fc85a","debug-setting-item":"ui-debug-setting-item_6ac86","debug-setting-item-label":"ui-debug-setting-item-label_9289f","profile-wrapper":"ui-profile-wrapper_f26ef","profile-visible":"ui-profile-visible_b5bbc"}};g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.render=function(){return null},t}(a.default);var h=null;try{h=localStorage.getItem("__kafPerfEnabled__")}catch(e){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw e}if("1"===h||null===h&&(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)){g=function(e){function t(t){var r=e.call(this,t)||this;return r.switchProfile=function(e){var t=e.target.checked;r.setState({showProfile:t}),t||r.cleanRenderProfile()},r.switchDebug=function(e){var t=e.target.checked;r.setState({showDebug:t})},r.switchLanguage=function(e){var t=e.target.checked,r=window,n=t?A.Language.EN_US:A.Language.ZH_CN;try{r.kafDebuger.set("lang",n,!0),r.localStorage["local-language"]=n}catch(e){}window.location.reload()},r.switchAxis=function(e){var t=e.target.checked;r.setState({showAxis:t}),window.kafDebuger.set("axis3d",t)},r.onKey=function(e){e&&192==e.keyCode&&r.recordCurrentState()},r.state=r.state||{},r.state.showProfile=!1,r.state.showDebug=!0,r.state.showAxis=!1,r}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.initPixi(),document.body.addEventListener("keydown",this.onKey,!1)},t.prototype.render=function(){var e=this,t=this.state.showDebug;return s.createElement("div",{className:"ui-debug-root_47b7b",style:{display:t?"block":"none"}},this.renderDebugButton(),s.createElement("div",{ref:function(t){return e.elProfiler=t},className:(0,n.default)("profile-wrapper "+(this.state.showProfile?"profile-visible":""),f)}))},t.prototype.renderDebugButton=function(){return s.createElement("div",{className:"ui-debug-button_73a33"},s.createElement(u.Stats,null),this.renderSettingPanel())},t.prototype.renderSettingPanel=function(){var e=this.state.views,t="";try{t=window.localStorage["local-language"]}catch(e){}return s.createElement("div",{className:"ui-debug-setting_bb0cc"},s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"基本"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showProfile,onChange:this.switchProfile}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"性能(旧)")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showDebug,onChange:this.switchDebug}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"调试")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:t===A.Language.EN_US,onChange:this.switchLanguage}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"英文")),this.renderAxisSwitch())),s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"性能"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Timing,null)),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Profiling,null)))),e.map((function(e,t){return s.createElement("div",{key:e.key,className:"ui-debug-setting-row_94ade"},e.content)})))},t.prototype.renderAxisSwitch=function(){return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV?s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showAxis,onChange:this.switchAxis}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"坐标系")):null},t.prototype.renderProfile=function(){var e="",t=this.recordState||this.dumpProfile(),r=t.normalCosts,n=t.normalCounts,i=t.totalValues;e="时间统计\n\n",r.sort((function(e,t){return t.time-e.time})),r.forEach((function(t){e+=t.key+" "+t.time+" "+t.count+"\n"})),this.pxCostsText.text=e,e="计数统计\n\n",n.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxCountsText.text=e,e="全局计数\n\n",i.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxInfoText.text=e},t.prototype.cleanRenderProfile=function(){this.pxCostsText.text="",this.pxCountsText.text="",this.pxInfoText.text=""},t.prototype.dumpProfile=function(){var e,t,r,n,i=(0,l.profiler)().dump(),o=Object.values(i.costs);e=[];for(var A=0,a=o.length;A<a;++A)n=o[A],(0,c.isCrcp)(n.key)||e.push(n);var s=Object.values(i.counts).sort((function(e,t){return t.count-e.count}));t=[];for(A=0,a=s.length;A<a;++A)n=s[A],(0,c.isCrcp)(n.key)||t.push(n);var u=i.totals;return(r=Object.keys(u).map((function(e){return{key:e,count:u[e]}}))).sort((function(e,t){return t.count-e.count})),{normalCosts:e.length<50?e:e.slice(0,50),normalCounts:t.length<50?t:t.slice(0,50),totalValues:r.length<50?r:r.slice(0,50),datas:i.datas}},t.prototype.recordCurrentState=function(){this.recordState?this.recordState=void 0:(this.recordState=this.dumpProfile(),window.__pd=this.recordState.datas[this.recordState.datas.length-1])},t.prototype.initPixi=function(){var e=this;if(this.elProfiler){this.pxApp=new o.Application(3e3,1200,{backgroundColor:0});var t=this.pxApp;this.elProfiler.appendChild(t.view);var r=function(e,r){void 0===r&&(r=5);var n=new o.Text("",{fontSize:20,fill:65280,align:"left"});return n.x=e,n.y=r,t.stage.addChild(n),n};this.pxCostsText=r(500),this.pxCountsText=r(1e3),this.pxInfoText=r(1500);var n=Date.now();t.ticker.add((function(){Date.now()-n<1e3||(n=Date.now(),e.state.showProfile&&e.renderProfile())}))}},t}(a.default)}var p=g;t.default=p}).call(this,r(86))},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DisplayInfoMesh",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"DisplayInfoDrawable",{enumerable:!0,get:function(){return i.default}});var n=r(1913),i=r(1919)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(139),o=r(83),A=r(1051),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.meshBuilder=new A.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.state.loadingStatus}),(function(e){return t.setState({loadingStatus:e})}),(function(e,r){return t.onMeshCreated(e,r)}),(function(){return t.notifyWorldUpdate()})),t.componentInstances=t.meshBuilder.componentInstances,t.state={},t}return(0,n.__extends)(t,e),t.prototype.onMeshCreated=function(e,t){},t.prototype.buildMesh=function(){var e=this.meshBuilder.createMesh();return e.visible=void 0===this.props.visible||this.props.visible,e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),this.meshBuilder.updateMesh(this.mesh);var n=this.props.visible;this.mesh.visible=void 0===n||n},t.prototype.componentWillUnmount=function(){this.meshBuilder.disposeMesh(),e.prototype.componentWillUnmount.call(this)},t=(0,n.__decorate)([i.default],t)}(o.default);t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(44),i=r(1052),o=function(){function e(){this.doubleSided=!1}return e.prototype.getId=function(){return this.id},e.prototype.setId=function(e){return this.id=e,this},e.prototype.getMesh=function(){return this.mesh},e.prototype.setMesh=function(e){return this.mesh=e,this},e.prototype.getTransform=function(){return this.transform},e.prototype.setTransform=function(e){return this.transform=e,this},e.prototype.getMtl=function(){return this.mtl},e.prototype.setMtl=function(e){return this.mtl=e,this},e.prototype.getDoubleSided=function(){return this.doubleSided},e.prototype.setDoubleSided=function(e){return void 0===e&&(e=!1),this.doubleSided=e,this},e}();t.PopBufferComponent=o,t.toPopBufferComponent=function(e){var t=new o;return t.setId(e.id).setMesh(e.mesh).setDoubleSided(e.doubleSided),e.transform&&t.setTransform((new n.default).fromString(e.transform)),t.setMtl(e.mtl.filter((function(e){return!!e})).map(i.toPopBufferMtl)),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(6),i=r(12),o=function(){function e(e){this.props=e}return e.prototype.create=function(){var t=this.props,r=t.color,i=t.opacity,o=e.NORMAL_BOX;this.opacity=i,this.material=new n.MeshBasicMaterial({color:r,transparent:!0,opacity:i||1});var A=new n.Mesh(o,this.material);return this.applyTransform(A,this.props),A.setAttribute("shadowCaster",!1),i&&i<1&&(A.setAttribute("outline-color-marked",!0),A.setAttribute("transparent-line-faded",!0)),A},e.prototype.update=function(t){var r=this.props,n=r.opacity,i=r.color;t.geometry=e.NORMAL_BOX,this.material.setValues({color:i,opacity:n}),this.opacity!==n&&(this.opacity=n,this.updateMeshAttributeFromOpacity(t,n)),this.applyTransform(t,this.props)},e.prototype.dispose=function(){},e.prototype.applyTransform=function(e,t){var r=t.position,n=t.rotation,o=t.scale,A=void 0===o?i.SCALE_ONE:o,a=t.size;e.position.set(r.x,r.y,r.z),e.scale.set(A.x*a.x,A.y*a.y,A.z*a.z),e.rotation.set(n.x,n.y,n.z)},e.prototype.updateMeshAttributeFromOpacity=function(e,t){t&&t<1?(e.setAttribute("outline-color-marked",!0),e.setAttribute("transparent-line-faded",!0)):(e.setAttribute("outline-color-marked",!1),e.setAttribute("transparent-line-faded",!1))},e.NORMAL_BOX=new n.BoxGeometry(1,1,1),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1917),i=function(){function e(e){this.props=e}return e.prototype.create=function(){var e=(0,n.createMesh)(this.props);return(0,n.applyTransform)(e,this.props),e},e.prototype.update=function(e){(0,n.applyTransform)(e,this.props)},e.prototype.dispose=function(){},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMesh=u,t.applyTransform=c,t.default=void 0;var n=r(4),i=r(6),o=r(98),A=r(5),a=r(227),s=r(83);function u(e){var t=e.size,r=new i.BoxBufferGeometry(t.x,t.y,t.z),n=new i.EdgesBufferGeometry(r,1),o=new i.LineBasicMaterial({color:16722688,depthTest:!1});return new i.LineSegments(n,o)}function c(e,t){var r=t.position,n=t.pivot,i=t.scale,s=t.rotation;e.position.copy((0,a.vector3ToThree)(A.default.add(r,n||new A.default))),e.scale.copy((0,a.vector3ToThree)(i)),e.rotation.copy((0,a.eulerToThree)((new o.default).setFromVector3(s))),e.renderOrder=1}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.buildMesh=function(){var e=u(this.props);return c(e,this.props),e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),c(this.mesh,this.props)},t}(s.default);t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseQueue=void 0;var n=function(){function e(e){var t=this;this.isCanceled=!1,this.hasSuccess=!1,this.hasFailure=!1,this.promise=Promise.all(e.map((function(e){return e.then((function(){t.hasSuccess=!0}),(function(){t.hasFailure=!0}))}))).then((function(){return{hasSuccess:t.hasSuccess,hasFailure:t.hasFailure,isCanceled:t.isCanceled}}))}return e.prototype.setCanceled=function(){this.isCanceled=!0},e}();t.PromiseQueue=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(34),o=r(1051),A=r(2),a=function(){function e(e){this.props=e}return e.prototype.create=function(e){var t=this;return this.meshBuilder=new o.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.loadingStatus}),(function(e){return t.loadingStatus=e}),A.noop,e),this.meshBuilder.createMesh()},e.prototype.update=function(e){this.meshBuilder.updateMesh(e)},e.prototype.dispose=function(e){this.meshBuilder.disposeMesh()},(0,n.__decorate)([i.observable],e.prototype,"loadingStatus",void 0),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastHandledSignalCount=0,t}return(0,n.__extends)(t,e),t.prototype.componentWillMount=function(){this.lastHandledSignalCount=this.props.autoSaveSignalCount,this.props.rootState.document.autoSave.start()},t.prototype.componentWillReceiveProps=function(e){e.autoSaveSignalCount!==this.lastHandledSignalCount&&(this.props.rootState.document.saveDocument(!0),this.lastHandledSignalCount=e.autoSaveSignalCount)},t.prototype.render=function(){return null},t}(r(11).Component),A=(0,i.connect)((function(e){return{autoSave:e.document.autoSave}}),(function(e){return{autoSaveSignalCount:e.autoSave.autoSaveSignalCount}}),o);t.default=A},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1063);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1923);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1924);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.createReactContext=exports.PureComponent=exports.Component=void 0;var React=_interopRequireWildcard(__webpack_require__(11)),_async=__webpack_require__(1063),enterModule;function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var BaseComponent=function(_React$Component){_inherits(BaseComponent,_React$Component);var _super=_createSuper(BaseComponent);function BaseComponent(){return _classCallCheck(this,BaseComponent),_super.apply(this,arguments)}return _createClass(BaseComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BaseComponent}(React.Component),BasePureComponent=function(_React$PureComponent){_inherits(BasePureComponent,_React$PureComponent);var _super2=_createSuper(BasePureComponent);function BasePureComponent(){return _classCallCheck(this,BasePureComponent),_super2.apply(this,arguments)}return _createClass(BasePureComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BasePureComponent}(React.PureComponent),Component=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent);exports.Component=Component;var PureComponent=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);exports.PureComponent=PureComponent,_async.context.extend(Component),_async.context.extend(PureComponent);var createReactContext=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.asyncContext||(0,_async.createAsyncContext)(),r=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent),n=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);return t.extend(r),t.extend(n),{Component:r,PureComponent:n}},reactHotLoader,leaveModule;exports.createReactContext=createReactContext,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(BaseComponent,"BaseComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(BasePureComponent,"BasePureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(Component,"Component","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(PureComponent,"PureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(createReactContext,"createReactContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingletonRef=void 0;var _util=__webpack_require__(79),enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var SingletonRef=function(){function SingletonRef(e){var t=this;_classCallCheck(this,SingletonRef),this.instance=function(){return t.value||t.preValue},this.preInstance=function(){return t.preValue},e&&(this.noPreInstance=!0)}return _createClass(SingletonRef,[{key:"set",value:function(e){if(this.value)throw new Error("CUSTOM: Singleton exception while set!");this.value=e}},{key:"unset",value:function(e){this.value!==e&&_util.Util.asyncThrow(new Error("CUSTOM: Singleton exception while unset!")),this.noPreInstance||(this.preValue=this.value),this.value=void 0}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),SingletonRef}(),reactHotLoader,leaveModule;exports.SingletonRef=SingletonRef,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&reactHotLoader.register(SingletonRef,"SingletonRef","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/Singleton.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(322);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1926);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1058);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(695);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1059);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(1060);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(694);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(1061);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(1062);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.tde=void 0;var n,i=r(322),o=r(695);(n=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).enterModule)&&n(e);var A={desc:"dummy",module:function(){return this},defineCase:function(){return this}};function a(e,t){try{return i.tci.enabled?o.TestDesign.create(e,t):A}catch(e){return A}}var s,u,c={design:a};t.tde=c,(s=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).default)&&(s.register(A,"DUMMY_DESIGN","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(a,"design","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(c,"tde","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js")),(u=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).leaveModule)&&u(e)}).call(this,r(24)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1928);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1929);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1064);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1065);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1930);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Service=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var Service=function(){function Service(){_classCallCheck(this,Service)}return _createClass(Service,[{key:"getId",value:function(){return this.id}},{key:"onAdd",value:function(e,t){if(!this.center||this.center!==e){if(!e||!t)throw new Error("CUSTOM: Registe a invalid service!");if("string"!=typeof t&&!(this instanceof t))throw new Error("CUSTOM: Registe a service whose decl is not compatible with impl!");this.center&&this.center.rem(this.id),this.center=e,this.id=t}}},{key:"onRem",value:function(e,t){this.center===e&&(this.center=void 0,this.id=void 0)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),Service}(),reactHotLoader,leaveModule;exports.Service=Service,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&reactHotLoader.register(Service,"Service","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/Service.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceApplication=exports.DynamicServiceApplication=void 0;var _PluginApplication2=__webpack_require__(696),_util=__webpack_require__(79),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var DynamicServiceApplication=function(_PluginApplication){_inherits(DynamicServiceApplication,_PluginApplication);var _super=_createSuper(DynamicServiceApplication);function DynamicServiceApplication(e,t,r){var n;return _classCallCheck(this,DynamicServiceApplication),(n=_super.call(this,t,r||e.getPlugin())).framework=e,n}return _createClass(DynamicServiceApplication,[{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppRunning(e)}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppExited(e)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments)}}))}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),DynamicServiceApplication}(_PluginApplication2.PluginApplication);exports.DynamicServiceApplication=DynamicServiceApplication;var ServiceApplication=function(_DynamicServiceApplic){_inherits(ServiceApplication,_DynamicServiceApplic);var _super2=_createSuper(ServiceApplication);function ServiceApplication(e,t){return _classCallCheck(this,ServiceApplication),_super2.call(this,e,t)}return _createClass(ServiceApplication,[{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"postInit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppInited(e)}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),ServiceApplication}(DynamicServiceApplication),reactHotLoader,leaveModule;exports.ServiceApplication=ServiceApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(DynamicServiceApplication,"DynamicServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js"),reactHotLoader.register(ServiceApplication,"ServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceContainerApplication=exports.ContainerStaticContext=exports.EDynamicPolicy=exports.EAppOrder=void 0;var _PluginApplication2=__webpack_require__(696),_util=__webpack_require__(79),_ServiceFramework=__webpack_require__(1065),enterModule,EAppOrder;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module),exports.EAppOrder=EAppOrder,function(e){e[e.LOW=1]="LOW",e[e.NORMAL=500]="NORMAL",e[e.HIGH=1e3]="HIGH"}(EAppOrder||(exports.EAppOrder=EAppOrder={}));var defaultRegisteOptions=function(){return{order:EAppOrder.NORMAL,dependencies:[]}},EDynamicPolicy;exports.EDynamicPolicy=EDynamicPolicy,function(e){e[e.DEFAULT=1]="DEFAULT",e[e.DELAY=2]="DELAY",e[e.DEFFERED=3]="DEFFERED"}(EDynamicPolicy||(exports.EDynamicPolicy=EDynamicPolicy={}));var defaultRegisteDynamicOptions=function(){return{policy:EDynamicPolicy.DEFAULT,delay:0,dependencies:[]}},ContainerStaticContext=function(){function ContainerStaticContext(){_classCallCheck(this,ContainerStaticContext),this.appDescs=[],this.dynamicAppDescs=[],this.serviceDescs=new Map}return _createClass(ContainerStaticContext,[{key:"addDependentPlugins",value:function(e){var t=void 0;this.pluginClass?t=this.pluginClass.dependencies:(this.tempDeps||(this.tempDeps=[]),t=this.tempDeps),e.forEach((function(e){t.includes(e)||t.push(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}},{key:"pluginClass",get:function(){return this._pluginClass},set:function(e){if(this._pluginClass)throw new Error("CUSTOM: Plugin of container application has been set");if(this._pluginClass=e,this.tempDeps){var t=this._pluginClass.dependencies;this.tempDeps.forEach((function(e){t.includes(e)||t.push(e)})),this.tempDeps=void 0}}}]),ContainerStaticContext}();exports.ContainerStaticContext=ContainerStaticContext;var containerStaticContexts=new Map;function getContainerStaticContext(e){var t=containerStaticContexts.get(e);return t||(t=new ContainerStaticContext,containerStaticContexts.set(e,t)),t}function generateContainerAnnotations(e){var t=getContainerStaticContext(e);return{registe:function(e,r){if(t.appDescs.findIndex((function(t){return t.create===e}))>=0)throw new Error("CUSTOM: ServiceApplication registe twice!");return r=r?Object.assign(defaultRegisteOptions(),r):defaultRegisteOptions(),t.appDescs.push({create:e,options:r}),t.addDependentPlugins(r.dependencies||[]),function(e){}},registeDynamic:function(e,r,n){if(t.dynamicAppDescs.findIndex((function(t){return t.id===e}))>=0)throw new Error("CUSTOM: DynamicServiceApplication registe twice!");return n=n?Object.assign(defaultRegisteDynamicOptions(),n):defaultRegisteDynamicOptions(),t.dynamicAppDescs.push({create:r,id:e,options:n}),t.addDependentPlugins(n.dependencies||[]),function(e){}},service:function(e,r){if(!e||!r)throw new Error("CUSTOM: decl or provider of service is invalid!");return function(n){var i=t.serviceDescs.get(r);if(i||(i=[],t.serviceDescs.set(r,i)),i.some((function(t){return t.id===e})))throw new Error("CUSTOM: id of service conflict!");i.push({id:e,impl:n})}}}}var ServiceContainerApplication=function(_PluginApplication){_inherits(ServiceContainerApplication,_PluginApplication);var _super=_createSuper(ServiceContainerApplication);function ServiceContainerApplication(e,t){var r;_classCallCheck(this,ServiceContainerApplication),(r=_super.call(this,e,t)).apps=[];var n=r.getStaticContext();if(!(n.pluginClass&&t instanceof n.pluginClass))throw new Error("CUSTOM: Plugin of container application is invalid");return r}return _createClass(ServiceContainerApplication,[{key:"getStaticContext",value:function(){return getContainerStaticContext(this.constructor)}},{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"initApps",value:function(){var e=this,t=this.getStaticContext().appDescs;t.sort((function(e,t){return t.options.order-e.options.order})),t.forEach((function(t){_util.Util.safeExec((function(){e.apps.push(t.create(e.framework))}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.prevInit()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.init()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.postInit()}),!0)}))}},{key:"runApps",value:function(){this.apps.forEach((function(e){_util.Util.safeExec((function(){e.run()}),!0)}))}},{key:"exitApps",value:function(){this.apps.slice().reverse().forEach((function(e){_util.Util.safeExec((function(){e.exit()}),!0)})),this.apps=[]}},{key:"tryStartDynamicApplications",value:function(){var e=this;Promise.resolve().then((function(){e.getStaticContext().dynamicAppDescs.forEach((function(t){_util.Util.safeExec((function(){t.options.policy===EDynamicPolicy.DEFFERED?e.framework.startDynamicApp(t.id):t.options.policy===EDynamicPolicy.DELAY&&setTimeout((function(){e.framework.startDynamicApp(t.id)}),t.options.delay)}),!0)}))}))}},{key:"initFramework",value:function(){var e=this.options.coreClass&&this.options.coreClass.ServiceFramework||_ServiceFramework.ServiceFramework;this.framework=new e(this),this.framework.init()}},{key:"releaseFramework",value:function(){this.framework&&this.framework.release()}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework&&this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.initApps(),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.runApps(),e.framework.setAppRunning(e),e.tryStartDynamicApplications()}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){e.framework.setAppExited(e),e.exitApps(),t.apply(e,arguments)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){e.initFramework(),t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments),e.releaseFramework()}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"setPluginClass",value:function(e){getContainerStaticContext(this).pluginClass=e}},{key:"generateAnnotations",value:function(){return generateContainerAnnotations(this)}}]),ServiceContainerApplication}(_PluginApplication2.PluginApplication),reactHotLoader,leaveModule;exports.ServiceContainerApplication=ServiceContainerApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(EAppOrder,"EAppOrder","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteOptions,"defaultRegisteOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(EDynamicPolicy,"EDynamicPolicy","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteDynamicOptions,"defaultRegisteDynamicOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ContainerStaticContext,"ContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(containerStaticContexts,"containerStaticContexts","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(getContainerStaticContext,"getContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(generateContainerAnnotations,"generateContainerAnnotations","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ServiceContainerApplication,"ServiceContainerApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1066);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1932);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1067);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1068);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1933);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Monitor=void 0;var _AXR2=__webpack_require__(837),_Collector=__webpack_require__(416),_IdleWorker=__webpack_require__(1066),_PerfLog=__webpack_require__(1067),_TimeLog=__webpack_require__(1068),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function defaultSendLog(e,t){console.log(e,t)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var Monitor=function(_AXR){_inherits(Monitor,_AXR);var _super=_createSuper(Monitor);function Monitor(){var e;return _classCallCheck(this,Monitor),(e=_super.apply(this,arguments)).perfLog=e.partialCreator.create(_PerfLog.PerfLog),e.idleWorker=e.partialCreator.create(_IdleWorker.IdleWorker),e.timeLog=e.partialCreator.create(_TimeLog.TimeLog),e}return _createClass(Monitor,[{key:"module",value:function(){return"monitor"}},{key:"init",value:function(){_get(_getPrototypeOf(Monitor.prototype),"init",this).call(this),this.collector||(this.collector=Monitor.getDefaultCollector()),this.sendLog||(this.sendLog=defaultSendLog)}},{key:"addConfig",value:function(e){var t=this,r=e.sendLog,n=e.collector,i=e.timeLogConfig,o=e.perfLogConfig;r&&(this.sendLog=r),n&&(this.collector=n),i&&this.timeLog.addConfig(i),o&&o.forEach((function(e){return t.perfLog.addConfig(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"getDefaultCollector",value:function(){return Monitor.collector||(Monitor.collector=new _Collector.Collector,Monitor.collector.init()),Monitor.collector}}]),Monitor}(_AXR2.AXR),reactHotLoader,leaveModule;exports.Monitor=Monitor,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(defaultSendLog,"defaultSendLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js"),reactHotLoader.register(Monitor,"Monitor","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BehaviorsLog=exports.BehaviorsLogCore=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var BehaviorsLogCore=function(){function BehaviorsLogCore(e){_classCallCheck(this,BehaviorsLogCore),this.toolName=e.toolName,this.designId=e.designId,this.userId=e.userId,this.levelId=e.levelId,this.toolVersion=e.toolVersion,this.errorHandler=e.errorHandler}return _createClass(BehaviorsLogCore,[{key:"valueParser",value:function(e){return"function"==typeof e?e():e}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId;BehaviorsLog.log({type:r,description:i,toolName:t||this.valueParser(this.toolName),toolVersion:n||this.valueParser(this.toolVersion),userId:o||this.valueParser(this.userId),designId:A||this.valueParser(this.designId),levelId:a||this.valueParser(this.levelId),errorHandler:this.errorHandler})}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BehaviorsLogCore}();exports.BehaviorsLogCore=BehaviorsLogCore;var BehaviorsLog=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"create",value:function(e){return new BehaviorsLogCore(e)}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId,s=e.errorHandler;try{fetch("https://actionstat.kujiale.com/api/toolbehaviors/".concat(r,"/log"),{method:"POST",body:JSON.stringify({description:i,toolName:t,toolVersion:n,ua:null===navigator||void 0===navigator?void 0:navigator.userAgent,userId:o,designId:A,levelId:a,behavior:r}),headers:{"content-type":"application/json"}})}catch(e){"function"==typeof s&&s(e)}}}]),e}(),reactHotLoader,leaveModule;exports.BehaviorsLog=BehaviorsLog,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(BehaviorsLogCore,"BehaviorsLogCore","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js"),reactHotLoader.register(BehaviorsLog,"BehaviorsLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TOLERANCE=t.SIN_THETA_ZERO_TOLERANCE=t.RADIANS_TOLERANCE=t.DEGREES_TOLERANCE=t.DISTANCE_TOLERANCE=t.SIZE_TOLERANCE=t.NUMBER_TOLERANCE=void 0;var n=r(3);t.NUMBER_TOLERANCE=1e-6;t.SIZE_TOLERANCE=.1;t.DISTANCE_TOLERANCE=1;t.DEGREES_TOLERANCE=1;var i=Math.PI/180;t.RADIANS_TOLERANCE=i;var o=Math.sin(i);t.SIN_THETA_ZERO_TOLERANCE=o;var A=new n.Tolerance.Tolerance(Math.cos(i),1,1e-6);t.TOLERANCE=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhysicalModel=void 0;var n=r(3),i=r(321),o=v(r(188)),A=v(r(141)),a=v(r(358)),s=v(r(68)),u=v(r(98)),c=v(r(207)),l=v(r(531)),g=v(r(44)),f=v(r(113)),h=v(r(16)),p=v(r(5)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==w(e)&&"function"!=typeof e)return{default:e};var r=B(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(n,o,A):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(99)),I=r(418),y=r(697),C=r(1072),E=r(1938);function B(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(B=function(e){return e?r:t})(e)}function v(e){return e&&e.__esModule?e:{default:e}}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Q(e,t){return(Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=S(e);if(t){var i=S(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _(this,r)}}function _(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var D,R,M,x,P,T,F,O,L,k,N,G=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":w(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},U=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":w(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q(e,t)}(A,e);var t,r,i,o=b(A);function A(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A),(e=o.call(this)).position=new p.default(0,0,0),e.rotation=new p.default(0,0,0),e.scale=new p.default(1,1,1),e.size=new p.default(1,1,1),e.translation=new p.default,e.center=new p.default,e}return t=A,(r=[{key:"getBoundingBox2",value:function(){return this.getBox2().getBoundingBox()}},{key:"getBoundingBox3",value:function(){return this.getBox3().getBoundingBox()}},{key:"getPolygon",value:function(){return this.getBox2().getPolygon()}},{key:"getBox2",value:function(){return this.box2||(this.box2=new a.default(new h.default(this.getScaledSize()),new h.default(this.getPosition()),this.getRotation().z)),this.box2}},{key:"getBox3",value:function(){return this.box3||(this.box3=new s.default(this.getScaledSize(),this.getPosition(),this.getRotation())),this.box3}},{key:"getMatrix4",value:function(){return this.matrix4||(this.matrix4=(new g.default).compose(this.getPosition(),(new u.default).setFromVector3(this.getRotation()),this.getScale())),this.matrix4}},{key:"setMatrix4",value:function(e){var t=new p.default,r=new u.default(0,0,0),n=new p.default;e.decompose(t,r,n),this.position=t,this.rotation=(new p.default).setXYZ(r),this.scale=n}},{key:"getConcatenatedMatrix",value:function(){return this.getMatrix4()}},{key:"getConcatenatedBox3",value:function(){return this.getBox3()}},{key:"getMatrix3",value:function(){return this.matrix3||(this.matrix3=(new l.default).compose(new h.default(this.getPosition()),this.getRotation().z,new h.default(this.getScale()))),this.matrix3}},{key:"getTop",value:function(){return this.position.z+this.getScaledSize().z/2}},{key:"getBottom",value:function(){return this.position.z-this.getScaledSize().z/2}},{key:"getHeightRange",value:function(){return new c.default(this.getBottom(),this.getTop())}},{key:"getScaledSize",value:function(){return p.default.mul(this.getSize(),this.getScale())}},{key:"getScale",value:function(){return this.scale}},{key:"setScale",value:function(e){if((0,C.equalsNumber3)(this.scale,e))return this;var t=Object.assign(Object.assign({},this.scale),e),r=(0,C.checkNotZero)(t.x),n=(0,C.checkNotZero)(t.y),i=(0,C.checkNotZero)(t.z),o=(0,C.hackScaleValue)(r),A=(0,C.hackScaleValue)(n),a=(0,C.hackScaleValue)(i);return this.scale=new p.default(o,A,a),o===r&&A===n&&a===i||I.LOGGER.logError(new Error("illegal setScale ".concat(this.getId(),",error val is x:").concat(r,",y:").concat(n,",z:").concat(i))),this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(e){if((0,C.equalsNumber3)(this.size,e))return this;var t=Object.assign(Object.assign({},this.size),e),r=t.x,n=t.y,i=t.z;return this.size=new p.default((0,C.hackSizeValue)(r),(0,C.hackSizeValue)(n),(0,C.hackSizeValue)(i)),this}},{key:"getRotation",value:function(){return this.rotation}},{key:"setRotation",value:function(e){return(0,C.equalsNumber3)(this.rotation,e)||(this.rotation=new p.default(Object.assign(Object.assign({},this.rotation),e))),this}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){if((0,C.equalsNumber3)(this.position,e))return this;var t=e.x,r=e.y,n=e.z;return void 0!==t&&(0,y.checkNumberAndLog)(t,"setPositionX"),void 0!==r&&(0,y.checkNumberAndLog)(r,"setPositionY"),void 0!==n&&(0,y.checkNumberAndLog)(n,"setPositionZ"),this.position=new p.default(Object.assign(Object.assign({},this.position),e)),this}},{key:"getTranslation",value:function(){return this.translation}},{key:"setTranslation",value:function(e){return this.translation=e,this}},{key:"getCenter",value:function(){return this.center}},{key:"setCenter",value:function(e){return this.center=e,this}},{key:"isSizeNaN",value:function(){return isNaN(this.size.x)||isNaN(this.size.y)||isNaN(this.size.z)}},{key:"isScaled",value:function(){return!this.scale.nearEquals(p.default.ONE)}},{key:"localToGlobal",value:function(e){var t=this.getConcatenatedMatrix(),r=e.clone();return r.applyMatrix4(t),r}},{key:"globalToLocal",value:function(e){var t=(new g.default).getInverse(this.getConcatenatedMatrix()),r=e.clone();return r.applyMatrix4(t),r}},{key:"globalToLocal2d",value:function(e){var t=e.clone(),r=new p.default(t.x,t.y,0),i=this.globalToLocal(r);return new n.Point2d(i.x,i.y)}},{key:"localToGlobal2d",value:function(e){var t=e.clone(),r=new p.default(t.x,t.y,0),i=this.localToGlobal(r);return new n.Point2d(i.x,i.y)}},{key:"afterSet",value:function(e,t,r){t===E.ModelPropertyType.Physical&&(this.matrix3=void 0,this.matrix4=void 0,this.box3=void 0,this.box2=void 0)}}])&&m(t.prototype,r),i&&m(t,i),A}(d.default);t.PhysicalModel=j,G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(D=void 0!==p.default&&p.default)?D:Object)],j.prototype,"position",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(R=void 0!==p.default&&p.default)?R:Object)],j.prototype,"rotation",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(M=void 0!==p.default&&p.default)?M:Object)],j.prototype,"scale",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(x=void 0!==p.default&&p.default)?x:Object)],j.prototype,"size",void 0),G([(0,d.property)(p.default.isEqual),U("design:type","function"==typeof(P=void 0!==p.default&&p.default)?P:Object)],j.prototype,"translation",void 0),G([(0,d.property)(p.default.isEqual),U("design:type","function"==typeof(T=void 0!==p.default&&p.default)?T:Object)],j.prototype,"center",void 0),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(F=void 0!==o.default&&o.default)?F:Object)],j.prototype,"getBoundingBox2",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(O=void 0!==A.default&&A.default)?O:Object)],j.prototype,"getBoundingBox3",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(L=void 0!==f.default&&f.default)?L:Object)],j.prototype,"getPolygon",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getBox2",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getBox3",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(k=void 0!==p.default&&p.default)?k:Object)],j.prototype,"getScale",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getSize",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(N=void 0!==p.default&&p.default)?N:Object)],j.prototype,"getRotation",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getPosition",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getTranslation",null)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkNumberAndLog=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(void 0===e)return void n.LOGGER.logError(new Error("".concat(t," undefined number: ").concat(e)));if(!Number.isFinite(e))return void n.LOGGER.logError(new Error("".concat(t," Infinity number: ").concat(e)));if("string"==typeof e)return void n.LOGGER.logError(new Error("".concat(t," string number: ").concat(e)));if(isNaN(e))return void n.LOGGER.logError(new Error("".concat(t," NaN number: ").concat(e)))};var n=r(418)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setOnCheckParamErrorCallBack=function(e){u=e},t.checkParamAndLog=function(e,t,r){c(e,t)&&s(e,t,r)},t.checkParsedValueAndLog=function(e,t,r){l(e,t)&&s(e,t,r)},t.checkParam=c,t.checkParsedValue=l;var n,i=r(2),o=r(10),A=r(418),a=(n=r(1070))&&n.__esModule?n:{default:n};function s(e,t,r){var n=r.action,i=r.oldValue,o=r.paramName;A.LOGGER.logError(new Error("action: ".concat(n," invalid ").concat(e," type value, paramName: ").concat(o,", value: ").concat(JSON.stringify(t),", ").concat(t,", oldValue: ").concat(i))),u(o,e,t,n)}var u=i.noop;function c(e,t){var r=!1;try{switch(e){case o.ParamType.FLOAT:var n=(0,a.default)(e,t);("number"!=typeof n||isNaN(n))&&(r=!0);break;case o.ParamType.INT:var A=(0,a.default)(e,t);("number"!=typeof A||isNaN(A))&&(r=!0),(0,i.isInteger)(A)&&!t.includes(".")||(r=!0);break;case o.ParamType.MATERIAL:case o.ParamType.SHAPE:var s=Number(t);(0,i.isInteger)(s)||(r=!0);break;case o.ParamType.BOOLEAN:"true"!==t&&"false"!==t&&(r=!0);break;case o.ParamType.STYLE:var u=(0,a.default)(e,t);"bgId"in u&&"versionId"in u||(r=!0),"number"==typeof u.bgId&&"number"==typeof u.versionId||(r=!0)}}catch(e){r=!0}return r}function l(e,t){var r=!1;try{switch(e){case o.ParamType.FLOAT:("number"!=typeof t||isNaN(t))&&(r=!0);break;case o.ParamType.INT:("number"!=typeof t||isNaN(t))&&(r=!0),(0,i.isInteger)(t)||(r=!0);break;case o.ParamType.MATERIAL:case o.ParamType.SHAPE:(0,i.isInteger)(Number(t))||(r=!0);break;case o.ParamType.BOOLEAN:"boolean"!=typeof t&&(r=!0);break;case o.ParamType.STYLE:"bgId"in t&&"versionId"in t||(r=!0),"number"==typeof t.bgId&&"number"==typeof t.versionId||(r=!0);break;case o.ParamType.STRING:"string"!=typeof t&&(r=!0)}}catch(e){r=!0}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelPropertyType=void 0;var n={Physical:Symbol("Physical"),Hole:Symbol("Hole"),NEED_CHANGED_EVENT:Symbol("NEED_CHANGED_EVENT")};t.ModelPropertyType=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamBizProperty=void 0;var n=r(1940);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.paramKey=t.key,this.namespace=t.namespace,this.name=t.name,this.value=t.value,this.valueType=t.valueType}var t,r,o;return t=e,(r=[{key:"getParsedValue",value:function(){switch(this.valueType){case n.ParamBizValueType.boolean:case n.ParamBizValueType.int:case n.ParamBizValueType.float:return JSON.parse(this.value);default:return this.value}}},{key:"getName",value:function(){return this.name}},{key:"getValue",value:function(){return this.value}},{key:"getParamKey",value:function(){return this.paramKey}},{key:"getData",value:function(){return this.data}}])&&i(t.prototype,r),o&&i(t,o),e}();t.ParamBizProperty=o},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ParamBizValueType=void 0,t.ParamBizValueType=n,function(e){e.boolean="boolean",e.float="float",e.int="int"}(n||(t.ParamBizValueType=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseVector2=c,t.parseVector3=l,t.parseShape3=function(e){var t=new s.default,r=[];return e.curves.forEach((function(e){if("RevitLine3D"===e.type){var t=e;r.push(new a.default(l(t.start),l(t.end)))}else if("RevitArc3D"===e.type){var i=e,o=new n.default(l(i.position),l(i.xDirection),l(i.yDirection));r.push(new A.default(o,c(i.center),i.radius,i.startAngle,i.arcAngle))}})),t.setRevitCurves(r)},t.RevitArc3Data=void 0;var n=u(r(242)),i=u(r(16)),o=u(r(5)),A=u(r(699)),a=u(r(516)),s=u(r(1078));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){return e?new i.default(e):void 0}function l(e){return e?new o.default(e):void 0}t.RevitArc3Data=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=""}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(722),i=r(78),o=r(112),A=r(339),a=r(102),s=r(16),u=function(){function e(e,t,r,n){this.center=e,this.radius=t,this.startAngle=r,this.arcAngle=n}return e.prototype.getAngleAtT=function(e){return this.startAngle+e*this.arcAngle},e.prototype.getPointAtT=function(e){return this.getPointByAngle(this.getAngleAtT(e))},e.prototype.getLengthAtT=function(e){var t=this.arcAngle;return this.radius*(Math.abs(t)*e)},e.prototype.getTByLength=function(e){var t=this.arcAngle;return e/this.radius/Math.abs(t)},e.prototype.getAngleByPoint=function(e){var t=this.getCircle().getAngle(e),r=this.getTByAngle(t);return this.getAngleAtT(r)},e.prototype.getTByAngle=function(e){var t=this.startAngle,r=this.arcAngle,n=A.default.normalize(e),i=A.default.normalize(t),o=A.default.normalize(t+r),a=!this.isClockwise(),s=i>o;if(s&&a||!s&&!a){var u=A.default.normalize(n-i);return u>Math.abs(r)&&(u=A.TWO_PI-u),u/Math.abs(r)}return(n-i)/r},e.prototype.getPointByAngle=function(e){var t=this.center,r=this.radius;return s.default.add(t,new s.default(r*Math.cos(e),r*Math.sin(e)))},e.prototype.isAngleInArc=function(e){var t=this.startAngle,r=this.arcAngle,n=A.default.normalize(e),i=A.default.normalize(t),o=A.default.normalize(t+r),a=Math.min(i,o),s=Math.max(i,o),u=r>0,c=i<o;return u&&c||!u&&!c?n>=a&&n<=s:n<=a||n>=s},e.prototype.getApproximatePoints=function(e){void 0===e&&(e=.3);var t=[],r=[new s.default(0,1)];if(0===this.radius||0===this.arcAngle)return t;for(;0!==r.length;){var n=r.pop(),i=.5*(n.x+n.y),A=new o.default(this.getPointAtT(n.x),this.getPointAtT(n.y)).signedDistanceFromPoint(this.getPointAtT(i));Math.abs(A)<e?t.push(this.getPointAtT(n.x)):r.push(new s.default(i,n.y),new s.default(n.x,i))}return t.push(this.getPointAtT(1)),t},e.prototype.getPointsByIncrement=function(e){if(e<=0)throw new Error("Increment must be greater than zero: "+e);var t,r=[];for(t=0;t<=1;t+=e)r.push(this.getPointAtT(t));return a.default.isEqual(t,1,.5*e)||r.push(this.getPointAtT(1)),r},e.prototype.getNearestPoint=function(e){var t=this.center,r=s.default.sub(e,t).angle();if(!this.isAngleInArc(r)){var n=this.getPointAtT(0),i=this.getPointAtT(1);return e.distance(n)<e.distance(i)?n:i}return this.getPointByAngle(r)},e.prototype.getPointSide=function(e){var t=this.center,r=this.radius,n=this.arcAngle,i=e.distance(t),o=-1;return a.default.isEqual(i,r)?o=0:i<r&&(o=1),0===(o*=Math.sign(n))?"ON_CURVE":o>0?"ON_LEFT":"ON_RIGHT"},e.prototype.getDistance=function(e,t){return void 0===t&&(t=!0),Math.abs(this.getSignedDistance(e,t))},e.prototype.getSignedDistance=function(e,t){var r;if(void 0===t&&(t=!0),t)r=this.getNearestPoint(e);else{var n=this.getAngleByPoint(e);r=this.getCircle().getPoint(n)}var i=e.distance(r);return"ON_LEFT"===this.getPointSide(e)?-i:i},e.prototype.isPointOnArcCurveInclusive=function(e,t){if(void 0===t&&(t=i.NUMBER_TOLERANCE),!this.getCircle().isPointOnCircle(e,t))return!1;var r=s.default.sub(e,this.center).angle();return this.isAngleInArc(r)},e.prototype.isPointOnArcCurveExclusive=function(e,t){return void 0===t&&(t=i.NUMBER_TOLERANCE),this.isPointOnArcCurveInclusive(e,t)&&!this.isPointOnArcEnds(e,t)},e.prototype.isPointOnArcEnds=function(e,t){return void 0===t&&(t=i.NUMBER_TOLERANCE),this.getPointAtT(0).nearEquals(e,t)||this.getPointAtT(1).nearEquals(e,t)},e.prototype.isClockwise=function(){return this.arcAngle<0},e.prototype.getBulge=function(){return Math.tan(this.arcAngle/4)},e.prototype.getCircle=function(){return new n.default(this.center,this.radius)},e.prototype.clone=function(){return new e(this.center.clone(),this.radius,this.startAngle,this.arcAngle)},e.fromChordAndBulge=function(t,r){var n=t.start,i=t.length(),o=t.getCenter(),a=Math.sign(r),u=a*r,c=4*Math.atan(u),l=i/2/Math.tan(c/2),g=t.getVector().rotate(a*A.HALF_PI).normalize(),f=s.default.add(o,g.mul(l)),h=s.default.sub(n,f);return new e(f,h.length(),h.angle(),a*c)},e}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShape3=function(e){return{curves:e.getRevitCurves().map((function(e){if(e instanceof o.default)return{start:a(e.getStartPoint()),end:a(e.getEndPoint()),type:"RevitLine3D"};if(e instanceof i.default){var t=e.getRectFace();return{center:(r=e.getCenter(),(0,n.pick)(r,"x","y")),radius:e.getRadius(),startAngle:e.getStartAngle(),arcAngle:e.getArcAngle(),position:a(t.origin),xDirection:a(t.directionU),yDirection:a(t.directionV),type:"RevitArc3D"}}var r}))}};var n=r(2),i=A(r(699)),o=A(r(516));function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return(0,n.pick)(e,"x","y","z")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatParamValue=function(e,t){switch(e){case i.default.FLOAT:return A(t);case i.default.FLOAT2:case i.default.FLOAT3:return function(e){return e.toArray().map(A).join(",")}(t);case i.default.FLOAT3_BUFFER:return function(e){return e.map((function(e){return e.toArray().map(A).join(",")})).join(";")}(t);case i.default.INT:return function(e){return e.toFixed()}(t);case i.default.BOOLEAN:return function(e){return e.toString()}(t);case i.default.STYLE:case i.default.FIT:return function(e){return JSON.stringify(e)}(t);case i.default.BOOLEAN_LIST:return function(e){return parseInt((0,o.reverseStr)(e),2).toString()}(t)}return t},t.FRACTION_DIGITS=void 0;var n,i=(n=r(590))&&n.__esModule?n:{default:n},o=r(1071);function A(e){return e.toString()}t.FRACTION_DIGITS=1},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(21),i=void 0,o={},A={saveLog:function(){var e=function(){n.Util.safeExec((function(){i=void 0;var e=Object.values(o);if(e.length){var t=function(e){var t="",r=[];return e.forEach((function(e){var n=e[0];r.push(n.modelId+(n.rootModelId?">"+n.rootModelId:"")),t+="".concat(n.modelName," ").concat(n.rootModelName?">"+n.rootModelName:""," change param {"),e.forEach((function(e){t+="".concat(e.paramName,": ").concat(e.prevVal," to ").concat(e.nextVal,"。 ")})),t+="}; "})),{logContent:t,modelIds:r}}(e),r=t.modelIds,A=t.logContent;(0,n.getLocalLogger)().add({module:"params",logLevel:n.LocalLogLevel.Info,entityIds:r,type:n.LogType.Data,content:A})}o={}}),!1)};n.Util.safeExec((function(){i&&window.cancelIdleCallback(i),i=window.requestIdleCallback(e)}),!1)},collectParams:function(e,t,r){n.Util.safeExec((function(){if(r&&e.value!==t.value){var n=r.getId();o[n]||(o[n]=[]);var i=r.getRoot();o[n].push({paramName:t.name,modelId:n,modelName:r.getName(),rootModelId:i!==r?i.getId():void 0,rootModelName:i!==r?i.getName():void 0,prevVal:e.value,nextVal:t.value})}}),!1)}};t.default=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCommonOverrideData=u,t.setCommonOverrideData=function(e,t){var r=u(e);if(!r)return(0,i.set)(e,"commonOverrideAttr",JSON.stringify(t));var a=Object.assign({},r);function s(e,t){var r=o(e);return r.reverse(),(0,n.uniqBy)(r,(function(e){return JSON.stringify(t.map((function(t){return e[t]})))})).reverse()}return Object.entries(t).forEach((function(e){var t,r=A(e,2),n=r[0],i=r[1];a[n]?(t=a[n]).push.apply(t,o(i)):a[n]=i})),Object.entries(a).forEach((function(e){var t=A(e,2),r=t[0],n=t[1];"modelAttr"===r?a[r]=s(n,["attrName","setBizType"]):"modelParamAttr"===r&&(a[r]=s(n,["attrName","attrName","setBizType"]))})),(0,i.set)(e,"commonOverrideAttr",JSON.stringify(a))},t.delCommonOverrideData=function(e,t,r){var o=u(e)||{},a=o[t];if(!a)return;return(0,n.remove)(a,(function(e){return Object.entries(r).every((function(t){var r=A(t,2),n=r[0];return r[1]===e[n]}))})),0===Object.keys(o).length||Object.values(o).every((function(e){return 0===e.length}))?(0,i.del)(e,"commonOverrideAttr"):(0,i.set)(e,"commonOverrideAttr",JSON.stringify(o))},t.COMMON_OVERRIDE_ATTR_KEY=void 0;var n=r(2),i=r(1947);function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,i,o=[],A=!0,a=!1;try{for(r=r.call(e);!(A=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);A=!0);}catch(e){a=!0,i=e}finally{try{A||null==r.return||r.return()}finally{if(a)throw i}}return o}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=(0,i.get)(e,"commonOverrideAttr");if(r)try{var n=JSON.parse(r);return t?Object.entries(n).reduce((function(e,r){var n=A(r,2),i=n[0],o=n[1];return e[i]=o.filter((function(e){return e.setBizType===t})),e}),{}):n}catch(e){}}t.COMMON_OVERRIDE_ATTR_KEY="commonOverrideAttr"},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,i,o=[],A=!0,a=!1;try{for(r=r.call(e);!(A=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);A=!0);}catch(e){a=!0,i=e}finally{try{A||null==r.return||r.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.get=function(e,t){var r=i(a(e,t),1)[0];return r&&r.data},t.del=function(e,t){var r=i(a(e,t),4),o=r[0],s=r[1],u=r[2],c=r[3];if(o)return s.splice(c,1),e.setBizProperties(Object.assign(Object.assign({},u),n({},A,JSON.stringify(s)))),!0},t.set=function(e,t,r){var o=i(a(e,t),3),s=o[0],u=o[1],c=o[2];s?s.data=r:u&&u.push({bizType:t,data:r});e.setBizProperties(Object.assign(Object.assign({},c),n({},A,JSON.stringify(u||[{bizType:t,data:r}]))))};var A="com.neican.extpoint.build.afterbuildbypmd";function a(e,t){var r=e.getBizProperties();if(r){var n;try{n=JSON.parse(r[A])}catch(e){}if(Array.isArray(n)){for(var i,o=n.length;o;)if((i=n[--o])&&i.bizType===t)return[i,n,r,o];return[void 0,n,r]}return[void 0,void 0,r]}return[]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeWireGeometry=function(e,t){for(var r,n,o=e?e.coordinates:[],A=e?e.coordinatesIndex:[],a=t||new i.default,s=0;s<A.length-1;s+=2)r=3*A[s],n=3*A[s+1],a.vertices.push(o[r],o[r+1],o[r+2],o[n],o[n+1],o[n+2]);return a};var n,i=(n=r(1087))&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseZoneDivisionData=function(e){return function e(t){var r=Object.assign(Object.assign({},t),{size:new o.default(t.size.x,t.size.y,t.size.z),position:new o.default(t.position.x,t.position.y,t.position.z)});return t.zoneDivisions&&t.zoneDivisions.length&&(r.zoneDivisions=t.zoneDivisions.map((function(t){return e(t)}))),r}(e)},t.ZoneDivisionType=void 0;var n,i,o=(n=r(5))&&n.__esModule?n:{default:n};t.ZoneDivisionType=i,function(e){e.X="X",e.Y="Y",e.Z="Z"}(i||(t.ZoneDivisionType=i={}))},function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterAssignment=t.SourceObjectType=void 0,t.SourceObjectType=i,function(e){e[e.MODEL=0]="MODEL",e[e.DRAIN_HOLE=1]="DRAIN_HOLE",e[e.FAUCET_HOLE=2]="FAUCET_HOLE",e[e.AUX_HOLE=3]="AUX_HOLE"}(i||(t.SourceObjectType=i={}));var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,i;return t=e,(r=[{key:"getModel",value:function(){return this.model}},{key:"setModel",value:function(e){return this.model=e,this}},{key:"getName",value:function(){return this.name}},{key:"setName",value:function(e){return this.name=e,this}},{key:"getCategory",value:function(){return this.category}},{key:"setCategory",value:function(e){return this.category=e,this}},{key:"getSourceObjectType",value:function(){return this.sourceObjectType}},{key:"setSourceObjectType",value:function(e){return this.sourceObjectType=e,this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(e){return this.size=e,this}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){return this.position=e,this}},{key:"getRotate",value:function(){return this.rotate}},{key:"setRotate",value:function(e){return this.rotate=e,this}}])&&n(t.prototype,r),i&&n(t,i),e}();t.ParameterAssignment=o},function(e,t,r){"use strict";function n(e,t,r){if(e===t)return!0;if(e&&t&&e.length===t.length){for(var n=0,i=e.length;n<i;n++)if(r?!r(e[n],t[n]):e[n]!==t[n])return!1;return!0}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={equalsArray:n,equalsArrayBuffer:function(e,t){return e===t||!(!e||!t)&&n(new Float64Array(e),new Float64Array(t))},equalsBox3:function(e,t){return e===t||!(!e||!t)&&(e.getPosition().equals(t.getPosition())&&e.getSize().equals(t.getSize())&&e.getRotation().equals(t.getRotation()))},diffArray:function(e,t,r){t=t||[];var n=void 0,i=void 0,o=void 0,A=void 0;if(0===(e=e||[]).length)n=[],i=[],o=[],A=t.slice();else if(0===t.length)n=e.slice(),i=[],o=[],A=[];else{n=[],i=[],o=[],A=[];for(var a=void 0,s=void 0,u=void 0,c=0,l=Math.min(e.length,t.length);c<l;++c)if((s=e[c])!==(a=t[c])){if(r?r(s)!==r(a):s.id!==a.id){0!==c&&(e=e.slice(c),t=t.slice(c));break}i.push(s),o.push(a)}if(c===l){if(c<e.length)for(;c<e.length;)n.push(e[c]),++c;else if(c<t.length)for(;c<t.length;)A.push(t[c]),++c}else{for(var g={},f={},h=0,p=e.length;h<p;++h)s=e[h],g[u=r?r(s):s.id]=e[h];for(var d=0,I=t.length;d<I;++d)a=t[d],s=g[u=r?r(a):a.id],f[u]=a,s?s!==a&&(i.push(s),o.push(a)):A.push(a);for(var y=0,C=e.length;y<C;++y)s=e[y],(a=f[u=r?r(s):s.id])||n.push(s)}}return{removed:n,updatedOld:i,updatedNew:o,added:A}}};t.default=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={CoreCustomContext:!0,CoreParamModelAssemblyBackup:!0,CoreParamModelBackup:!0};Object.defineProperty(t,"CoreCustomContext",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"CoreParamModelAssemblyBackup",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"CoreParamModelBackup",{enumerable:!0,get:function(){return u.default}});var o=r(1953);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(208));Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=r(1958);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=c(r(703)),u=c(r(704));function c(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={DoorHoleData:!0,InnerFrameData:!0,MeshData:!0,ParamData:!0,ParamModelData:!0,ParamModelGroupData:!0,BaseParamModelData:!0};Object.defineProperty(t,"DoorHoleData",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"InnerFrameData",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"MeshData",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"ParamData",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"ParamModelData",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ParamModelGroupData",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"BaseParamModelData",{enumerable:!0,get:function(){return B.default}});var o=r(1954);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=r(1074);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=m(r(1076));Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=r(1079);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=m(r(1080));Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(1955);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(1956);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var g=m(r(1082));Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=m(r(419));Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(1088);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=r(1089);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var d=m(r(702));Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var I=m(r(701));Object.keys(I).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===I[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return I[e]}}))}));var y=r(1957);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var C=r(1083);Object.keys(C).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===C[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return C[e]}}))}));var E,B=(E=r(1073))&&E.__esModule?E:{default:E};function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(v=function(e){return e?r:t})(e)}function m(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=v(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}return i.default=e,r&&r.set(e,i),i}},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuleLimitData=void 0;t.RuleLimitData=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}},function(e,t,r){},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={InnerFrame:!0,DoorHole:!0,FitRule:!0,IntersectBox:!0,ParamPackage:!0,AutoGenerateConfig:!0,NamedValue:!0,ParamModelAttached:!0,IParamModelAttachedPartialPb:!0};Object.defineProperty(t,"InnerFrame",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"DoorHole",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"FitRule",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"IntersectBox",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"ParamPackage",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"AutoGenerateConfig",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"NamedValue",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ParamModelAttached",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"IParamModelAttachedPartialPb",{enumerable:!0,get:function(){return I.IParamModelAttachedPartialPb}});var o=r(1960);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=E(r(1081));Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=r(1075);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=E(r(698));Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=E(r(515));Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(1961);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=E(r(1086));Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var g=E(r(517));Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=r(518);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(1084);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=y(r(1085)),d=y(r(1962)),I=E(r(428));function y(e){return e&&e.__esModule?e:{default:e}}function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(C=function(e){return e?r:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=C(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}return i.default=e,r&&r.set(e,i),i}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RevitArc3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"RevitCurve3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"deltaTransformPoint",{enumerable:!0,get:function(){return o.deltaTransformPoint}}),Object.defineProperty(t,"RevitLine3",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"RevitShape3",{enumerable:!0,get:function(){return a.default}});var i=u(r(699)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(1077)),A=u(r(516)),a=u(r(1078));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseGeoReferenceData=function(e){var t,r=Object.assign(Object.assign({},e),{value:JSON.parse(e.value)});switch(r.type){case I.CCS3D:t=(0,n.deserialize)(Q,r);break;case I.CURVES:t=(0,n.deserialize)(b,r);break;case I.FACE:t=(0,n.deserialize)(_,r);break;case I.EXTRUSION:t=(0,n.deserialize)(S,r);break;default:t=(0,n.deserialize)(m,r)}return t},t.transformLocalGRPToWorldGRP=function(e,t){e instanceof Q?e.value=function(e,t){var r=e.toCCS();return r.transform(t),new i.CCS3dData(r)}(e.value,t):e instanceof b?e.value=w(e.value,t):e instanceof _?e.value=function(e,t){var r,n=e.surface.toSurface();n.transform(t),r=n instanceof i.Plane?new i.PlaneData(n):n instanceof i.CylindricalSurface?new i.CylindricalSurfaceData(n):n instanceof i.SurfaceOfLinearExtrusion?new i.SurfaceOfLinearExtrusionData(n):new i.SurfaceData(n);return e.surface=r,e.outLoop=w(e.outLoop,t),e.innerLoops=e.innerLoops.map((function(e){return w(e,t)})),e}(e.value,t):e instanceof S&&(e.value=function(e,t){var r=e.matrix.toMatrix();return r.premultiply(t),e.matrix=new i.Matrix4Data(r),e}(e.value,t));return e},t.GeoReferenceExtrusionData=t.GeoReferenceFaceData=t.GeoReferenceCurveData=t.GeoReferencePointData=t.BaseGeoReferenceData=t.GRPExtrusionData=t.GRPSurfaceData=t.GRPCurveData=t.GeoReferenceType=void 0;var n=r(17),i=r(3);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var g,f,h,p,d,I,y=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":l(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},C=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":l(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};t.GeoReferenceType=I,function(e){e.CCS3D="CCS3D",e.CURVES="CURVES",e.FACE="FACE",e.EXTRUSION="EXTRUSION"}(I||(t.GeoReferenceType=I={}));var E=function e(){c(this,e)};t.GRPCurveData=E,y([(0,n.JsonProperty)({class:i.BoundedCurve3dData,converter:i.DataConverter.BoundedCurve3dDatasConverter}),C("design:type",Array)],E.prototype,"curves",void 0);var B=function e(){c(this,e)};t.GRPSurfaceData=B,y([(0,n.JsonProperty)({converter:i.DataConverter.SurfaceDataConverter}),C("design:type","function"==typeof(g=void 0!==i.SurfaceData&&i.SurfaceData)?g:Object)],B.prototype,"surface",void 0),y([(0,n.JsonProperty)(),C("design:type",E)],B.prototype,"outLoop",void 0),y([(0,n.JsonProperty)({class:E,default:[]}),C("design:type",Array)],B.prototype,"innerLoops",void 0);var v=function e(){c(this,e)};t.GRPExtrusionData=v,y([(0,n.JsonProperty)(),C("design:type","function"==typeof(f=void 0!==i.Matrix4Data&&i.Matrix4Data)?f:Object)],v.prototype,"matrix",void 0),y([(0,n.JsonProperty)(),C("design:type",Number)],v.prototype,"distance",void 0),y([(0,n.JsonProperty)(),C("design:type","function"==typeof(h=void 0!==i.GeomFace2dData&&i.GeomFace2dData)?h:Object)],v.prototype,"face",void 0);var m=function e(){c(this,e)};t.BaseGeoReferenceData=m,y([(0,n.JsonProperty)({default:""}),C("design:type",String)],m.prototype,"id",void 0),y([(0,n.JsonProperty)({default:""}),C("design:type",String)],m.prototype,"name",void 0),y([(0,n.JsonProperty)(),C("design:type",String)],m.prototype,"type",void 0),y([(0,n.JsonProperty)(),C("design:type",String)],m.prototype,"businessType",void 0),y([(0,n.JsonProperty)({default:new Map}),C("design:type","function"==typeof(p="undefined"!=typeof Map&&Map)?p:Object)],m.prototype,"data",void 0);var Q=function(e){o(r,e);var t=a(r);function r(){return c(this,r),t.apply(this,arguments)}return r}(m);t.GeoReferencePointData=Q,y([(0,n.JsonProperty)(),C("design:type","function"==typeof(d=void 0!==i.CCS3dData&&i.CCS3dData)?d:Object)],Q.prototype,"value",void 0);var b=function(e){o(r,e);var t=a(r);function r(){return c(this,r),t.apply(this,arguments)}return r}(m);t.GeoReferenceCurveData=b,y([(0,n.JsonProperty)({class:E}),C("design:type",E)],b.prototype,"value",void 0);var _=function(e){o(r,e);var t=a(r);function r(){return c(this,r),t.apply(this,arguments)}return r}(m);t.GeoReferenceFaceData=_,y([(0,n.JsonProperty)(),C("design:type",B)],_.prototype,"value",void 0);var S=function(e){o(r,e);var t=a(r);function r(){return c(this,r),t.apply(this,arguments)}return r}(m);function w(e,t){return e.curves=e.curves.map((function(e){var r=e.toCurve();return r.transform(t),r instanceof i.Arc3d?new i.Arc3dData(r):r instanceof i.LineSeg3d?new i.LineSeg3dData(r):new i.BoundedCurve3dData(r)})),e}t.GeoReferenceExtrusionData=S,y([(0,n.JsonProperty)(),C("design:type",v)],S.prototype,"value",void 0)},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCoreParamModel=function(e){return e instanceof n.default},t.isCoreParamModelAssembly=function(e){return e instanceof i.default};var n=o(r(107)),i=o(r(420));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";e.exports=function(){}},function(e,t,r){"use strict";var n=r(1966),i=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*o(i(e)):e}},function(e,t,r){"use strict";e.exports=r(1967)()?Math.sign:r(1968)},function(e,t,r){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&-1===e(-20))}},function(e,t,r){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,r){"use strict";var n=r(234),i=r(519),o=r(279),A=r(1971),a=r(1091);e.exports=function e(t){var r,s,u;if(n(t),(r=Object(arguments[1])).async&&r.promise)throw new Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!r.force?t:(s=a(r.length,t.length,r.async&&o.async),u=A(t,s,r),i(o,(function(e,t){r[t]&&e(r[t],u,r)})),e.__profiler__&&e.__profiler__(u),u.updateEnv(),u.memoized)}},function(e,t,r){"use strict";var n=r(234),i=r(348),o=Function.prototype.bind,A=Function.prototype.call,a=Object.keys,s=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(r,u){var c,l=arguments[2],g=arguments[3];return r=Object(i(r)),n(u),c=a(r),g&&c.sort("function"==typeof g?o.call(g,r):void 0),"function"!=typeof e&&(e=c[e]),A.call(e,c,(function(e,n){return s.call(r,e)?A.call(u,l,r[e],e,r,n):t}))}}},function(e,t,r){"use strict";var n=r(1972),i=r(1093),o=r(280),A=r(1986).methods,a=r(1987),s=r(2003),u=Function.prototype.apply,c=Function.prototype.call,l=Object.create,g=Object.defineProperties,f=A.on,h=A.emit;e.exports=function(e,t,r){var A,p,d,I,y,C,E,B,v,m,Q,b,_,S,w,D=l(null);return p=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(m=s(r.normalizer),d=m.get,I=m.set,y=m.delete,C=m.clear),null!=r.resolvers&&(w=a(r.resolvers)),S=d?i((function(t){var r,i,o=arguments;if(w&&(o=w(o)),null!==(r=d(o))&&hasOwnProperty.call(D,r))return Q&&A.emit("get",r,o,this),D[r];if(i=1===o.length?c.call(e,this,o[0]):u.call(e,this,o),null===r){if(null!==(r=d(o)))throw n("Circular invocation","CIRCULAR_INVOCATION");r=I(o)}else if(hasOwnProperty.call(D,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return D[r]=i,b&&A.emit("set",r,null,i),i}),p):0===t?function(){var t;if(hasOwnProperty.call(D,"data"))return Q&&A.emit("get","data",arguments,this),D.data;if(t=arguments.length?u.call(e,this,arguments):c.call(e,this),hasOwnProperty.call(D,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return D.data=t,b&&A.emit("set","data",null,t),t}:function(t){var r,i,o=arguments;if(w&&(o=w(arguments)),i=String(o[0]),hasOwnProperty.call(D,i))return Q&&A.emit("get",i,o,this),D[i];if(r=1===o.length?c.call(e,this,o[0]):u.call(e,this,o),hasOwnProperty.call(D,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return D[i]=r,b&&A.emit("set",i,null,r),r},A={original:e,memoized:S,profileName:r.profileName,get:function(e){return w&&(e=w(e)),d?d(e):String(e[0])},has:function(e){return hasOwnProperty.call(D,e)},delete:function(e){var t;hasOwnProperty.call(D,e)&&(y&&y(e),t=D[e],delete D[e],_&&A.emit("delete",e,t))},clear:function(){var e=D;C&&C(),D=l(null),A.emit("clear",e)},on:function(e,t){return"get"===e?Q=!0:"set"===e?b=!0:"delete"===e&&(_=!0),f.call(this,e,t)},emit:h,updateEnv:function(){e=A.original}},E=d?i((function(e){var t,r=arguments;w&&(r=w(r)),null!==(t=d(r))&&A.delete(t)}),p):0===t?function(){return A.delete("data")}:function(e){return w&&(e=w(arguments)[0]),A.delete(e)},B=i((function(){var e,r=arguments;return 0===t?D.data:(w&&(r=w(r)),e=d?d(r):String(r[0]),D[e])})),v=i((function(){var e,r=arguments;return 0===t?A.has("data"):(w&&(r=w(r)),null!==(e=d?d(r):String(r[0]))&&A.has(e))})),g(S,{__memoized__:o(!0),delete:o(E),clear:o(A.clear),_get:o(B),_has:o(v)}),A}},function(e,t,r){"use strict";var n=r(1092),i=r(1978),o=r(277),A=Error.captureStackTrace;e.exports=function(t){var r=new Error(t),a=arguments[1],s=arguments[2];return o(s)||i(a)&&(s=a,a=null),o(s)&&n(r,s),o(a)&&(r.code=a),A&&A(r,e.exports),r}},function(e,t,r){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,r){"use strict";var n=r(1975),i=r(348),o=Math.max;e.exports=function(e,t){var r,A,a,s=o(arguments.length,2);for(e=Object(i(e)),a=function(n){try{e[n]=t[n]}catch(e){r||(r=e)}},A=1;A<s;++A)n(t=arguments[A]).forEach(a);if(void 0!==r)throw r;return e}},function(e,t,r){"use strict";e.exports=r(1976)()?Object.keys:r(1977)},function(e,t,r){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,r){"use strict";var n=r(277),i=Object.keys;e.exports=function(e){return i(n(e)?Object(e):e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(277),o={function:!0,object:!0};e.exports=function(e){return i(e)&&o[n(e)]||!1}},function(e,t,r){"use strict";var n=r(1980),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!n(e)&&!i.test(o.call(e))}},function(e,t,r){"use strict";var n=r(1981);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!n(e)}},function(e,t,r){"use strict";var n=r(1982);e.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(1095),o={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!i(e)&&hasOwnProperty.call(o,n(e))}},function(e,t,r){"use strict";e.exports=r(1984)()?String.prototype.contains:r(1985)},function(e,t,r){"use strict";var n="razdwatrzy";e.exports=function(){return"function"==typeof n.contains&&(!0===n.contains("dwa")&&!1===n.contains("foo"))}},function(e,t,r){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o,A,a,s,u,c,l=r(280),g=r(234),f=Function.prototype.apply,h=Function.prototype.call,p=Object.create,d=Object.defineProperty,I=Object.defineProperties,y=Object.prototype.hasOwnProperty,C={configurable:!0,enumerable:!1,writable:!0};o=function(e,t){var r,n;return g(t),n=this,i.call(this,e,r=function(){A.call(n,e,r),f.call(t,this,arguments)}),r.__eeOnceListener__=t,this},s={on:i=function(e,t){var r;return g(t),y.call(this,"__ee__")?r=this.__ee__:(r=C.value=p(null),d(this,"__ee__",C),C.value=null),r[e]?"object"===n(r[e])?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:o,off:A=function(e,t){var r,i,o,A;if(g(t),!y.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"===n(i=r[e]))for(A=0;o=i[A];++A)o!==t&&o.__eeOnceListener__!==t||(2===i.length?r[e]=i[A?0:1]:i.splice(A,1));else i!==t&&i.__eeOnceListener__!==t||delete r[e];return this},emit:a=function(e){var t,r,i,o,A;if(y.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"===n(o)){for(r=arguments.length,A=new Array(r-1),t=1;t<r;++t)A[t-1]=arguments[t];for(o=o.slice(),t=0;i=o[t];++t)f.call(i,this,A)}else switch(arguments.length){case 1:h.call(o,this);break;case 2:h.call(o,this,arguments[1]);break;case 3:h.call(o,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,A=new Array(r-1),t=1;t<r;++t)A[t-1]=arguments[t];f.call(o,this,A)}}},u={on:l(i),once:l(o),off:l(A),emit:l(a)},c=I({},u),e.exports=t=function(e){return null==e?p(c):I(Object(e),u)},t.methods=s},function(e,t,r){"use strict";var n,i=r(1988),o=r(277),A=r(234),a=Array.prototype.slice;n=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(a.call(e,this.length))},e.exports=function(e){return(e=i(e)).forEach((function(e){o(e)&&A(e)})),n.bind(e)}},function(e,t,r){"use strict";var n=r(705),i=Array.isArray;e.exports=function(e){return i(e)?e:n(e)}},function(e,t,r){"use strict";e.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&(t=r(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,r){"use strict";var n=r(1991).iterator,i=r(2e3),o=r(2001),A=r(278),a=r(234),s=r(348),u=r(277),c=r(2002),l=Array.isArray,g=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},h=Object.defineProperty;e.exports=function(e){var t,r,p,d,I,y,C,E,B,v,m=arguments[1],Q=arguments[2];if(e=Object(s(e)),u(m)&&a(m),this&&this!==Array&&o(this))t=this;else{if(!m){if(i(e))return 1!==(I=e.length)?Array.apply(null,e):((d=new Array(1))[0]=e[0],d);if(l(e)){for(d=new Array(I=e.length),r=0;r<I;++r)d[r]=e[r];return d}}d=[]}if(!l(e))if(void 0!==(B=e[n])){for(C=a(B).call(e),t&&(d=new t),E=C.next(),r=0;!E.done;)v=m?g.call(m,Q,E.value,r):E.value,t?(f.value=v,h(d,r,f)):d[r]=v,E=C.next(),++r;I=r}else if(c(e)){for(I=e.length,t&&(d=new t),r=0,p=0;r<I;++r)v=e[r],r+1<I&&(y=v.charCodeAt(0))>=55296&&y<=56319&&(v+=e[++r]),v=m?g.call(m,Q,v,p):v,t?(f.value=v,h(d,p,f)):d[p]=v,++p;I=p}if(void 0===I)for(I=A(e.length),t&&(d=new t(I)),r=0;r<I;++r)v=m?g.call(m,Q,e[r],r):e[r],t?(f.value=v,h(d,r,f)):d[r]=v;return t&&(f.value=null,d.length=I),d}},function(e,t,r){"use strict";e.exports=r(1992)()?r(520).Symbol:r(1995)},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(520),o={object:!0,symbol:!0};e.exports=function(){var e,t=i.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch(e){return!1}return!!o[n(t.iterator)]&&(!!o[n(t.toPrimitive)]&&!!o[n(t.toStringTag)])}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){return"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))&&(!!globalThis&&globalThis.Array===Array)}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=function(){if("object"===("undefined"==typeof self?"undefined":r(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":r(window))&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o,A,a=r(280),s=r(1096),u=r(520).Symbol,c=r(1997),l=r(1998),g=r(1999),f=Object.create,h=Object.defineProperties,p=Object.defineProperty;if("function"==typeof u)try{String(u()),A=!0}catch(e){}else u=null;o=function(e){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return i(e)},e.exports=i=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return A?u(t):(r=f(o.prototype),t=void 0===t?"":String(t),h(r,{__description__:a("",t),__name__:a("",c(t))}))},l(i),g(i),h(o.prototype,{constructor:a(i),toString:a("",(function(){return this.__name__}))}),h(i.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(i.prototype,i.toPrimitive,a("",(function(){var e=s(this);return"symbol"===n(e)?e:e.toString()}))),p(i.prototype,i.toStringTag,a("c","Symbol")),p(o.prototype,i.toStringTag,a("c",i.prototype[i.toStringTag])),p(o.prototype,i.toPrimitive,a("c",i.prototype[i.toPrimitive]))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return!!e&&("symbol"===n(e)||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}},function(e,t,r){"use strict";var n=r(280),i=Object.create,o=Object.defineProperty,A=Object.prototype,a=i(null);e.exports=function(e){for(var t,r,i=0;a[e+(i||"")];)++i;return a[e+=i||""]=!0,o(A,t="@@"+e,n.gs(null,(function(e){r||(r=!0,o(this,t,n(e)),r=!1)}))),t}},function(e,t,r){"use strict";var n=r(280),i=r(520).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:n("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:n("",i&&i.iterator||e("iterator")),match:n("",i&&i.match||e("match")),replace:n("",i&&i.replace||e("replace")),search:n("",i&&i.search||e("search")),species:n("",i&&i.species||e("species")),split:n("",i&&i.split||e("split")),toPrimitive:n("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:n("",i&&i.toStringTag||e("toStringTag")),unscopables:n("",i&&i.unscopables||e("unscopables"))})}},function(e,t,r){"use strict";var n=r(280),i=r(1096),o=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:n((function(t){return o[t]?o[t]:o[t]=e(String(t))})),keyFor:n((function(e){var t;for(t in i(e),o)if(o[t]===e)return t}))})}},function(e,t,r){"use strict";var n=Object.prototype.toString,i=n.call(function(){return arguments}());e.exports=function(e){return n.call(e)===i}},function(e,t,r){"use strict";var n=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);e.exports=function(e){return"function"==typeof e&&i(n.call(e))}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=Object.prototype.toString,o=i.call("");e.exports=function(e){return"string"==typeof e||e&&"object"===n(e)&&(e instanceof String||i.call(e)===o)||!1}},function(e,t,r){"use strict";var n=r(234);e.exports=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:n(e.get)},void 0!==e.set?(t.set=n(e.set),e.delete&&(t.delete=n(e.delete)),e.clear&&(t.clear=n(e.clear)),t):(t.set=t.get,t))}},function(e,t,r){"use strict";e.exports=function(e){var t,r,n=e.length;if(!n)return"";for(t=String(e[r=0]);--n;)t+=""+e[++r];return t}},function(e,t,r){"use strict";e.exports=function(e){return e?function(t){for(var r=String(t[0]),n=0,i=e;--i;)r+=""+t[++n];return r}:function(){return""}}},function(e,t,r){"use strict";var n=r(706),i=Object.create;e.exports=function(){var e=0,t=[],r=i(null);return{get:function(e){var r,i=0,o=t,A=e.length;if(0===A)return o[A]||null;if(o=o[A]){for(;i<A-1;){if(-1===(r=n.call(o[0],e[i])))return null;o=o[1][r],++i}return-1===(r=n.call(o[0],e[i]))?null:o[1][r]||null}return null},set:function(i){var o,A=0,a=t,s=i.length;if(0===s)a[s]=++e;else{for(a[s]||(a[s]=[[],[]]),a=a[s];A<s-1;)-1===(o=n.call(a[0],i[A]))&&(o=a[0].push(i[A])-1,a[1].push([[],[]])),a=a[1][o],++A;-1===(o=n.call(a[0],i[A]))&&(o=a[0].push(i[A])-1),a[1][o]=++e}return r[e]=i,e},delete:function(e){var i,o=0,A=t,a=r[e],s=a.length,u=[];if(0===s)delete A[s];else if(A=A[s]){for(;o<s-1;){if(-1===(i=n.call(A[0],a[o])))return;u.push(A,i),A=A[1][i],++o}if(-1===(i=n.call(A[0],a[o])))return;for(e=A[1][i],A[0].splice(i,1),A[1].splice(i,1);!A[0].length&&u.length;)i=u.pop(),(A=u.pop())[0].splice(i,1),A[1].splice(i,1)}delete r[e]},clear:function(){t=[],r=i(null)}}}},function(e,t,r){"use strict";e.exports=r(2008)()?Number.isNaN:r(2009)},function(e,t,r){"use strict";e.exports=function(){var e=Number.isNaN;return"function"==typeof e&&(!e({})&&e(NaN)&&!e(34))}},function(e,t,r){"use strict";e.exports=function(e){return e!=e}},function(e,t,r){"use strict";var n=r(706);e.exports=function(){var e=0,t=[],r=[];return{get:function(e){var i=n.call(t,e[0]);return-1===i?null:r[i]},set:function(n){return t.push(n[0]),r.push(++e),e},delete:function(e){var i=n.call(r,e);-1!==i&&(t.splice(i,1),r.splice(i,1))},clear:function(){t=[],r=[]}}}},function(e,t,r){"use strict";var n=r(706),i=Object.create;e.exports=function(e){var t=0,r=[[],[]],o=i(null);return{get:function(t){for(var i,o=0,A=r;o<e-1;){if(-1===(i=n.call(A[0],t[o])))return null;A=A[1][i],++o}return-1===(i=n.call(A[0],t[o]))?null:A[1][i]||null},set:function(i){for(var A,a=0,s=r;a<e-1;)-1===(A=n.call(s[0],i[a]))&&(A=s[0].push(i[a])-1,s[1].push([[],[]])),s=s[1][A],++a;return-1===(A=n.call(s[0],i[a]))&&(A=s[0].push(i[a])-1),s[1][A]=++t,o[t]=i,t},delete:function(t){for(var i,A=0,a=r,s=[],u=o[t];A<e-1;){if(-1===(i=n.call(a[0],u[A])))return;s.push(a,i),a=a[1][i],++A}if(-1!==(i=n.call(a[0],u[A]))){for(t=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&s.length;)i=s.pop(),(a=s.pop())[0].splice(i,1),a[1].splice(i,1);delete o[t]}},clear:function(){r=[[],[]],o=i(null)}}}},function(e,t,r){"use strict";var n=r(705),i=r(1097),o=r(1094),A=r(1093),a=r(707),s=Array.prototype.slice,u=Function.prototype.apply,c=Object.create;r(279).async=function(e,t){var r,l,g,f=c(null),h=c(null),p=t.memoized,d=t.original;t.memoized=A((function(e){var t=arguments,n=t[t.length-1];return"function"==typeof n&&(r=n,t=s.call(t,0,-1)),p.apply(l=this,g=t)}),p);try{o(t.memoized,p)}catch(e){}t.on("get",(function(e){var n,i,o;if(r){if(f[e])return"function"==typeof f[e]?f[e]=[f[e],r]:f[e].push(r),void(r=null);n=r,i=l,o=g,r=l=g=null,a((function(){var A;hasOwnProperty.call(h,e)?(A=h[e],t.emit("getasync",e,o,i),u.call(n,A.context,A.args)):(r=n,l=i,g=o,p.apply(i,o))}))}})),t.original=function(){var e,i,o,A;return r?(e=n(arguments),i=function e(r){var i,o,s=e.id;if(null!=s){if(delete e.id,i=f[s],delete f[s],i)return o=n(arguments),t.has(s)&&(r?t.delete(s):(h[s]={context:this,args:o},t.emit("setasync",s,"function"==typeof i?1:i.length))),"function"==typeof i?A=u.call(i,this,o):i.forEach((function(e){A=u.call(e,this,o)}),this),A}else a(u.bind(e,this,arguments))},o=r,r=l=g=null,e.push(i),A=u.call(d,this,e),i.cb=o,r=i,A):u.call(d,this,arguments)},t.on("set",(function(e){r?(f[e]?"function"==typeof f[e]?f[e]=[f[e],r.cb]:f[e].push(r.cb):f[e]=r.cb,delete r.cb,r.id=e,r=null):t.delete(e)})),t.on("delete",(function(e){var r;hasOwnProperty.call(f,e)||h[e]&&(r=h[e],delete h[e],t.emit("deleteasync",e,s.call(r.args,1)))})),t.on("clear",(function(){var e=h;h=c(null),t.emit("clearasync",i(e,(function(e){return s.call(e.args,1)})))}))}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(771),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(144))},function(e,t,r){"use strict";var n=r(1097),i=r(2015),o=r(2016),A=r(2018),a=r(1099),s=r(707),u=Object.create,c=i("then","then:finally","done","done:finally");r(279).promise=function(e,t){var r=u(null),i=u(null),l=u(null);if(!0===e)e=null;else if(e=o(e),!c[e])throw new TypeError("'"+A(e)+"' is not valid promise mode");t.on("set",(function(n,o,A){var u=!1;if(!a(A))return i[n]=A,void t.emit("setasync",n,1);r[n]=1,l[n]=A;var c=function(e){var o=r[n];if(u)throw new Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");o&&(delete r[n],i[n]=e,t.emit("setasync",n,o))},g=function(){u=!0,r[n]&&(delete r[n],delete l[n],t.delete(n))},f=e;if(f||(f="then"),"then"===f){var h=function(){s(g)};"function"==typeof(A=A.then((function(e){s(c.bind(this,e))}),h)).finally&&A.finally(h)}else if("done"===f){if("function"!=typeof A.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");A.done(c,g)}else if("done:finally"===f){if("function"!=typeof A.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof A.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");A.done(c),A.finally(g)}})),t.on("get",(function(e,n,i){var o;if(r[e])++r[e];else{o=l[e];var A=function(){t.emit("getasync",e,n,i)};a(o)?"function"==typeof o.done?o.done(A):o.then((function(){s(A)})):A()}})),t.on("delete",(function(e){if(delete l[e],r[e])delete r[e];else if(hasOwnProperty.call(i,e)){var n=i[e];delete i[e],t.emit("deleteasync",e,[n])}})),t.on("clear",(function(){var e=i;i=u(null),r=u(null),l=u(null),t.emit("clearasync",n(e,(function(e){return[e]})))}))}},function(e,t,r){"use strict";var n=Array.prototype.forEach,i=Object.create;e.exports=function(e){var t=i(null);return n.call(arguments,(function(e){t[e]=!0})),t}},function(e,t,r){"use strict";var n=r(348),i=r(2017);e.exports=function(e){return i(n(e))}},function(e,t,r){"use strict";var n=r(1098);e.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){throw new TypeError("Passed argument cannot be stringifed")}}},function(e,t,r){"use strict";var n=r(2019),i=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=n(e);return t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,(function(e){return JSON.stringify(e).slice(1,-1)}))}},function(e,t,r){"use strict";var n=r(1098);e.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){return"<Non-coercible to string value>"}}},function(e,t,r){"use strict";var n=r(234),i=r(519),o=r(279),A=Function.prototype.apply;o.dispose=function(e,t,r){var a;if(n(e),r.async&&o.async||r.promise&&o.promise)return t.on("deleteasync",a=function(t,r){A.call(e,null,r)}),void t.on("clearasync",(function(e){i(e,(function(e,t){a(t,e)}))}));t.on("delete",a=function(t,r){e(r)}),t.on("clear",(function(e){i(e,(function(e,t){a(t,e)}))}))}},function(e,t,r){"use strict";var n=r(705),i=r(519),o=r(707),A=r(1099),a=r(2022),s=r(279),u=Function.prototype,c=Math.max,l=Math.min,g=Object.create;s.maxAge=function(e,t,r){var f,h,p,d;(e=a(e))&&(f=g(null),h=r.async&&s.async||r.promise&&s.promise?"async":"",t.on("set"+h,(function(r){f[r]=setTimeout((function(){t.delete(r)}),e),"function"==typeof f[r].unref&&f[r].unref(),d&&(d[r]&&"nextTick"!==d[r]&&clearTimeout(d[r]),d[r]=setTimeout((function(){delete d[r]}),p),"function"==typeof d[r].unref&&d[r].unref())})),t.on("delete"+h,(function(e){clearTimeout(f[e]),delete f[e],d&&("nextTick"!==d[e]&&clearTimeout(d[e]),delete d[e])})),r.preFetch&&(p=!0===r.preFetch||isNaN(r.preFetch)?.333:c(l(Number(r.preFetch),1),0))&&(d={},p=(1-p)*e,t.on("get"+h,(function(e,i,a){d[e]||(d[e]="nextTick",o((function(){var o;"nextTick"===d[e]&&(delete d[e],t.delete(e),r.async&&(i=n(i)).push(u),o=t.memoized.apply(a,i),r.promise&&A(o)&&("function"==typeof o.done?o.done(u,u):o.then(u,u)))})))}))),t.on("clear"+h,(function(){i(f,(function(e){clearTimeout(e)})),f={},d&&(i(d,(function(e){"nextTick"!==e&&clearTimeout(e)})),d={})})))}},function(e,t,r){"use strict";var n=r(278),i=r(2023);e.exports=function(e){if((e=n(e))>i)throw new TypeError(e+" exceeds maximum possible timeout");return e}},function(e,t,r){"use strict";e.exports=2147483647},function(e,t,r){"use strict";var n=r(278),i=r(2025),o=r(279);o.max=function(e,t,r){var A,a,s;(e=n(e))&&(a=i(e),A=r.async&&o.async||r.promise&&o.promise?"async":"",t.on("set"+A,s=function(e){void 0!==(e=a.hit(e))&&t.delete(e)}),t.on("get"+A,s),t.on("delete"+A,a.delete),t.on("clear"+A,a.clear))}},function(e,t,r){"use strict";var n=r(278),i=Object.create,o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r=0,A=1,a=i(null),s=i(null),u=0;return e=n(e),{hit:function(n){var i=s[n],c=++u;if(a[c]=n,s[n]=c,!i){if(++r<=e)return;return n=a[A],t(n),n}if(delete a[i],A===i)for(;!o.call(a,++A););},delete:t=function(e){var t=s[e];if(t&&(delete a[t],delete s[e],--r,A===t)){if(!r)return u=0,void(A=1);for(;!o.call(a,++A););}},clear:function(){r=0,A=1,a=i(null),s=i(null),u=0}}}},function(e,t,r){"use strict";var n=r(280),i=r(279),o=Object.create,A=Object.defineProperties;i.refCounter=function(e,t,r){var a,s;a=o(null),s=r.async&&i.async||r.promise&&i.promise?"async":"",t.on("set"+s,(function(e,t){a[e]=t||1})),t.on("get"+s,(function(e){++a[e]})),t.on("delete"+s,(function(e){delete a[e]})),t.on("clear"+s,(function(){a={}})),A(t.memoized,{deleteRef:n((function(){var e=t.get(arguments);return null===e?null:a[e]?!--a[e]&&(t.delete(e),!0):null})),getRefCount:n((function(){var e=t.get(arguments);return null===e?0:a[e]?a[e]:0}))})}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionContext=t.START_ID=void 0;var i=r(418),o=r(359),A=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var s=o?Object.getOwnPropertyDescriptor(e,A):null;s&&(s.get||s.set)?Object.defineProperty(i,A,s):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(2028));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}t.START_ID="-1";var u=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.maxBackupStep=25,this.getCurrentId=function(){return t.undoStack.length>0?t.undoStack[t.undoStack.length-1].getId():"-1"},this.undoStack=[],this.redoStack=[],this.status=A.TransactionStatus.None,this.cachedRecorder=new A.default,this.createRecorder()}var t,r,n;return t=e,(r=[{key:"setMaxBackupStep",value:function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)}},{key:"createRecorder",value:function(){return this.activeRecorder=new A.default,this.activeRecorder}},{key:"record",value:function(e,t,r){this.status!==A.TransactionStatus.Rollback&&this.activeRecorder.record(e,t,r)}},{key:"getStatus",value:function(){return this.status}},{key:"openRecorder",value:function(){this.clearRedoStack(),this.status=A.TransactionStatus.Open,this.createRecorder()}},{key:"getMergedRecorder",value:function(){var e=new A.default;return this.useCachedRecorder&&this.cachedRecorder.mergeTo(e),this.undoStack.forEach((function(t){return t.mergeTo(e)})),e}},{key:"mergeRecorder",value:function(){!this.activeRecorder.isEmpty()&&this.undoStack.length>0&&this.activeRecorder.mergeTo(this.undoStack[this.undoStack.length-1]),this.createRecorder(),this.console("mergeTransaction")}},{key:"commitRecorder",value:function(e){var t=this;if(this.undoStack.length>=this.maxBackupStep){var r=this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep+1);this.useCachedRecorder&&r.forEach((function(e){return e.mergeTo(t.cachedRecorder)}))}e&&e.mergeTo(this.activeRecorder),this.activeRecorder.isEmpty()||this.undoStack.push(this.activeRecorder),this.openRecorder(),this.console("commitTransaction")}},{key:"isActiveRecorderEmpty",value:function(){return this.activeRecorder.isEmpty()}},{key:"revert",value:function(){this.status=A.TransactionStatus.Rollback,this.activeRecorder.recover(),this.status=A.TransactionStatus.None,this.createRecorder(),this.console("revert")}},{key:"undo",value:function(){if(0===this.undoStack.length)return!1;this.createRecorder(),this.status=A.TransactionStatus.Undo;var e=this.undoStack.pop();return e.recover(),this.status=A.TransactionStatus.None,this.activeRecorder.setId(e.getId()),this.redoStack.push(this.activeRecorder),this.createRecorder(),this.console("undo"),!0}},{key:"redo",value:function(){if(0===this.redoStack.length)return!1;this.createRecorder(),this.status=A.TransactionStatus.Redo;var e=this.redoStack.pop();return e.recover(),this.status=A.TransactionStatus.None,this.activeRecorder.setId(e.getId()),this.undoStack.push(this.activeRecorder),this.createRecorder(),this.console("redo"),!0}},{key:"console",value:function(e){(0,o.devLog)({type:e,undoStack:this.undoStack,redo:this.redoStack})}},{key:"clearRedoStack",value:function(){this.redoStack.length=0}},{key:"clear",value:function(){this.redoStack.length=0,this.undoStack.length=0,this.createRecorder()}},{key:"empty",value:function(){return 0===this.redoStack.length&&0===this.undoStack.length}},{key:"undoToRecorder",value:function(e){var t=0;if("-1"===e)t=this.undoStack.length;else{var r=this.undoStack.findIndex((function(t){return t.getId()===e}));r>-1&&(t=this.undoStack.length-r-1)}if(0===t)return!1;for(var n=0;n<t;n++)if(!this.undo())return i.LOGGER.logError(new Error("Transaction undoToRecorder error")),!1;return!0}},{key:"redoToRecorder",value:function(e){var t=0,r=this.redoStack.findIndex((function(t){return t.getId()===e}));if(r>-1&&(t=this.redoStack.length-r),0===t)return!1;for(var n=0;n<t;n++)if(!this.redo())return i.LOGGER.logError(new Error("Transaction redoToRecorder error ".concat(e))),!1;return!0}}])&&s(t.prototype,r),n&&s(t,n),e}();t.TransactionContext=u},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TransactionStatus=void 0;var i,o=(i=r(529))&&i.__esModule?i:{default:i},A=r(2029);function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=c(e);if(t){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var f,h=function(){function e(){l(this,e),this.records=new Map,this.updater={update:function(e,t,r){e[t]=r}}}var t,r,n;return t=e,(r=[{key:"record",value:function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)}},{key:"recover",value:function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){var i=t.update||e.updater.update;r.applyRecover&&!r.applyRecover()||i(r,n,t.preValue)}))}))}},{key:"isEmpty",value:function(){return 0===this.records.size}},{key:"mergeTo",value:function(e){this.records.forEach((function(t,r){t.forEach((function(t,n){e.record(r,n,t)}))}))}}])&&g(t.prototype,r),n&&g(t,n),e}();t.TransactionStatus=f,function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Undo=2]="Undo",e[e.Redo=3]="Redo",e[e.Rollback=4]="Rollback"}(f||(t.TransactionStatus=f={}));var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(r,e);var t=s(r);function r(){return l(this,r),t.apply(this,arguments)}return r}((0,o.default)(h,(0,A.numericId)()));t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numericId=function(){var e=1;return function(){return(e++).toString()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1101),i=r(1102),o=r(1103),A=r(2031),a=r(1104),s=r(1105),u=r(1106),c=r(1107),l=r(1108);t.BrepDataTranslators={EDGE_DATA:new n.EdgeDataTranslator,EDGE2_DATA:new i.Edge2DataTranslator,FACE_DATA:new o.FaceDataTranslator,HALF_EDGE_DATA:new a.HalfEdgeDataTranslator,LOOP_DATA:new s.LoopDataTranslator,META_DATA:new u.MetaDataTranslator,SHELL_DATA:new c.ShellDataTranslator,VERTEX_DATA:new l.VertexDataTranslator,GENERAL_DATA:new A.GeneralDataTranslator,GENERAL_DATA_LIST:new A.GeneralDataListTranslator}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),u=r(67),c=r(710),l=r(421),g=r(350),f=r(284),h=r(351),p=r(239),d=r(521),I=r(422),y=r(1101),C=r(1102),E=r(1103),B=r(1104),v=r(1105),m=r(1106),Q=r(1107),b=r(1108),_=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBGeneralData;if(e instanceof I.VertexData)t.vertexData=(new b.VertexDataTranslator).to(e);else if(e instanceof f.HalfEdgeData)t.halfEdgeData=(new B.HalfEdgeDataTranslator).to(e);else if(e instanceof l.Edge2Data)t.edge2Data=(new C.Edge2DataTranslator).to(e);else if(e instanceof h.LoopData)t.loopData=(new v.LoopDataTranslator).to(e);else if(e instanceof c.EdgeData)t.edgeData=(new y.EdgeDataTranslator).to(e);else if(e instanceof g.FaceData)t.faceData=(new E.FaceDataTranslator).to(e);else if(e instanceof d.ShellData)t.shellData=(new Q.ShellDataTranslator).to(e);else{if(!(e instanceof p.MetaData))throw"not supported";t.metaData=(new m.MetaDataTranslator).to(e)}return t}},{key:"realFrom",value:function(e){if(e.vertexData)return(new b.VertexDataTranslator).from(e.vertexData);if(e.halfEdgeData)return(new B.HalfEdgeDataTranslator).from(e.halfEdgeData);if(e.edge2Data)return(new C.Edge2DataTranslator).from(e.edge2Data);if(e.loopData)return(new v.LoopDataTranslator).from(e.loopData);if(e.edgeData)return(new y.EdgeDataTranslator).from(e.edgeData);if(e.faceData)return(new E.FaceDataTranslator).from(e.faceData);if(e.shellData)return(new Q.ShellDataTranslator).from(e.shellData);if(e.metaData)return(new m.MetaDataTranslator).from(e.metaData);throw"not supported"}}]),t}(s.Translator);t.GeneralDataTranslator=_;var S=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBGeneralDataList;return t.generalDatas=(new _).toList(e),t}},{key:"realFrom",value:function(e){return(new _).fromList(e.generalDatas)}}]),t}(s.Translator);t.GeneralDataListTranslator=S},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(710),o=r(421),A=r(350),a=r(284),s=r(351),u=r(239),c=r(521),l=r(422),g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"readMetaData",value:function(e){var t=new u.MetaData(void 0,void 0);return Object.assign(t,e),t}},{key:"readShellData",value:function(e){var t=new c.ShellData(void 0);return Object.assign(t,e),t}},{key:"readFaceData",value:function(e){var t=new A.FaceData(void 0);return Object.assign(t,e),t}},{key:"readLoopData",value:function(e){var t=new s.LoopData(void 0);return Object.assign(t,e),t}},{key:"readEdgeData",value:function(e){var t=new i.EdgeData(void 0);return Object.assign(t,e),t}},{key:"readEdge2Data",value:function(e){var t=new o.Edge2Data(void 0);return Object.assign(t,e),t}},{key:"readHalfEdgeData",value:function(e){var t=new a.HalfEdgeData(void 0);return Object.assign(t,e),t}},{key:"readVertexData",value:function(e){var t=new l.VertexData(void 0);return Object.assign(t,e),t}}]),e}();t.Json=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(239);function i(e){var t=e.metaData;return t?t.version:void 0}function o(e){var t=e.metaData;return t?t.toolVersion:void 0}function A(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];t.set(i.refId,i)}return t}t.migrateBrepData=function(e){return function(e){var t=i(e);if(t&&n.MetaData.versionCompare(t,"1.9.0")>=0)return e;for(var r=A(e.hedgeData),a=e.edge2Data,s=0,u=a.length;s<u;s++){var c=a[s],l=c.halfEdgeIds;if(!(l.length<=0)){for(var g=void 0,f=0,h=l.length;f<h&&!(g=r.get(l[f]));f++);if(g){c.vertexAId=g.vertexAId,c.vertexBId=g.vertexBId;for(var p=0,d=l.length;p<d;p++){var I=l[p];if(I!==g.refId){var y=r.get(I);y&&(y.vertexAId!==c.vertexAId?y.reversed=!0:y.reversed=!1)}}}}}for(var C=e.edgeData,E=0,B=C.length;E<B;E++){var v=C[E],m=v.halfEdge1Id,Q=v.halfEdge2Id,b=void 0;if(null!=m&&(b=r.get(m)),b||null==Q||(b=r.get(Q)),b&&(v.vertexAId=b.vertexAId,v.vertexBId=b.vertexBId,b.reversed=!1,null!=Q&&Q!==b.refId)){var _=r.get(Q);_.vertexAId!==v.vertexAId?_.reversed=!0:_.reversed=!1}}var S=o(e);return e.metaData=new n.MetaData("1.9.0",S),e}(function(e){var t=i(e);if(t&&n.MetaData.versionCompare(t,"1.8.9")>=0)return e;for(var r=A(e.faceData),a=A(e.loopData),s=A(e.hedgeData),u=e.originMetaData,c=o(e),l=new n.MetaData("1.8.9",c),g=e.shellData,f=e.vertexData,h=[],p=[],d=[],I=[],y=[],C=0,E=g.length;C<E;C++)for(var B=g[C].faceIds,v=0,m=B.length;v<m;v++){var Q=B[v],b=r.get(Q);b&&h.push(b)}for(var _=0,S=h.length;_<S;_++){var w=h[_],D=w.outerLoopId,R=a.get(D);if(R){p.push(R);var M=w.innerLoopIds;if(M)for(var x=0,P=M.length;x<P;x++){var T=M[x],F=a.get(T);F&&p.push(F)}}}for(var O=0,L=p.length;O<L;O++)for(var k=p[O].halfEdgeIds,N=0,G=k.length;N<G;N++){var U=k[N],j=s.get(U);j&&d.push(j)}for(var V=new Set,Y=0,H=d.length;Y<H;Y++){var K=d[Y];V.add(K.refId)}for(var q=new Map,J=0,W=e.edgeData.length;J<W;J++){var z=e.edgeData[J],X=z.halfEdge1Id;if(V.has(X)){var Z=q.get(X);Z&&Z!==z?z.halfEdge1Id=void 0:q.set(X,z)}else z.halfEdge1Id=void 0;var $=z.halfEdge2Id;if(V.has($)){var ee=q.get($);ee&&ee!==z?z.halfEdge2Id=void 0:q.set($,z)}else z.halfEdge2Id=void 0;(z.halfEdge1Id||z.halfEdge2Id)&&I.push(z)}for(var te=0,re=e.edge2Data.length;te<re;te++){for(var ne=e.edge2Data[te],ie=[],oe=ne.halfEdgeIds,Ae=0,ae=oe.length;Ae<ae;Ae++){var se=oe[Ae];if(V.has(se)){var ue=q.get(se);ue&&ue!==ne||(q.set(se,ne),ie.push(se))}}ie.length>0&&(ne.halfEdgeIds=ie,y.push(ne))}return{originMetaData:u,metaData:l,shellData:g,faceData:h,loopData:p,edgeData:I,edge2Data:y,hedgeData:d,vertexData:f}}(function(e){for(var t=e,r=void 0,n=void 0,i=[],o=[],A=[],a=[],s=[],u=[],c=[],l=0,g=t.length;l<g;l++){var f=t[l];switch(f.tp){case"M":r=f,n=f;break;case"S":i.push(f);break;case"F":o.push(f);break;case"L":A.push(f);break;case"E":a.push(f);break;case"E2":s.push(f);break;case"H":u.push(f);break;case"V":c.push(f)}}return{metaData:r,originMetaData:n,shellData:i,faceData:o,loopData:A,edgeData:a,edge2Data:s,hedgeData:u,vertexData:c}}(e)))},t.getMetaVersion=i,t.getMetaToolVersion=o,t.getOriginMetaVersion=function(e){var t=e.originMetaData;return t?t.version:void 0}},function(e,t,r){"use strict";var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(239),A=r(1109);function a(e){var t=e.getEdges(),r=!0,n=!1,o=void 0;try{for(var A,a=t[Symbol.iterator]();!(r=(A=a.next()).done);r=!0){var s=A.value;if(s.curve instanceof i.Circle3d){var u=s.curve,c=s.vertexA,l=s.vertexB,g=u.getParam(c.point),f=u.getParam(l.point);i.Num.isBigger(g,f)&&s.swapVertices()}}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}}function s(e){!function(e){for(var t=function(e){var t=e.getVertices(),r=new Map,i=[],o=!0,A=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=!1,g=!0,f=!1,h=void 0;try{for(var p,d=r[Symbol.iterator]();!(g=(p=d.next()).done);g=!0){var I=n(p.value,2),y=I[0],C=I[1];if(c.point.isEqual(y.point)){C.push(c),l=!0;break}}}catch(e){f=!0,h=e}finally{try{!g&&d.return&&d.return()}finally{if(f)throw h}}l||r.set(c,[c])}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}var E=!0,B=!1,v=void 0;try{for(var m,Q=r[Symbol.iterator]();!(E=(m=Q.next()).done);E=!0){var b=n(m.value,2);(C=b[1]).length>1&&i.push(C)}}catch(e){B=!0,v=e}finally{try{!E&&Q.return&&Q.return()}finally{if(B)throw v}}return i}(e),r=new Map,i=0,o=t.length;i<o;i++)for(var A=t[i],a=A[0],s=1,u=A.length;s<u;s++)r.set(A[s],a);if(r.size<=0)return;var c=e.getEdges(),l=!0,g=!1,f=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value,I=d.vertexA,y=d.vertexB;r.has(I)&&(d.vertexA=r.get(I)),r.has(y)&&(d.vertexB=r.get(y))}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}}(e);for(var t=function(e){for(var t=[],r=e.faces,n=0,i=r.length;n<i;n++)for(var o=r[n].getLoops(),A=0,a=o.length;A<a;A++)for(var s=o[A].halfEdges,u=0,c=s.length;u<c;u++){var l=s[u];l.vertexA===l.vertexB&&t.push(l)}return t}(e),r=0,i=t.length;r<i;r++){u(t[r])}}function u(e){var t=e.loop;t.removeHalfEdge(e),t.halfEdges.length<=0&&A.quickPurgeLoop(t);var r=e.edge;r.removeHalfEdge(e),r.halfEdges.length<=0&&r.dispose()}t.postMigrateShells=function(e,t){!function(e,t){if(t&&o.MetaData.versionCompare(t,"1.9.0")>=0)return;(function(e){for(var t=0,r=e.length;t<r;t++){a(e[t])}})(e),function(e){for(var t=0,r=e.length;t<r;t++){s(e[t])}}(e)}(e,t),function(e,t){if(t&&o.MetaData.versionCompare(t,"1.10.0")>=0)return;!function(e){for(var t=0,r=e.length;t<r;t++)for(var n=e[t].faces,o=0,A=n.length;o<A;o++){var a=n[o],s=a.surface,u=!0;s&&s instanceof i.CylindricalSurface&&a.outerLoop&&(u=a.outerLoop.isCCW(s)),a.setOuterLoop(a.outerLoop,u)}}(e)}(e,t)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.x=e,i.y=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r(241).MIxBaseGeom);t.MIxVector2d=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(67),i=r(2037),o=r(522),A=r(160),a=r(285),s=r(714),u=r(1117);function c(e){for(var t=[],r=[],n=0,i=e.length;n<i;n++){var o=e[n];if(o instanceof A.Shell){if(o.faces.length<=0)continue;r.push(a.MIxShell.create(o))}t.push(u.topoObjToMIxEntity(o))}return s.BrepValidatorManager.validateShellsTopo(r,!0),t}t.toPBBrep=function(e){var t=e.map((function(e){return e.rawObject()})),r=o.extractIndependentTopoObjs(t);return s.BrepValidatorManager.validateShellsTopo(r.shells.map((function(e){return a.MIxShell.create(e)})),!0),i.ProtoSerializer.toPBBrep(t)},t.toBytes=function(e){var t=this.toPBBrep(e);return n.brep.PBBrep.encode(t).finish()},t.shellsToPBBrep=function(e){return s.BrepValidatorManager.validateShellsTopo(e,!0),i.ProtoSerializer.shellsToPBBrep(e.map((function(e){return e.rawObject()})))},t.shellsToBytes=function(e){var t=this.shellsToPBBrep(e);return n.brep.PBBrep.encode(t).finish()},t.fromPBBrep=function(e){return c(i.ProtoSerializer.fromPBBrep(e))},t.fromBytes=function(e){return c(i.ProtoSerializer.fromBytes(e))},t.shellsFromPBBrep=function(e){var t=i.ProtoSerializer.shellsFromPBBrep(e).map((function(e){return a.MIxShell.create(e)}));return s.BrepValidatorManager.validateShellsTopo(t,!0),t},t.shellsFromBytes=function(e){var t=i.ProtoSerializer.shellsFromBytes(e).map((function(e){return a.MIxShell.create(e)}));return s.BrepValidatorManager.validateShellsTopo(t,!0),t}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=r(67),a=r(239),s=r(2038),u=r(2046),c=r(2047),l=r(160),g=r(2048),f=r(708),h=r(522),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"toPBBrep",value:function(e,t){t=t||new a.MetaData;var r=c.SerializeContext.buildContextByTopoObjs(e);return this._toPBBrepImpl(r,t)}},{key:"toBytes",value:function(e,t){var r=this.toPBBrep(e,t);return A.brep.PBBrep.encode(r).finish()}},{key:"shellsToPBBrep",value:function(e,t){t=t||new a.MetaData;var r=c.SerializeContext.buildContextByShells(e);return this._toPBBrepImpl(r,t)}},{key:"shellsToBytes",value:function(e,t){var r=this.shellsToPBBrep(e);return A.brep.PBBrep.encode(r).finish()}},{key:"fromPBBrep",value:function(e){var t=new u.DeserializeContext,r=this.getMetaData(e),n=g.ProtoMigrate.migratePBBrep(e);t.curves=o.ProtocolTranslators.CURVE3D.fromList(n.curves),t.surfaces=o.ProtocolTranslators.SURFACE.fromList(n.surfaces),t.vertices=s.BrepTranslators.VERTEX.fromList(n.vertices,t),t.edges=s.BrepTranslators.EDGE.fromList(n.edges,t),t.faces=s.BrepTranslators.FACE.fromList(n.faces,t),t.shells=s.BrepTranslators.SHELL.fromList(n.shells,t);var A={shells:t.shells,faces:t.faces,edges:t.edges,vertices:t.vertices,loops:[],halfEdges:[]},a=h.extractIndependentTopoObjs2(A);f.postProcessTopoObjects(a,r?r.version:void 0);var c=[];return c.push.apply(c,i(a.shells)),c.push.apply(c,i(a.faces)),c.push.apply(c,i(a.loops)),c.push.apply(c,i(a.halfEdges)),c.push.apply(c,i(a.edges)),c.push.apply(c,i(a.vertices)),c}},{key:"fromBytes",value:function(e){try{var t=A.brep.PBBrep.decode(e);return this.fromPBBrep(t)}catch(e){return[]}}},{key:"shellsFromPBBrep",value:function(e){for(var t=this.fromPBBrep(e),r=[],n=0,i=t.length;n<i;n++){var o=t[n];o instanceof l.Shell&&r.push(o)}return r}},{key:"shellsFromBytes",value:function(e){try{var t=A.brep.PBBrep.decode(e);return this.shellsFromPBBrep(t)}catch(e){return[]}}},{key:"getMetaData",value:function(e){var t=e.metaData;if(t)return s.BrepTranslators.META.from(t)}},{key:"_toPBBrepImpl",value:function(e,t){var r=new A.brep.PBBrep;return r.metaData=s.BrepTranslators.META.to(t),r.curves=o.ProtocolTranslators.CURVE3D.toList(e.curves),r.surfaces=o.ProtocolTranslators.SURFACE.toList(e.surfaces),r.vertices=s.BrepTranslators.VERTEX.toList(e.vertices,e),r.edges=s.BrepTranslators.EDGE.toList(e.edges,e),r.faces=s.BrepTranslators.FACE.toList(e.faces,e),r.shells=s.BrepTranslators.SHELL.toList(e.shells,e),r}}]),e}();t.ProtoSerializer=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2039),i=r(2040),o=r(2041),A=r(2042),a=r(2045);t.BrepTranslators={META:new n.MetaTranslator,VERTEX:new i.VertexTranslator,EDGE:new o.EdgeTranslator,FACE:new A.FaceTranslator,SHELL:new a.ShellTranslator}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(239),u=r(67),c=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBMeta;return e.version&&e.version.length>0&&(t.version=e.version),t.toolVersion=e.toolVersion,t}},{key:"realFrom",value:function(e){var t=new s.MetaData;return e.version&&e.version.length>0&&(t.version=e.version),e.toolVersion&&e.toolVersion.length>0&&(t.toolVersion=e.toolVersion),t}}]),t}(a.Translator);t.MetaTranslator=c},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(67),s=r(282),u=r(355),c=r(3),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e){var t=new a.brep.PBVertex;return t.base=u.toPBTopoObjBase(e),t.position=c.ProtocolTranslators.POINT3D.to(e.point),t}},{key:"realFrom",value:function(e){var t=new s.Vertex(null);return e.base&&u.fromPBTopoObjBase(e.base,t),e.position&&(t.point=c.ProtocolTranslators.POINT3D.from(e.position)),t}}]),t}(c.TranslatorWithContext);t.VertexTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(235),c=r(355),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBEdge;r.base=c.toPBTopoObjBase(e),r.crvIndex=t.getEdgeCurveIndex(e);var n=e.vertexA;n&&(r.vAIndex=t.getVertexIndex(n));var i=e.vertexB;return i&&(r.vBIndex=t.getVertexIndex(i)),r}},{key:"realFrom",value:function(e,t){var r=new u.Edge(null,null,null);if(e.base&&c.fromPBTopoObjBase(e.base,r),e.vAIndex){var n=t.getVertex(e.vAIndex);n&&(r.vertexA=n)}if(e.vBIndex){var i=t.getVertex(e.vBIndex);i&&(r.vertexB=i)}var o=t.getCurve3d(e.crvIndex||0);return o?r.curve=o:r.vertexA&&r.vertexB&&(r.curve=a.Line3d.fromSegment(r.vertexA.point,r.vertexB.point)),r}}]),t}(a.TranslatorWithContext);t.EdgeTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(237),c=r(2043),l=r(355),g=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,r){var n=new s.brep.PBFace;n.base=l.toPBTopoObjBase(e),n.srfIndex=r.getFaceSurfaceIndex(e),n.sameDir=e.sameDir,e.outerLoop&&(n.outerLoop=t._loopTranslator.to(e.outerLoop,r));var i=e.innerLoops;return i&&i.length>0&&(n.innerLoops=t._loopTranslator.toList(i,r)),n}},{key:"realFrom",value:function(e,r){var n=new u.Face(null);if(e.base&&l.fromPBTopoObjBase(e.base,n),e.srfIndex){var i=r.getSurface(e.srfIndex);i&&(n.surface=i)}var o=e.sameDir||!1;if(e.outerLoop){var A=t._loopTranslator.from(e.outerLoop,r);n.setOuterLoop(A,o)}if(e.innerLoops)for(var a=t._loopTranslator.fromList(e.innerLoops,r),s=0,c=a.length;s<c;s++)n.addInnerLoop(a[s]);return n}}]),t}(a.TranslatorWithContext);g._loopTranslator=new c.LoopTranslator,t.FaceTranslator=g},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(283),c=r(2044),l=r(355),g=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,r){var n=new s.brep.PBLoop;return n.base=l.toPBTopoObjBase(e),n.halfEdges=t._heTranslator.toList(e.halfEdges,r),n}},{key:"realFrom",value:function(e,r){var n=new u.Loop;if(e.base&&l.fromPBTopoObjBase(e.base,n),e.halfEdges){var i=t._heTranslator.fromList(e.halfEdges,r);n.buildLoop(i)}return n}}]),t}(a.TranslatorWithContext);g._heTranslator=new c.HalfEdgeTranslator,t.LoopTranslator=g},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(238),c=r(355),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBHalfEdge;r.base=c.toPBTopoObjBase(e);var n=e.edge;return n&&(r.edgeIndex=t.getEdgeIndex(n)),r.reversed=e.reversed,r}},{key:"realFrom",value:function(e,t){var r=new u.HalfEdge(null);if(e.base&&c.fromPBTopoObjBase(e.base,r),e.edgeIndex){var n=t.getEdge(e.edgeIndex);n&&n.addHalfEdge(r)}return e.reversed&&(r.reversed=e.reversed),r}}]),t}(a.TranslatorWithContext);t.HalfEdgeTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(160),c=r(355),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBShell;r.base=c.toPBTopoObjBase(e);for(var n=e.faces,i=new Array(n.length),o=0,A=n.length;o<A;o++)i[o]=t.getFaceIndex(n[o]);return r.faceIndices=i,r}},{key:"realFrom",value:function(e,t){var r=new u.Shell;e.base&&c.fromPBTopoObjBase(e.base,r);var n=e.faceIndices;if(n)for(var i=0,o=n.length;i<o;i++){var A=t.getFace(n[i]);A&&r.addFace(A)}return r}}]),t}(a.TranslatorWithContext);t.ShellTranslator=l},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._curves=[],this._surfaces=[],this._vertices=[],this._edges=[],this._faces=[],this._shells=[]}return n(e,[{key:"getCurve3d",value:function(e){if(!(e<=0))return this._curves.length>=e?this._curves[e-1]:void 0}},{key:"getSurface",value:function(e){if(!(e<=0))return this._surfaces.length>=e?this._surfaces[e-1]:void 0}},{key:"getVertex",value:function(e){if(!(e<=0))return this._vertices.length>=e?this._vertices[e-1]:void 0}},{key:"getEdge",value:function(e){if(!(e<=0))return this._edges.length>=e?this._edges[e-1]:void 0}},{key:"getFace",value:function(e){if(!(e<=0))return this._faces.length>=e?this._faces[e-1]:void 0}},{key:"getShell",value:function(e){if(!(e<=0))return this._shells.length>=e?this._shells[e-1]:void 0}},{key:"curves",get:function(){return this._curves},set:function(e){this._curves=e}},{key:"surfaces",get:function(){return this._surfaces},set:function(e){this._surfaces=e}},{key:"vertices",get:function(){return this._vertices},set:function(e){this._vertices=e}},{key:"edges",get:function(){return this._edges},set:function(e){this._edges=e}},{key:"faces",get:function(){return this._faces},set:function(e){this._faces=e}},{key:"shells",get:function(){return this._shells},set:function(e){this._shells=e}}]),e}();t.DeserializeContext=i},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(282),A=r(235),a=r(237),s=r(160),u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._curves=[],this._surfaces=[],this._vertices=[],this._edges=[],this._faces=[],this._shells=[]}return n(e,[{key:"getEdgeCurveIndex",value:function(t){return e.getCurveIndex(t)}},{key:"getFaceSurfaceIndex",value:function(t){return e.getSurfaceIndex(t)}},{key:"getVertexIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getEdgeIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getFaceIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getShellIndex",value:function(t){return e.getSelfIndex(t)}},{key:"addVertex",value:function(t){var r=e.getOrCreateTempMap(t);r[e.SELF_IDX]||(this._vertices.push(t),r[e.SELF_IDX]=this._vertices.length)}},{key:"addEdgeAndCurve",value:function(t){var r=e.getOrCreateTempMap(t);if(!r[e.SELF_IDX]){this._edges.push(t),r[e.SELF_IDX]=this._edges.length;var n=t.curve;!n||n instanceof i.Line3d||(this._curves.push(n),r[e.CRV_IDX]=this._curves.length)}}},{key:"addFaceAndSurface",value:function(t){var r=e.getOrCreateTempMap(t);if(!r[e.SELF_IDX]){this._faces.push(t),r[e.SELF_IDX]=this._faces.length;var n=t.surface;n&&(this._surfaces.push(n),r[e.SURF_IDX]=this._surfaces.length)}}},{key:"addShell",value:function(t){var r=e.getOrCreateTempMap(t);r[e.SURF_IDX]||(this._shells.push(t),r[e.SURF_IDX]=this._shells.length)}},{key:"curves",get:function(){return this._curves}},{key:"surfaces",get:function(){return this._surfaces}},{key:"vertices",get:function(){return this._vertices}},{key:"edges",get:function(){return this._edges}},{key:"faces",get:function(){return this._faces}},{key:"shells",get:function(){return this._shells}}],[{key:"buildContextByShells",value:function(t){for(var r=new e,n=0,i=t.length;n<i;n++){var o=t[n];this.clearTempMap(o);var A=o.faces;this.clearTempMaps(A);var a=o.getEdgesAndVertices(),s=a.edges;this.clearTempMaps(s);var u=a.vertices;this.clearTempMaps(u),r.addShell(o);for(var c=0,l=A.length;c<l;c++)r.addFaceAndSurface(A[c]);for(var g=0,f=s.length;g<f;g++)r.addEdgeAndCurve(s[g]);for(var h=0,p=u.length;h<p;h++)r.addVertex(u[h])}return r}},{key:"buildContextByTopoObjs",value:function(t){for(var r=[],n=[],i=[],u=[],c=0,l=t.length;c<l;c++){var g=t[c];if(g instanceof a.Face){n.push(g);var f=g.getEdges(),h=!0,p=!1,d=void 0;try{for(var I,y=f[Symbol.iterator]();!(h=(I=y.next()).done);h=!0){var C=I.value;i.push(C)}}catch(e){p=!0,d=e}finally{try{!h&&y.return&&y.return()}finally{if(p)throw d}}var E=g.getVertices(),B=!0,v=!1,m=void 0;try{for(var Q,b=E[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value;u.push(_)}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}}else if(g instanceof A.Edge)i.push(g),g.vertexA&&u.push(g.vertexA),g.vertexB&&u.push(g.vertexB);else if(g instanceof o.Vertex)u.push(g);else if(g instanceof s.Shell){r.push(g);for(var S=g.faces,w=0,D=S.length;w<D;w++)n.push(S[w]);for(var R=g.getEdgesAndVertices(),M=R.edges,x=R.vertices,P=0,T=M.length;P<T;P++)i.push(M[P]);for(var F=0,O=x.length;F<O;F++)u.push(x[F])}}this.clearTempMaps(r),this.clearTempMaps(n),this.clearTempMaps(i),this.clearTempMaps(u);for(var L=new e,k=0,N=r.length;k<N;k++)L.addShell(r[k]);for(var G=0,U=n.length;G<U;G++)L.addFaceAndSurface(n[G]);for(var j=0,V=i.length;j<V;j++)L.addEdgeAndCurve(i[j]);for(var Y=0,H=u.length;Y<H;Y++)L.addVertex(u[Y]);return L}},{key:"getOrCreateTempMap",value:function(e){var t=e.temp;return t||(t=new Object,e.temp=t),t}},{key:"clearTempMaps",value:function(e){for(var t=0,r=e.length;t<r;t++)this.clearTempMap(e[t])}},{key:"clearTempMap",value:function(e){var t=e.temp;t&&(delete t[this.SELF_IDX],delete t[this.CRV_IDX],delete t[this.SURF_IDX])}},{key:"getSelfIndex",value:function(e){var t=e.temp;return t&&t[this.SELF_IDX]||0}},{key:"getCurveIndex",value:function(e){var t=e.temp;return t&&t[this.CRV_IDX]||0}},{key:"getSurfaceIndex",value:function(e){var t=e.temp;return t&&t[this.SURF_IDX]||0}}]),e}();u.SELF_IDX="$PB_SELF_IDX",u.CRV_IDX="$PB_CRV_IDX",u.SURF_IDX="$PB_SURF_IDX",t.SerializeContext=u},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"migratePBBrep",value:function(e){return e}}]),e}();t.ProtoMigrate=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function A(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),u=r(350),c=r(284),l=r(351),g=r(709),f=r(238),h=r(283),p=r(423),d=r(1109),I=function(){function e(){a(this,e),this.errors=[]}return i(e,[{key:"hasError",value:function(){return this.errors.length>0}},{key:"errorMessage",value:function(){for(var e="",t=0,r=this.errors.length;t<r;t++){var n=this.errors[t];e+="Error:{desc:"+n.message()+"; context:"+n.context()+"}\n"}return e}},{key:"tryToFix",value:function(){for(var e=0,t=this.errors.length;e<t;e++){var r=this.errors[e];r.isAmendable?r.amend():r.operation()}}},{key:"validateShell",value:function(e){for(var t=e.faces,r=0,n=t.length;r<n;r++){var i=t[r];i.shell!==e&&this.addError(new C(i,e)),this.validateFace(i)}var o=e.getVertices(),A=!0,a=!1,s=void 0;try{for(var u,c=o[Symbol.iterator]();!(A=(u=c.next()).done);A=!0)for(var l=u.value.getLeadOutHalfEdges(),g=0,f=l.length;g<f;g++){var h=l[g];h.isAdopted()||this.addError(new M(h))}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}}},{key:"validateFace",value:function(e){e!==e.outerLoop.face&&this.addError(new v(e.outerLoop,e)),this.validateLoop(e.outerLoop);for(var t=e.innerLoops,r=0,n=t.length;r<n;r++){var i=t[r];e!==i.face&&this.addError(new v(i,e))}this.validateInnerLoops(t,e)}},{key:"validateLoop",value:function(e){var t=e.halfEdges,r=t.length;if(0!==r)for(var n=0;n<r;n++){var i=(n+1)%r,o=t[n],A=t[i];if(o.loop!==e&&this.addError(new m(e,o)),!s.Num.isEqual(o.getBoundedCurve().length,0)||o.edge&&o.edge.degenerated||this.addError(new x(o)),o.vertexB!==A.vertexA&&this.addError(new E(e,o,A)),o.next!==A&&this.addError(new Q(o,A)),A.prev!==o&&this.addError(new b(A,o)),o.edge&&-1!==o.edge.halfEdges.indexOf(o))for(var a=o.siblings(),u=0,c=a.length;u<c;u++){var l=a[u];null!==l&&(o.edge!==l.edge&&this.addError(new D(o,l)),l.vertexB!==o.vertexA&&l.vertexB!==o.vertexB&&this.addError(new S(o,l)),l.vertexA!==o.vertexA&&l.vertexA!==o.vertexB&&this.addError(new _(o,l)))}else this.addError(new w(o))}else this.addError(new B(e))}},{key:"validateInnerLoops",value:function(e,t){for(var r=0,n=e.length;r<n;r++){var i=e[r];this.validateLoop(i)}if(t.surface instanceof s.Plane)for(var o=t.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))})),a=t.surface.faceToUV({contour:o,holes:A}),u=new s.GeomLoop2d(a.contour),c=0;c<a.holes.length;c++){var l=new s.GeomLoop2d(a.holes[c]);u.containsLoop(l,!0)||this.addError(new R(e[c],t))}}},{key:"addError",value:function(e){this.errors.push(e)}}],[{key:"validateToConsole",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new e;if(n.validateShell(t),0===n.errors.length)return p.consoleLogInDev("BREP is Valid."),!0;for(var i=n.errors,o=0,A=i.length;o<A;o++){var a=i[o];p.consoleLogInDev(a.message())}return r&&n.tryToFix(),!1}}]),e}();t.BREPValidator=I;var y=function(){function e(){a(this,e),this.isAmendable=!1}return i(e,[{key:"message",value:function(){throw"not implemented"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){throw"not implemented"}},{key:"context",value:function(){throw"not implemented"}}]),e}(),C=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.face=e,n.shell=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"face refers to a shell it doesn't belong to"}},{key:"amend",value:function(){this.face.shell=this.shell}},{key:"operation",value:function(){d.quickPurgeFace(this.face)}},{key:"context",value:function(){try{var e=new Map;u.FaceData.extractTopo(e,this.face);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),E=function(e){function t(e,r,n){a(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.isAmendable=!1,i.loop=e,i.halfEdge1=r,i.halfEdge2=n,i}return A(t,e),i(t,[{key:"message",value:function(){return"starting point of the following half edge should identically the same as ending of a half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),B=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.loop=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"loop has no half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),v=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.loop=e,n.face=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"loop refers to different face it belongs to"}},{key:"amend",value:function(){var e=this.face.outerLoop===this.loop,t=this.loop.face,r=!!t&&t.outerLoop===this.loop,n=!!t&&t.innerLoops.indexOf(this.loop)>=0;if(r||n){var i=this.loop.halfEdges.map((function(e){return new f.HalfEdge(e.edge,e.reversed)})),o=new h.Loop(i);e?this.face.setOuterLoop(o):(this.face.removeInnerLoop(this.loop),this.face.addInnerLoop(o));for(var A=0,a=i.length;A<a;A++)g.IdAssigner.assignToHalfEdge(i[A]);this.loop.face=t}else this.loop.face=this.face}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;u.FaceData.extractTopo(e,this.face),this.loop.face?u.FaceData.extractTopo(e,this.loop.face):l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),m=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.loop=e,n.halfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge refers to different loop it belongs to"}},{key:"amend",value:function(){this.halfEdge.loop=this.loop}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop),c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),Q=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.nextHalfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge's next pointer doesn't refer to real next half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.halfEdge.loop)}},{key:"context",value:function(){try{var e=new Map;this.halfEdge.loop?l.LoopData.extractTopo(e,this.halfEdge.loop):(c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.nextHalfEdge));var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),b=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.prevHalfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge's prev pointer doesn't refer to prior half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.halfEdge.loop)}},{key:"context",value:function(){try{var e=new Map;this.halfEdge.loop?l.LoopData.extractTopo(e,this.halfEdge.loop):(c.HalfEdgeData.extractTopo(e,this.prevHalfEdge),c.HalfEdgeData.extractTopo(e,this.halfEdge));var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),_=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"a sibling has incorrect start vertex"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),S=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"a sibling has incorrect end vertex"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),w=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge doesn't correctly refer to an edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),D=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"edge of sibling doesn't match to the half edge's edge"}},{key:"amend",value:function(){this.sibling.edge=this.halfEdge.edge}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),R=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.innerLoop=e,n.face=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"inner loop is outside of face's outer loop"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.innerLoop)}},{key:"context",value:function(){try{var e=new Map;this.innerLoop.face&&u.FaceData.extractTopo(e,this.innerLoop.face),l.LoopData.extractTopo(e,this.innerLoop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),M=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge doesn't refer to any loop"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),x=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge with zero length"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y)},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"changeErrorHandler",value:function(t){e.errorHandler=t}},{key:"changeModelDataHandler",value:function(t){e.dataHandler=t}},{key:"onErrorOccurred",value:function(t,r){if(e.errorHandler){var n="geom-modeling-kernel:";r&&r.trim().length>0&&(n=n+"("+r.trim()+")"),e.errorHandler(t,n)}}},{key:"uploadErrorModelData",value:function(t,r){e.dataHandler&&e.dataHandler(t,r)}}]),e}();t.ErrorManager=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2052),i=r(354),o=r(285),A=r(1116);t.polygonizeShell=function(e,t,r){var a=n.Polygonize.polygonizeShell(e.rawObject(),t,r),s=o.MIxShell.create(a.shell),u=new Map;a.faceMap.forEach((function(e,t){var r=i.MIxFace.create(t),n=[];e.forEach((function(e){n.push(i.MIxFace.create(e))})),u.set(r,n)}));var c=new Map;return a.edgeMap.forEach((function(e,t){var r=A.MIxEdge.create(t),n=[];e.forEach((function(e){n.push(A.MIxEdge.create(e))})),c.set(r,n)})),{shell:s,faceMap:u,edgeMap:c}},t.polygonizeFace=function(e,t,r){var o=n.Polygonize.polygonizeFace(e.rawObject(),t,r),a=[];o.faces.forEach((function(e){a.push(i.MIxFace.create(e))}));var s=new Map;return o.edgeMap.forEach((function(e,t){var r=A.MIxEdge.create(t),n=[];e.forEach((function(e){n.push(A.MIxEdge.create(e))})),s.set(r,n)})),{faces:a,edgeMap:s}}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(235),A=r(237),a=r(238),s=r(283),u=r(160),c=r(282),l=r(709),g=r(715),f=r(2053),h=r(2055),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"polygonizeShell",value:function(t,r,n){var o=r||e.defaultNormTol,A=n||i.Tolerance.Tolerance.global,a=[],s=[],c=!0,g=!1,f=void 0;try{for(var h,p=t.faces[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var d=h.value;a.push(d);var I=e.polygonMeshOnFace(d,!1,o,A);if(I.isEmpty())return{shell:new u.Shell,faceMap:new Map,edgeMap:new Map};s.push(I)}}catch(e){g=!0,f=e}finally{try{!c&&p.return&&p.return()}finally{if(g)throw f}}var y=e.getResultMapByShell(t,s);e.mergeCoplanarFaceOnFaceList(y,A),e.mergeCollinearEdgeOnFace(y,A);var C=e.getEdgesFromShell(t),E=e.reversedMapInfo({faces:a,edges:C},y),B=new u.Shell;return E.faceList.forEach((function(e){B.addFace(e)})),l.IdAssigner.assignToShell(B),{shell:B,faceMap:E.faceMap,edgeMap:E.edgeMap}}},{key:"polygonizeFace",value:function(t,r,n){var o=r||e.defaultNormTol,A=n||i.Tolerance.Tolerance.global,a=e.polygonMeshOnFace(t,!0,o,A);if(a.isEmpty())return{faces:[],edgeMap:new Map};var s=e.getResultMapByFace(t,a);e.mergeCoplanarFaceOnFaceList(s,A),e.mergeCollinearEdgeOnFace(s,A);var u=e.getEdgesFromFace(t),c=e.reversedMapInfo({faces:[t],edges:u},s);return{faces:c.faceList,edgeMap:c.edgeMap}}},{key:"polygonMeshOnFace",value:function(t,r,n,o){o=o||i.Tolerance.Tolerance.global;var A=n;i.Num.isInRange(n,0,1,!0,!0,o.numTol)||(A=e.defaultNormTol);var a=t.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),s=t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));if(null===t.surface)return new g.PolygonMesh;var u=[];return u.push(t.outerLoop.halfEdges.map((function(e){return e.edge.degenerated}))),u.push.apply(u,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.edge.degenerated}))})))),r?f.PolygonMeshOnSurface.polygonMeshOnSingleSurface3d(a,s,u,t.surface,t.sameDir,A,o):f.PolygonMeshOnSurface.polygonMeshOnSurface3d(a,s,u,t.surface,t.sameDir,A,o)}},{key:"getResultMapByFace",value:function(t,r){if(t.surface instanceof i.Plane)return e.makeFaceByPolygonMeshWithPlane(r);var n=new u.Shell;return n.addFace(t),this.getResultMapByShell(n,[r])}},{key:"getResultMapByShell",value:function(t,r){var n=e.buildVertexIndex(t),i=new Array,o=[],A=e.buildEdgeIndex(t,i,o),a=h.PolygonMeshUtil.mergePolygonMesh(r,i,n,A,o);return a.pgm.isEmpty()?{faceIndexMap:new Map,edgeIndexMap:new Map}:e.makeFacesByPolygonMesh(a)}},{key:"buildVertexIndex",value:function(e){var t=[],r=e.getVertices(),n=0,i=new Map,o=!0,A=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value;i.set(c,n++)}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}return e.faces.forEach((function(e){var r=e.getHalfEdges(),n=[];r.forEach((function(e){n.push(i.get(e.vertexA))})),t.push(n)})),t}},{key:"buildEdgeIndex",value:function(e,t,r){for(var n=Array.from(e.getEdges()),i=new Map,o=0,A=n.length;o<A;++o)i.set(n[o],o),t.push(n[o].getBoundedCurve());var a=e.faces,s=[];return a.forEach((function(e){var t=e.getHalfEdges(),n=[],o=[];t.forEach((function(e){var t=i.get(e.edge);n.push({index:t,isReversed:e.reversed}),o.push(e.reversed)})),s.push(n),r.push(o)})),s}},{key:"makeFaceByPolygonMeshWithPlane",value:function(t){if(!t.onPlane)return{faceIndexMap:new Map,edgeIndexMap:new Map};if(0===t.coords.length||1!==t.mSurfaces.length||1!==t.isSameDir.length||t.boundedIndices.length<1||t.boundedIndices.length!==t.boundedEdgePos.length)return{faceIndexMap:new Map,edgeIndexMap:new Map};var r=[];t.coords.forEach((function(e){r.push(new c.Vertex(e))})),e.setSoftTagWithVertex(t.boundedIndices,r);var n=new A.Face(t.mSurfaces[0]),i=t.coordIndices,o=e.makeLoopByVertexAndIndex(r,i[0]);n.setOuterLoop(o,t.isSameDir[0]);for(var a=1,s=i.length;a<s;++a){var u=e.makeLoopByVertexAndIndex(r,i[a]);if(null===u)return{faceIndexMap:new Map,edgeIndexMap:new Map};n.addInnerLoop(u)}var l=new Map;return l.set(n,0),{faceIndexMap:l,edgeIndexMap:e.setSoftTagWithEdge(t.boundedIndices,r)}}},{key:"makeFacesByPolygonMesh",value:function(t){var r=t.pgm.coords.length,n=t.pgm.coordIndices.length;if(0===r||0===n||t.pgm.markLoop.length!==n||t.pgm.isSameDir.length!==t.pgm.mSurfaces.length)return{faceIndexMap:new Map,edgeIndexMap:new Map};var i=[];t.pgm.coords.forEach((function(e){i.push(new c.Vertex(e))})),e.setSoftTagWithVertex(t.pgm.boundedIndices,i);for(var o=new Set,a=t.pgm.mSurfaces,s=t.pgm.coordIndices,u=new Map,l=0,g=0,f=0,h=s.length;f<h;f++){var p=t.pgm.markLoop[f];if(f>t.range[g]&&g++,-1!==p){var d=new A.Face(a[l]),I=e.makeLoopByVertexAndIndex(i,s[f]);for(d.setOuterLoop(I),f++;f<h&&1===t.pgm.markLoop[f];){var y=e.makeLoopByVertexAndIndex(i,s[f]);if(null===y)return{faceIndexMap:new Map,edgeIndexMap:new Map};d.addInnerLoop(y),f++}o.add(d),u.set(d,g),f--}else{var C=e.makeLoopByVertexAndIndex(i,s[f]);if(null!==C&&null!==a[l]){var E=new A.Face(a[l]);E.setOuterLoop(C),o.add(E),u.set(E,g)}}l++}return{faceIndexMap:u,edgeIndexMap:e.setSoftTagWithEdge(t.pgm.boundedIndices,i)}}},{key:"setSoftTagWithVertex",value:function(e,t){var r=!0,n=!1,i=void 0;try{for(var o,A=e[Symbol.iterator]();!(r=(o=A.next()).done);r=!0)for(var a=o.value,s=1,u=a.length;s<u;++s)0!==s&&s!==u-1&&(t[a[s]].isSoft=!0)}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}}},{key:"setSoftTagWithEdge",value:function(t,r){var n=new Map,i=r.length,o=0,A=!0,a=!1,s=void 0;try{for(var u,c=t[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){for(var l=u.value,g=1,f=l.length;g<f;++g){var h=l[g],p=l[g-1];if(h<i&&h>=0&&p<i&&p>=0){var d=e.setSoftOnEdgeByVertex(r[l[g]],r[l[g-1]]);d&&n.set(d,{bcIndex:o,posIndex:g})}}o++}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}return n}},{key:"setSoftOnEdgeByVertex",value:function(e,t){var r=e.edges,n=!0,i=!1,o=void 0;try{for(var A,a=r[Symbol.iterator]();!(n=(A=a.next()).done);n=!0){var s=A.value;if(s.vertexA===e&&s.vertexB===t||s.vertexB===e&&s.vertexA===t)return s.isSoft=!1,s}}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}}},{key:"makeLoopByVertexAndIndex",value:function(t,r){var n=r.length;if(n<1)return null;for(var i=[],o=r[n-1],A=t[o],u=0,c=n;u<c;++u){var l=r[u],g=t[l],f=e.makeEdgeByVertex(A,g);A.point.isEqual(g.point)&&(f.degenerated=!0),i.push(new a.HalfEdge(f,f.vertexA!==A)),A=g,o=l}return new s.Loop(i)}},{key:"makeUniqueEdgeByVertex",value:function(e,t){var r=new o.Edge(i.Line3d.fromSegment(e.point,t.point),e,t);return r.isSoft=!0,r}},{key:"makeEdgeByVertex",value:function(t,r){var n=t.edges,i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value;if(u.vertexA===t&&u.vertexB===r||u.vertexB===t&&u.vertexA===r)return u}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}var c=r.edges,l=!0,g=!1,f=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value;if(d.vertexA===t&&d.vertexB===r||d.vertexB===t&&d.vertexA===r)return d}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}return e.makeUniqueEdgeByVertex(t,r)}},{key:"mergeCoplanarFaceOnFaceList",value:function(t,r){var n=new Set;t.faceIndexMap.forEach((function(e,t){t.getEdges().forEach((function(e){n.add(e)}))}));var i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value,c=u.halfEdges;if(u.isSoft&&2===c.length){var l=e.mergeFaceWithHalfEdge(c[0],c[1],r);if(null!==l){var g=c[0].loop.face,f=c[1].loop.face,h=t.faceIndexMap.get(g),p=t.faceIndexMap.get(f);void 0!==h&&void 0!==p&&(t.faceIndexMap.delete(g),t.faceIndexMap.delete(f),t.faceIndexMap.set(l,h),t.edgeIndexMap.delete(u))}}}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}}},{key:"mergeFaceWithHalfEdge",value:function(t,r,n){if(null===t.loop||null===t.loop.face||null===r.loop||null===r.loop.face)return null;var o=t.loop.face,a=r.loop.face;if(null===o||null===a)return null;var u=o.surface,c=a.surface;if(!(u instanceof i.Plane&&c instanceof i.Plane&&t.reversed!==r.reversed))return null;if(u.normal.isSameDirection(c.normal,n)){var l=o.outerLoop,g=a.outerLoop,f=e.findHalfEdgePosInLoop(l,t),h=e.findHalfEdgePosInLoop(g,r);if(-1===f||-1===h)return null;for(var p=l.halfEdges,d=g.halfEdges,I=p.length,y=d.length,C=[],E=f+1,B=f+I;E<B;++E)C.push(p[E%I]);for(var v=h+1,m=h+y;v<m;++v)C.push(d[v%y]);var Q=new A.Face(u);Q.setOuterLoop(new s.Loop(C),o.sameDir);var b=t.edge;return t.vertexA.removeEdge(b),r.vertexA.removeEdge(b),Q}return null}},{key:"findHalfEdgePosInLoop",value:function(e,t){for(var r=e.halfEdges,n=-1,i=0,o=r.length;i<o;++i)if(r[i]===t){n=i;break}return n}},{key:"mergeCollinearEdgeOnFace",value:function(t,r){var n=new Set;t.faceIndexMap.forEach((function(e,t){t.getVertices().forEach((function(e){n.add(e)}))})),n.forEach((function(n){e.judgeValidityForVertexByEdges(n,r)&&e.removeVertex(t,n)}))}},{key:"judgeValidityForVertexByEdges",value:function(e,t){var r=e.edges;if(2===r.length){var n=r[0],o=r[1],A=!0,a=!1,s=void 0;try{for(var u,c=n.halfEdges[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){if(0!==u.value.loop.face.innerLoops.length)return!1}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}var l=!0,g=!1,f=void 0;try{for(var h,p=o.halfEdges[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){if(0!==h.value.loop.face.innerLoops.length)return!1}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}if(n.isSoft===o.isSoft&&n.curve instanceof i.Line3d&&o.curve instanceof i.Line3d){var d=n.curve,I=o.curve;if(d.direction.isParallel(I.direction,t))return!0}}return!1}},{key:"removeVertex",value:function(t,r){var n=r.getLeadInHalfEdges(),i=r.getLeadOutHalfEdges();if(2===n.length||2===i.length){var o=i[0],A=i[1],s=n[0],u=n[1],c=o.edge,l=A.edge,g=o.vertexB,f=A.vertexB,h=e.makeEdgeByVertex(g,f);h.isSoft=c.isSoft;var p=new a.HalfEdge(h,!0);e.updateFaceWithHF(t.faceIndexMap,p,o,s,u),p=new a.HalfEdge(h,!1),e.updateFaceWithHF(t.faceIndexMap,p,A,s,u),r.removeEdge(c),r.removeEdge(l),g.removeEdge(c),f.removeEdge(l);var d=t.edgeIndexMap.get(c),I=t.edgeIndexMap.get(l);d&&I&&d.bcIndex===I.bcIndex&&(t.edgeIndexMap.delete(c),t.edgeIndexMap.delete(l),d.posIndex>I.posIndex?t.edgeIndexMap.set(h,I):t.edgeIndexMap.set(h,d))}}},{key:"updateFaceWithHF",value:function(e,t,r,n,i){var o=new Array;o.push(t);for(var a=r.next;null!==a&&a!==n&&a!==i;)o.push(a),a=a.next;var u=new s.Loop(o),c=r.loop.face,l=new A.Face(c.surface);l.setOuterLoop(u,c.sameDir);var g=e.get(c);void 0!==g&&(e.delete(c),e.set(l,g))}},{key:"getEdgesFromShell",value:function(e){return Array.from(e.getEdges())}},{key:"getEdgesFromFace",value:function(e){var t=[];return e.outerLoop.halfEdges.map((function(e){return t.push(e.edge)})),e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return t.push(e.edge)}))})),t}},{key:"reversedMapInfo",value:function(e,t){var r=new Map,n=e.edges,i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value;r.set(u,[])}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}t.edgeIndexMap.forEach((function(e,t){var i=n[e.bcIndex],o=r.get(i);o&&o.push({edge:t,order:e.posIndex})}));var c=new Map;r.forEach((function(e,t){e.sort((function(e,t){return e.order-t.order}));var r=[];e.forEach((function(e){r.push(e.edge)})),c.set(t,r)}));var l=[],g=new Map,f=e.faces;return f.forEach((function(e){g.set(e,new Array)})),t.faceIndexMap.forEach((function(e,t){var r=f[e],n=g.get(r);n&&n.push(t),l.push(t)})),{faceList:l,faceMap:g,edgeMap:c}}}]),e}();p.defaultNormTol=1-Math.cos(Math.PI/9),t.Polygonize=p},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function A(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(715),u=r(2054),c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"polygonMeshOnSingleSurface3d",value:function(t,r,n,i,o,A,s){var u=e.polygonMeshOnSurface3d(t,r,n,i,o,A,s);return null===u||i instanceof a.Plane||u.planarMesh(),u}},{key:"polygonMeshOnSurface3d",value:function(t,r,n,i,o,A,s){return i instanceof a.Plane?e.polygonMeshOnPlane(t,r,i,o,A):e.polygonMeshOnNonPlane(t,r,n,i,o,A,s)}},{key:"polygonMeshOnPlane",value:function(e,t,r,n,i){var o=[],A=[];return e.forEach((function(e){var t=u.PolygonOnUVFace.tessBoundedCurve3d(e,i);o.push(t)})),t.forEach((function(e){var t=[];e.forEach((function(e){var r=u.PolygonOnUVFace.tessBoundedCurve3d(e,i);t.push(r)})),A.push(t)})),s.PolygonMesh.makePolygonMeshByLoops(o,A,r,n)}},{key:"polygonMeshOnNonPlane",value:function(t,r,n,i,o,A,c){var l=e.getOrderUVBoundedCurve(i,t,r,c),g=void 0;g=i instanceof a.NurbsSurface?e.calculateUVOffset(i,l.uvContour,c):[0,0];var f=u.PolygonOnUVFace.tessUVDomain(i,l.uvContour,g[0],g[1],A),h=u.PolygonOnUVFace.getUVPolygons(l.uvContour,l.uvHole,g,f,c);if(0===h.length||0===h[0].length)return new s.PolygonMesh;var p=u.PolygonOnUVFace.getRectMesh(i,f),d=e.getEndpointOfUVBoundedCurve(l.uvContour,l.uvHole,g),I=e.getPointsByDegenerateEdge(n,t,r),y=[],C=[],E=e.getPolygonByRectMesh(h,p,i,o,d,C,y,I,c);return 0===E.length?new s.PolygonMesh:s.PolygonMesh.makePolygonMeshByPolygon(E,C,y,o)}},{key:"getOrderUVBoundedCurve",value:function(e,t,r,n){var i={contour:t,holes:r},o=e.faceToUV(i,n).mapping,A=[],a=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var g=c.value;A.push(o.get(g))}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}var f=[],h=!0,p=!1,d=void 0;try{for(var I,y=r[Symbol.iterator]();!(h=(I=y.next()).done);h=!0){var C=I.value,E=[],B=!0,v=!1,m=void 0;try{for(var Q,b=C[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value;E.push(o.get(_))}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}f.push(E)}}catch(e){p=!0,d=e}finally{try{!h&&y.return&&y.return()}finally{if(p)throw d}}return{uvContour:A,uvHole:f}}},{key:"getEndpointOfUVBoundedCurve",value:function(e,t,r){var n=[],i=[];i.push(e),null!==t&&i.push.apply(i,A(t));var o=!0,a=!1,s=void 0;try{for(var u,c=i[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=u.value,g=[],f=!0,h=!1,p=void 0;try{for(var d,I=l[Symbol.iterator]();!(f=(d=I.next()).done);f=!0){var y=d.value.startPoint;g.push({x:y.x+r[0],y:y.y+r[1]})}}catch(e){h=!0,p=e}finally{try{!f&&I.return&&I.return()}finally{if(h)throw p}}n.push(g)}}catch(e){a=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(a)throw s}}return n}},{key:"getPointsByDegenerateEdge",value:function(e,t,r){for(var n=[],i=0,o=e.length;i<o;++i)for(var A=e[i],a=0,s=A.length;a<s;++a)A[a]&&(0==i?n.push(t[a].startPoint):n.push(r[i-1][a].startPoint));return n}},{key:"calculateUVOffset",value:function(t,r,n){n=n||a.Tolerance.Tolerance.global;var i=t.isUPeriodic(n),o=t.isVPeriodic(n);if(!i&&!o||0===r.length)return[0,0];var A=0,s=0,u=!0,c=!1,l=void 0;try{for(var g,f=r[Symbol.iterator]();!(u=(g=f.next()).done);u=!0){var h=g.value;A+=h.startPoint.x,s+=h.startPoint.y}}catch(e){c=!0,l=e}finally{try{!u&&f.return&&f.return()}finally{if(c)throw l}}A/=r.length,s/=r.length;var p=t.domainU,d=t.domainV,I=p.end-p.start,y=d.end-d.start;return[e.calculateOffset(p.start,p.end,I,A)*I,e.calculateOffset(d.start,d.end,y,s)*y]}},{key:"calculateOffset",value:function(e,t,r,n){for(var i=0;n>t;)n-=r,i--;for(;n<e;)n+=r,i++;return i}},{key:"getPolygonByRectMesh",value:function(t,r,n,i,o,s,u,c,l){for(var g=[],f=[],h=new Map,p=new Map,d=a.simplifyPolygonsByHorizontal(t,!0),I=a.simplifyPolygonsByHorizontal(d,!1),y=0,C=r.length;y<C;++y){var E=r[y];a.addRect(I,E,g,f,h,p)}var B=[],v=e.dealWithInnerPolygons(g,B),m=e.dealWithIntersectPolygons(f,B,t),Q=[],b=new Map;e.mergeInnerPolygons(Q,s,v,b,n,i,B);var _=new Map,S=[];o.forEach((function(e){return S.push.apply(S,A(e))}));var w=Q.length,D=!0,R=!1,M=void 0;try{for(var x,P=m[Symbol.iterator]();!(D=(x=P.next()).done);D=!0){var T=x.value;e.mergeIntersectPolygons(Q,s,T,b,n,i,B[w],S,_,c,l),w++}}catch(e){R=!0,M=e}finally{try{!D&&P.return&&P.return()}finally{if(R)throw M}}if(_.size!==S.length)return[];var F=e.getBoundedEndpointOnPolygon(o,_);return 0===F.length?[]:(u.push.apply(u,A(F)),Q)}},{key:"getBoundedEndpointOnPolygon",value:function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var A,s=e[Symbol.iterator]();!(n=(A=s.next()).done);n=!0){var u=A.value;if(0===u.length)break;var c=u[0],l=t.get(c);if(!l)break;for(var g=1,f=u.length;g<f;++g){var h=u[g],p=t.get(h);if(!p)return[];a.Num.isEqual(c.x,h.x)&&a.Num.isEqual(c.y,h.y)||(r.push(l),r.push(p)),l=p,c=h}var d=u[0],I=t.get(d);if(!I)return[];a.Num.isEqual(c.x,d.x)&&a.Num.isEqual(c.y,d.y)||(r.push(l),r.push(I))}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}},{key:"dealWithInnerPolygons",value:function(t,r){var n=new Map,o=[],A=!0,a=!1,s=void 0;try{for(var u,c=function(){var t=u.value,i=e.makePlaneByRectMeshNode(t);if(null===i)return{v:[]};r.push(i);var A=[];t.corners.forEach((function(t){var r=e.getPolyPtBySurfPtMapPolyPt(n,t);A.push(r)})),o.push(A)},l=t[Symbol.iterator]();!(A=(u=l.next()).done);A=!0){var g=c();if("object"===(void 0===g?"undefined":i(g)))return g.v}}catch(e){a=!0,s=e}finally{try{!A&&l.return&&l.return()}finally{if(a)throw s}}return o}},{key:"dealWithIntersectPolygons",value:function(t,r,n){for(var o=[],A=function(i,A){var s=t[i],u=e.makePlaneByRectMeshNode(s);if(null===u)return{v:[]};r.push(u);var c=[];s.corners.forEach((function(e){c.push({x:e.uv[0],y:e.uv[1]})}));for(var l=a.simplifyPolygons(a.clipping(n,c)),g=0,f=l.length;g<f;++g){var h=l[g].length;if(h>0){var p=l[g][0],d=l[g][h-1];a.Num.isEqual(p.x,d.x)&&a.Num.isEqual(p.y,d.y)&&l[g].pop()}}for(var I=[],y=0;y<4;++y){var C=s.getAllCorners(y),E=!0,B=!1,v=void 0;try{for(var m,Q=function(){var e=m.value;s.corners.some((function(t){return t===e}))||I.push({x:e.uv[0],y:e.uv[1],id:e.id})},b=C[Symbol.iterator]();!(E=(m=b.next()).done);E=!0)Q()}catch(e){B=!0,v=e}finally{try{!E&&b.return&&b.return()}finally{if(B)throw v}}}var _=a.Tolerance.Tolerance.global;if(I.length){var S=!0,w=!1,D=void 0;try{for(var R,M=I[Symbol.iterator]();!(S=(R=M.next()).done);S=!0){var x=R.value,P=new a.Point2d(x.x,x.y),T=!0,F=!1,O=void 0;try{for(var L,k=l[Symbol.iterator]();!(T=(L=k.next()).done);T=!0)for(var N=L.value,G=0,U=N.length;G<U;++G){var j=new a.LineSeg2d(new a.Point2d(N[G].x,N[G].y),new a.Point2d(N[(G+1)%U].x,N[(G+1)%U].y));if((j.direction.isParallel(new a.Vector2d(1,0),_)||j.direction.isParallel(new a.Vector2d(0,1),_))&&j.isPointOnCurve(P,_)){N.splice(G+1,0,x);break}}}catch(e){F=!0,O=e}finally{try{!T&&k.return&&k.return()}finally{if(F)throw O}}}}catch(e){w=!0,D=e}finally{try{!S&&M.return&&M.return()}finally{if(w)throw D}}}o.push(l)},s=0,u=t.length;s<u;++s){var c=A(s);if("object"===(void 0===c?"undefined":i(c)))return c.v}return o}},{key:"mergeInnerPolygons",value:function(e,t,r,n,i,o,A){var s=0,u=!0,c=!1,l=void 0;try{for(var g,f=function(){var r=g.value,u=A[s++],c=[];r.forEach((function(e){var t=n.get(e);if(!t){var r=new a.UV(e.x,e.y);t=i.getPoint(r),n.set(e,t)}c.push(t)})),0!==c.length&&(o||c.reverse(),e.push(c),t.push(u))},h=r[Symbol.iterator]();!(u=(g=h.next()).done);u=!0)f()}catch(e){c=!0,l=e}finally{try{!u&&h.return&&h.return()}finally{if(c)throw l}}}},{key:"mergeIntersectPolygons",value:function(t,r,n,i,o,A,s,u,c,l,g){var f=!0,h=!1,p=void 0;try{for(var d,I=function(){var n=d.value,f=new Set;if(n.forEach((function(t){var r=e.findPointInMap(i,t);if(null===r){var n=new a.UV(t.x,t.y);r=o.getPoint(n),i.set(t,r)}var A=!0,s=!1,h=void 0;try{for(var p,d=l[Symbol.iterator]();!(A=(p=d.next()).done);A=!0){var I=p.value;I.isEqual(r,g.distTol)&&(r=I)}}catch(e){s=!0,h=e}finally{try{!A&&d.return&&d.return()}finally{if(s)throw h}}f.add(r),e.matchBoundedEndpoint(u,c,t,r)})),0!==f.size){var h=Array.from(f);A||h.reverse(),t.push(h),r.push(s)}},y=n[Symbol.iterator]();!(f=(d=y.next()).done);f=!0)I()}catch(e){h=!0,p=e}finally{try{!f&&y.return&&y.return()}finally{if(h)throw p}}}},{key:"matchBoundedEndpoint",value:function(e,t,r,n){var i=!0,o=!1,A=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(a.Num.isEqual(c.x,r.x)&&a.Num.isEqual(c.y,r.y)){t.set(c,n);break}}}catch(e){o=!0,A=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw A}}}},{key:"findPointInMap",value:function(e,t){var r=t.x,n=t.y,i=!0,o=!1,A=void 0;try{for(var s,u=e.entries()[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(a.Num.isEqual(r,c[0].x)&&a.Num.isEqual(n,c[0].y))return c[1]}}catch(e){o=!0,A=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw A}}return null}},{key:"makePlaneByRectMeshNode",value:function(e){if(e.corners.length<4)return null;var t=new a.Point3d(e.corners[0].point),r=new a.Point3d(e.corners[1].point),n=new a.Point3d(e.corners[2].point),i=void 0;return t.isEqual(r)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(t,n,i)):t.isEqual(n)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(r,n,i)):r.isEqual(n)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(t,r,i)):a.Plane.makePlaneByTreePoints(t,r,n)}},{key:"getPolyPtBySurfPtMapPolyPt",value:function(e,t){var r=e.get(t);return r||(r={x:t.uv[0],y:t.uv[1]},e.set(t,r)),r}}]),e}();t.PolygonMeshOnSurface=c},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"getUVPolygons",value:function(e,t,r,n,A){var a=this,s=this.makeCrosswordLine(n);if(0===s.length)return[];var u=[];u.push(e),null!==t&&u.push.apply(u,i(t));for(var c=[],l=function(e,t){var n=[];u[e].forEach((function(e){var t=a.boundedCurveIntersectIsoLine(e,s,A);t.splice(t.length-1,1),n.push.apply(n,i(t))})),o.LoopCCW.isPolygonCCW2D(n)!==(0===e)&&n.reverse();var l=new Array;n.forEach((function(e){l.push({x:e.x+r[0],y:e.y+r[1]})})),c.push(l)},g=0,f=u.length;g<f;g++)l(g);return c}},{key:"makeCrosswordLine",value:function(e){if(2!==e.length)return[];for(var t=e[0],r=e[1],n=[],i=1,A=t.length;i<A-1;i++)n.push(new o.Line2d(new o.Point2d(t[i],0),o.Vector2d.yAxis));for(var a=[],s=1,u=r.length;s<u-1;s++)a.push(new o.Line2d(new o.Point2d(0,r[s]),o.Vector2d.xAxis));return[n,a]}},{key:"boundedCurveIntersectIsoLine",value:function(e,t,r){var n=new Array,A=e.getBounding(),a=A.min,s=A.max;t[0].forEach((function(t){var A=t.p0.x;if(o.Num.isInRange(A,a.x,s.x,!0,!0,r.distTol)){var u=e.intersectCurve(t);n.push.apply(n,i(u))}})),t[1].forEach((function(t){var A=t.p0.y;if(o.Num.isInRange(A,a.y,s.y,!0,!0,r.distTol)){var u=e.intersectCurve(t);n.push.apply(n,i(u))}})),n.push({point:e.startPoint,param1:e.domain.start,param2:0,isOverlap:!1}),n.push({point:e.endPoint,param1:e.domain.end,param2:0,isOverlap:!1}),n.sort((function(e,t){return e.param1<t.param1?-1:e.param1>t.param1?1:0})),this.filterRepeatData(n,r);var u=[];return n.forEach((function(e){u.push(e.point)})),u}},{key:"tessUVDomain",value:function(e,t,r,n,i){var A=i,a=this.getUVBox(t,r,n),s=void 0;if(e instanceof o.ConicalSurface||e instanceof o.CylindricalSurface)s=this.adaptiveDomainOfCylinderCone(e,a[0],a[1],A);else if(e instanceof o.SurfaceOfLinearExtrusion)s=this.adaptiveDomainOfLinearExtrusion(e,a[1],A);else if(e instanceof o.RevolveSurface)s=this.adaptiveDomainOfRevolve(e,a[0],a[1],A);else if(e instanceof o.ToroidalSurface)s=this.adaptiveDomainOfToroidal(a[0],a[1],A);else{if(!(e instanceof o.NurbsSurface))throw"not implement";s=this.adaptiveDomainOfNurbs(e,a[0],a[1],A)}return s}},{key:"adaptiveDomainOfCylinderCone",value:function(t,r,n,i){var A=void 0;if(A=(o.ConicalSurface,t.radius),o.Num.isEqual(A,0))return[];var a=new o.Arc3d(new o.Circle3d(t.ccs,A),r.start,r.end).tessCurveAdaptiveByNormalTol(r.start,r.end,i),s=a.length,u=new Array,c=!0,l=!1,g=void 0;try{for(var f,h=a[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var p=f.value;u.push(p.t)}}catch(e){l=!0,g=e}finally{try{!c&&h.return&&h.return()}finally{if(l)throw g}}var d=r.length*A,I=n.length,y=Math.floor(I/d*s);return y=Math.min(y>0?y:1,e.maxDiscreteSeg),[u,this.splitDomain(n,n.length/y)]}},{key:"adaptiveDomainOfLinearExtrusion",value:function(t,r,n){for(var i=t.baseCurve,o=i.getApproximatePtInfosByNormalTol(n),A=o.length,a=new Array,s=0;s<A;++s)a.push(o[s].t);var u=i.length,c=t.height,l=Math.floor(c/u*A);return l=l>0?l:1,l=Math.min(l>0?l:1,e.maxDiscreteSeg),[a,this.splitDomain(r,r.length/l)]}},{key:"adaptiveDomainOfRevolve",value:function(t,r,n,i){var A=t.baseCurve,a=A.domain.middle,s=new o.LineSeg2d(new o.Point2d(r.start,a),new o.Point2d(r.end,a)),u=t.uvCurveTo3d(s),c=u.tessCurveAdaptiveByNormalTol(r.start,r.end,i).length,l=this.splitDomain(r,r.length/c),g=A.tessCurveAdaptiveByNormalTol(n.start,n.end,i),f=[],h=g.length,p=Math.floor(A.length/u.length*c)+1;if(p=Math.min(p,e.maxDiscreteSeg),h<c/2&&h<p)f=this.splitDomain(n,n.length/p);else for(var d=0;d<h;++d)f.push(g[d].t);return[l,f]}},{key:"adaptiveDomainOfToroidal",value:function(e,t,r){var n=new o.Circle3d(new o.CCS3d,1),i=new o.Arc3d(n,e.start,e.end).tessCurveAdaptiveByNormalTol(e.start,e.end,r).length,A=this.splitDomain(e,e.length/i),a=new o.Arc3d(n,t.start,t.end).tessCurveAdaptiveByNormalTol(t.start,t.end,r).length;return[A,this.splitDomain(t,t.length/a)]}},{key:"splitDomain",value:function(e,t){for(var r=e.start,n=e.end,i=e.length,o=Math.ceil(i/t),A=i/o,a=new Array,s=0;s<o;++s)a.push(r+s*A);return a.push(n),a}},{key:"adaptiveDomainOfNurbs",value:function(e,t,r,n){var i=t.end,o=t.start,A=r.end,a=r.start,s=[];e.degreeU>1&&e.isoCurve((A+a)/2,!0).tessCurveAdaptiveByNormalTol(o,i,n).forEach((function(e){s.push(e.t)}));var u=e.controlPoints.length*e.degreeU;if(s.length<u){s.splice(0,s.length);for(var c=(i-o)/(u-1),l=0;l<u;l++)s.push(o+c*l)}var g=[];e.degreeV>1&&e.isoCurve((i+o)/2,!1).tessCurveAdaptiveByNormalTol(a,A,n).forEach((function(e){g.push(e.t)}));var f=e.controlPoints[0].length*e.degreeV;if(g.length<f){g.splice(0,g.length);for(var h=(A-a)/(f-1),p=0;p<f;p++)g.push(a+h*p)}return[s,g]}},{key:"getRectMesh",value:function(e,t){for(var r=t[0].length-1,n=t[1].length-1,i=new Array(r*n),A=[],a=0;a<n+1;a++){for(var s=new Array,u=0;u<r+1;u++){var c=t[0][u],l=t[1][a],g=new o.UV(c,l),f=e.tangentUWithLen(g),h=e.tangentVWithLen(g),p=e.getPoint(g),d=f.cross(h).normalized();s.push(new o.SurfacePoint([p.x,p.y,p.z],[d.x,d.y,d.z],[g.u,g.v],-1,o.Num.isZero(d.length)))}A.push(s)}for(var I=0;I<n;I++)for(var y=0;y<r;y++){var C=[A[n-I-1][y],A[n-I-1][y+1],A[n-I][y+1],A[n-I][y]];i[I*r+y]=new o.RectMeshNode(e,C)}return i}},{key:"getUVBox",value:function(e,t,r){var n=new o.BBox2d,i=!0,A=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;n.merge(c.getBounding())}}catch(e){A=!0,a=e}finally{try{!i&&u.return&&u.return()}finally{if(A)throw a}}var l=n.min,g=n.max,f=l.x+t,h=l.y+r,p=g.x+t,d=g.y+r;return[new o.Interval(f,p),new o.Interval(h,d)]}},{key:"filterRepeatData",value:function(e,t){if(!(e.length<2))for(var r=e[0].param1,n=0,i=1,A=e.length;i<A-n;i++)o.Num.isEqual(e[i].param1,r,t.distTol)?(e.splice(i,1),n++,i--):r=e[i].param1}},{key:"tessBoundedCurve3d",value:function(e,t){var r=e.domain,n=e.tessCurveAdaptiveByNormalTol(r.start,r.end,t);if(n.length<2)return[e.startPoint,e.endPoint];var i=[];return n.forEach((function(e){i.push(e.point)})),i}}]),e}();A.maxDiscreteSeg=100,t.PolygonOnUVFace=A},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=r(715),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"mergePolygonMesh",value:function(t,r,n,i,o){if(!e.validPolygonMeshList(t,n,i))return{pgm:new A.PolygonMesh,range:[]};e.buildCommonPtPosLst(n).forEach((function(r){e.mergeCommonPointForPolygonMeshes(t,r)}));for(var a=e.buildCommonEdgePosList(i),s=0,u=a.length;s<u;s++)a[s].length<2||e.mergeCommonEdgeByPolygonMesh(t,a[s],r[s],o);return e.mergePolygonMeshWithComInfo(t,a)}},{key:"mergeCommonPointForPolygonMeshes",value:function(t,r){if(!(r.length<2)){var n=[];r.forEach((function(e){var r=e[0],i=e[1];if(!(r<0||r>=t.length)){var o=t[r];if(!(null===o||i<0||i>=o.boundedEdgePos.length)){var A=o.boundedEdgePos[i];if(null!==A&&0!==A.length){var a=A[0].x;if(!(a<0||a>=o.mSurfaces.length))if(null!==o.mSurfaces[a]){var s=o.boundedIndices[i][0];n.push([r,s])}}}}})),e.updateCommonPtPos(t,n)}}},{key:"updateCommonPtPos",value:function(e,t){for(var r=t[0],n=e[r[0]].coords[r[1]],i=1,o=t.length;i<o;i++){var A=t[i];e[A[0]].coords.splice(A[1],1,n)}}},{key:"buildCommonPtPosLst",value:function(e){for(var t=e.length,r=new Map,n=0;n<t;++n)for(var o=e[n],A=0,a=o.length;A<a;++A){var s=o[A],u=r.get(s),c=[n,A];if(u){var l=[];l.push.apply(l,i(u)),l.push(c),r.set(s,l)}else r.set(s,[c])}var g=[];return r.forEach((function(e,t){g.push(e)})),g}},{key:"buildCommonEdgePosList",value:function(e){for(var t=new Map,r=0,n=e.length;r<n;++r)for(var i=e[r],o=0,A=i.length;o<A;++o){var a=i[o],s=t.get(a.index);if(s)s.push({faceI:r,edgeI:o,isReversed:i[o].isReversed});else{var u=[];u.push({faceI:r,edgeI:o,isReversed:i[o].isReversed}),t.set(a.index,u)}}var c=[];return t.forEach((function(e,t){c.push(e)})),c}},{key:"mergeCommonEdgeByPolygonMesh",value:function(t,r,n,o){var A=r.length;if(e.validCommonEdgeData(t,r,o)){for(var a=[],s=[],u=0;u<A;++u){var c=r[u],l=t[c.faceI],g=[].concat(i(l.boundedIndices[c.edgeI])),f=[].concat(i(l.boundedEdgePos[c.edgeI]));o[c.faceI][c.edgeI]&&(g.reverse(),f.reverse());for(var h=g.length,p=[],d=1;d<h-1;d++){var I=l.coords[g[d]],y=n.getParam(I);p.push(y),s.push(y)}a.push(p)}s=s.sort((function(e,t){return e-t}));e.uniqueDataForList(s,.001);var C=[];s.forEach((function(e){C.push({p:e,pt:n.getPoint(e)})}));var E=0,B=!0,v=!1,m=void 0;try{for(var Q,b=a[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value,S=e.splitParamPtListByParams(C,_,.001),w=r[E];t[w.faceI].insertPtsByPtsList(w.edgeI,S,o[w.faceI][w.edgeI]),E++}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}}}},{key:"splitParamPtListByParams",value:function(e,t,r){var n=[],i=e.length,A=0,a=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0)for(var g=c.value,f=[],h=A;h<i;++h)if(f.push(e[h].pt),o.Num.isBiggerOrEqual(e[h].p,g,r)){n.push(f),A=h+1;break}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}for(var p=[],d=A;d<i;++d)p.push(e[d].pt);return n.push(p),n}},{key:"uniqueDataForList",value:function(e,t){if(!(e.length<2))for(var r=e[0],n=0,i=1,A=e.length;i<A-n;i++)o.Num.isEqual(e[i],r,t)?(e.splice(i,1),n++,i--):r=e[i]}},{key:"validCommonEdgeData",value:function(e,t,r){if(t.length<2)return!1;var n=null,i=null,o=!0,A=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=c.faceI,g=c.edgeI;if(l<0||l>=e.length)return!1;if(g<0||g>=e[l].boundedIndices.length)return!1;var f=e[c.faceI],h=f.boundedIndices[g],p=f.boundedEdgePos[g],d=h.length;if(d<2||d!==p.length+1)return!1;var I=f.coords[h[0]],y=f.coords[h[d-1]];if(null===n)r[l][g]?(n=y,i=I):(n=I,i=y);else if(r[l][g]){if(n!==y||i!==I)return!1}else if(n!==I||i!==y)return!1}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}return!0}},{key:"validPolygonMeshList",value:function(e,t,r){if(t.length!==e.length)return!1;for(var n=0,i=e.length;n<i;++n){var o=e[n];if(r[n].length!==o.boundedIndices.length)return!1}return!0}},{key:"mergePolygonMeshWithComInfo",value:function(e,t){for(var r=new A.PolygonMesh,n=[],o=new Map,a=new Map,s=0,u=t.length;s<u;++s)for(var c=1,l=t[s].length;c<l;++c){var g=a.get(t[s][c].faceI);if(g)g.add(t[s][c].edgeI);else{var f=new Set;f.add(t[s][c].edgeI),a.set(t[s][c].faceI,f)}}var h=0,p=0,d=!0,I=!1,y=void 0;try{for(var C,E=e[Symbol.iterator]();!(d=(C=E.next()).done);d=!0){var B,v,m,Q=C.value;Q.postTreatment();var b=new Map,_=Q.coords,S=0,w=!0,D=!1,R=void 0;try{for(var M,x=_[Symbol.iterator]();!(w=(M=x.next()).done);w=!0){var P=M.value,T=o.get(P);if(void 0===T)b.set(S++,h),void 0===o.get(P)&&o.set(P,h++),r.coords.push(P);else b.set(S++,T)}}catch(e){D=!0,R=e}finally{try{!w&&x.return&&x.return()}finally{if(D)throw R}}var F=Q.coordIndices,O=!0,L=!1,k=void 0;try{for(var N,G=F[Symbol.iterator]();!(O=(N=G.next()).done);O=!0){var U=N.value,j=[],V=!0,Y=!1,H=void 0;try{for(var K,q=U[Symbol.iterator]();!(V=(K=q.next()).done);V=!0){var J=K.value;j.push(b.get(J))}}catch(e){Y=!0,H=e}finally{try{!V&&q.return&&q.return()}finally{if(Y)throw H}}r.coordIndices.push(j)}}catch(e){L=!0,k=e}finally{try{!O&&G.return&&G.return()}finally{if(L)throw k}}(B=r.mSurfaces).push.apply(B,i(Q.mSurfaces)),(v=r.isSameDir).push.apply(v,i(Q.isSameDir)),(m=r.markLoop).push.apply(m,i(Q.markLoop)),n.push(r.coordIndices.length-1);for(var W=a.get(p),z=0,X=Q.boundedIndices.length;z<X;++z)if(!W||!W.has(z)){var Z=[],$=!0,ee=!1,te=void 0;try{for(var re,ne=Q.boundedIndices[z][Symbol.iterator]();!($=(re=ne.next()).done);$=!0){var ie=re.value;Z.push(b.get(ie))}}catch(e){ee=!0,te=e}finally{try{!$&&ne.return&&ne.return()}finally{if(ee)throw te}}r.boundedIndices.push(Z)}p++}}catch(e){I=!0,y=e}finally{try{!d&&E.return&&E.return()}finally{if(I)throw y}}return{pgm:r,range:n}}}]),e}();t.PolygonMeshUtil=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(2057),o=r(2058),A=r(2059),a=r(2062);t.triangulate=function(e,t){if(e.surface instanceof n.Plane)return A.triangulateOnPlane(e,e.surface,t);if(e.surface instanceof n.CylindricalSurface||e.surface instanceof n.ConicalSurface||e.surface instanceof n.SurfaceOfLinearExtrusion)return i.triangulateOnCylinderCone(e,e.surface,t);if(e.surface instanceof n.NurbsSurface)return o.triangulateOnNurbsSurface(e,e.surface,t);if(e.surface instanceof n.ToroidalSurface)return a.triangulateOnRevolveSurface(e,e.surface,t);if(e.surface instanceof n.RevolveSurface)return a.triangulateOnRevolveSurface(e,e.surface,t);throw"unsupported"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(527);t.triangulateOnCylinderCone=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateDevelopable.triangulateOnDevelopable3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(527);t.triangulateOnNurbsSurface=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateNurbs.triangulateOnNurbsSurface3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(2060),A=r(527),a=r(2061);function s(e,t,r){var o=e.getApproximatePoints(t);if(!e.edge.isSoft||!r)return{points:o};var A=c(e.edge);if(!A)return{points:o};for(var a=l(e.vertexA),s=l(e.vertexB),g=new Map,f=[].concat(n(A),n(a),n(s)),h=0,p=f.length;h<p;h++){var d=f[h];if(!g.has(d)){var I=d.surface;if(I instanceof i.Plane){var y=d.sameDir?I.ccs.dz:I.ccs.dz.reversed();g.set(d,y)}}}for(var C=new Array(o.length),E=0,B=o.length;E<B;E++){var v=o[E];0===E&&a.length>0?C[E]=u(a,v,g):E===B-1&&s.length>0?C[E]=u(s,v,g):C[E]=u(A,v,g)}return{points:o,normals:C}}function u(e,t,r){for(var n=void 0,i=0,o=e.length;i<o;i++){var A=e[i],a=r.get(A);a||(a=A.sameDir?A.surface.getNormalOfPoint(t):A.surface.getNormalOfPoint(t).reversed()),n=n?n.added(a):a}return n?n.normalized():void 0}function c(e){for(var t=[],r=e.halfEdges,n=0,i=r.length;n<i;n++){var o=r[n],A=o.loop?o.loop.face:void 0;A&&t.push(A)}if(2===t.length)return t}function l(e){for(var t=new Set,r=e.edges,n=0,i=r.length;n<i;n++){var o=r[n];if(!o.isSoft)return[];var A=c(o);if(!A)return[];for(var a=0,s=A.length;a<s;a++)t.add(A[a])}return Array.from(t)}t.triangulateOnPlane=function(e,t,r){var n=new A.Mesh,i=[],u=0;r=r||{};for(var l=e.sameDir?t.normal:t.normal.reversed(),g=e.getLoops(),f=0,h=g.length;f<h;f++){var p=[],d=g[f].halfEdges,I=0,y=d[0].edge,C=d[d.length-1].edge;y.isSoft&&c(y)||!C.isSoft||!c(C)||(I=d.length-1);for(var E=!1,B=0,v=d.length;B<v;B++){for(var m=s(d[(B+I)%v],r.crvRatioTol,r.needNormal),Q=m.points,b=m.normals,_=E?1:0,S=b&&B!==v-1?Q.length:Q.length-1;_<S;_++){var w=Q[_];p.push(new o.LibtessVertex(w,u++)),o.addVertexNormalUVBy3d(w,n,t,e.sameDir,r.needUV,r.needNormal,void 0,b?b[_]:l)}E=!!b}i.push(p)}for(var D=a.gluTessTriangulate(i,o.toData(e.sameDir?t.normal.toPoint3d():t.normal.reversed().toPoint3d())),R=0;R<D.length;R+=3){var M=o.getOrCreateVertexIndexBy3d(D[R],n,t,e.sameDir,r.needUV,r.needNormal),x=o.getOrCreateVertexIndexBy3d(D[R+1],n,t,e.sameDir,r.needUV,r.needNormal),P=o.getOrCreateVertexIndexBy3d(D[R+2],n,t,e.sameDir,r.needUV,r.needNormal);n.addTriangle([M,x,P])}return r.needUV&&(n.uvIndices=n.triangleIndices),r.needNormal&&(n.normalIndices=n.triangleIndices),n}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.push(e.x),i.push(e.y),i.push(e.z?e.z:0),i.index=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Array),t}();function A(e){return[e.x,e.y,e.z]}t.LibtessVertex=o,t.toData=A,t.getOrCreateVertexIndex=function(e,t,r,n,o,a){if(e.hasOwnProperty("index"))return e.index;var s=new i.UV(e[0],e[1]),u=A(r.getPoint(s));if(t.addVertex(u),o&&t.addUv([s.u,s.v]),a){var c=n?r.getNormal(s):r.getNormal(s).reversed();t.addNormal([c.x,c.y,c.z])}return t.vertices.length-1},t.getOrCreateVertexIndexBy3d=function(e,t,r,n,o,A){if(e.hasOwnProperty("index"))return e.index;t.addVertex(e);var a=void 0;if(o&&(a=r.getParam(new i.Point3d(e[0],e[1],e[2])),t.addUv([a.u,a.v])),A){a||(a=r.getParam(new i.Point3d(e[0],e[1],e[2])));var s=n?r.getNormal(a):r.getNormal(a).reversed();t.addNormal([s.x,s.y,s.z])}return t.vertices.length-1},t.addVertexNormalUV=function(e,t,r,n,i,o,a,s){var u=a||r.getPoint(e);if(t.addVertex(A(u)),i&&t.addUv([e.u,e.v]),o){var c=s;c||(c=n?r.getNormal(e):r.getNormal(e).reversed()),t.addNormal([c.x,c.y,c.z])}},t.addVertexNormalUVBy3d=function(e,t,r,n,i,o,a,s){t.addVertex(A(e));var u=a;if(i&&(u=u||r.getParam(e),t.addUv([u.u,u.v])),o){var c=s;if(!c){var l=r.getNormal(u||r.getParam(e));c=n?l:l.reversed()}t.addNormal([c.x,c.y,c.z])}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(423),i=r(589);function o(e){e!==i.primitiveType.GL_TRIANGLES&&n.consoleLogInDev("expected TRIANGLES but got type: "+e)}function A(e){n.consoleLogInDev("error callback"),n.consoleLogInDev("error number: "+e)}t.gluTessTriangulate=function(e,t){var r=function(){var e=new i.GluTesselator;return e.gluTessCallback(i.gluEnum.GLU_TESS_VERTEX_DATA,(function(e,t){t.push(e)})),e.gluTessCallback(i.gluEnum.GLU_TESS_BEGIN,o),e.gluTessCallback(i.gluEnum.GLU_TESS_ERROR,A),e.gluTessCallback(i.gluEnum.GLU_TESS_COMBINE,(function(e,t,r){return[e[0],e[1],e[2]]})),e.gluTessCallback(i.gluEnum.GLU_TESS_EDGE_FLAG,(function(e){})),e}();r.gluTessNormal(t[0],t[1],t[2]);var n=[];r.gluTessBeginPolygon(n);var a=!0,s=!1,u=void 0;try{for(var c,l=e[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var g=c.value;r.gluTessBeginContour();var f=!0,h=!1,p=void 0;try{for(var d,I=g[Symbol.iterator]();!(f=(d=I.next()).done);f=!0){var y=d.value;r.gluTessVertex(y,y)}}catch(e){h=!0,p=e}finally{try{!f&&I.return&&I.return()}finally{if(h)throw p}}r.gluTessEndContour()}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}return r.gluTessEndPolygon(),n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(527);t.triangulateOnRevolveSurface=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateRevSurface.triangulateOnRevolveSurface3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2064);t.diffMIxShells=function(e,t){return n.diffShells(e.map((function(e){return e.rawObject()})),t.map((function(e){return e.rawObject()})))},t.diffMIxShell=function(e,t){return n.diffShell(e.rawObject(),t.rawObject())},t.diffMIxFace=function(e,t){return n.diffFace(e.rawObject(),t.rawObject())},t.diffMIxLoop=function(e,t){return n.diffLoop(e.rawObject(),t.rawObject())},t.diffMIxHalfEdge=function(e,t){return n.diffHalfEdge(e.rawObject(),t.rawObject())},t.diffMIxEdge=function(e,t){return n.diffEdge(e.rawObject(),t.rawObject())},t.diffMIxVertex=function(e,t){return n.diffVertex(e.rawObject(),t.rawObject())}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(3);function A(e,t){if(e.faces.length!==t.faces.length)return console.error("Different in faces num "+e.faces.length+" : "+t.faces.length),!1;var r=!0,n=!1,o=void 0;try{for(var A,s=function(){var e=A.value;return t.faces.some((function(t){return a(e,t)}))?"continue":(console.error("Different in face."),{v:!1})},u=e.faces[Symbol.iterator]();!(r=(A=u.next()).done);r=!0){var c=s();switch(c){case"continue":continue;default:if("object"===(void 0===c?"undefined":i(c)))return c.v}}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}return e.getEdges().size===t.getEdges().size||(console.error("Different in shell's edge number."),!1)}function a(e,t){if(e.getLoops().length!==t.getLoops().length)return!1;if(!s(e.outerLoop,t.outerLoop))return!1;if(e.innerLoops.length!==t.innerLoops.length)return!1;var r=!0,n=!1,o=void 0;try{for(var A,a=function(){var e=A.value;return t.innerLoops.some((function(t){return s(e,t)}))?"continue":{v:!1}},u=e.innerLoops[Symbol.iterator]();!(r=(A=u.next()).done);r=!0){var c=a();switch(c){case"continue":continue;default:if("object"===(void 0===c?"undefined":i(c)))return c.v}}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}return!0}function s(e,t){if(e.halfEdges.length!==t.halfEdges.length)return!1;var r=0,n=0,i=-1;for(r=0;r<e.halfEdges.length;r++){var A=e.halfEdges[r].getBoundedCurve();if(A){if(-1===i)for(n=0;n<t.halfEdges.length;n++){var a=t.halfEdges[n].getBoundedCurve();if(a&&(o.CurveOverlap.areCurvesTotallyOverlap(A,a)&&A.startPoint.isEqual(a.startPoint))){i=n;break}}if(-1===i)return!1;var s=t.halfEdges[(i+r)%t.halfEdges.length].getBoundedCurve();if(!A.isEqual(s)&&!o.CurveOverlap.areCurvesTotallyOverlap(A,s))return console.error("Different in loop."),!1}}return!0}t.diffShells=function(e,t){if(e.length!==t.length)return console.error("Shells num not equals "+e.length+" : "+t.length),!1;for(var r=new Set,n=0,i=e.length;n<i;n++){for(var o=e[n],a=!1,s=0,u=t.length;s<u;s++){if(!r.has(s))if(A(o,t[s])){r.add(s),a=!0;break}}if(!a)return!1}return!0},t.diffShell=A,t.diffFace=a,t.diffLoop=s,t.diffHalfEdge=function(e,t){var r=e.getBoundedCurve(),n=t.getBoundedCurve();return!(!o.CurveOverlap.areCurvesTotallyOverlap(r,n)||!r.startPoint.isEqual(n.startPoint))||(console.error("Different in half edge."),!1)},t.diffEdge=function(e,t){var r=e.getBoundedCurve(),n=t.getBoundedCurve();return!!o.CurveOverlap.areCurvesTotallyOverlap(r,n)||(console.error("Different in edge."),!1)},t.diffVertex=function(e,t){var r=e.point,n=t.point;return!!r.isEqual(n)||(console.error("Different in vertex"),!1)}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(2066),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,[{key:"toKey",value:function(){return i.idToKey(this.id)}},{key:"equals",value:function(e){return this.id.equals(e.id)}}],[{key:"fromKey",value:function(t){var r=new e;return r.id=i.idFromKey(t),r}},{key:"extractShellKey",value:function(e){return i.extractShellKey(e)}}]),e}();t.MIxName=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(236);t.idToKey=function(e){if(e.type===n.TopoObjectType.kShell)return e.uuid;if(e.type===n.TopoObjectType.kFace){var t=e;return t.shellId.uuid+":"+t.index}if(e.type===n.TopoObjectType.kEdge){var r=e,i="",o="",A=!0,a=!1,s=void 0;try{for(var u,c=r.halfEdgeIds[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){var l=u.value;null!=l.faceId?(i=l.faceId.shellId.uuid+":",o=o+"("+l.faceId.index+":"+l.index+")"):o=o+"(-1:"+l.index+")"}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}return i+o}if(e.type===n.TopoObjectType.kHalfEdge){var g=e;return g.faceId.shellId.uuid+":"+g.faceId.index+":"+g.index}return""},t.idFromKey=function(e){var t=void 0,r=e.split(":");if(e.endsWith(")")){var i=r[0],o=new n.ShellId(i),A=e.split("("),a=[],s=!0,u=!1,c=void 0;try{for(var l,g=A[Symbol.iterator]();!(s=(l=g.next()).done);s=!0){var f=l.value.replace(")","").split(":");if(""!==f[1]){var h=new n.FaceId(o,parseInt(f[0],void 0)),p=new n.HalfEdgeId(h,parseInt(f[1],void 0));a.push(p)}}}catch(e){u=!0,c=e}finally{try{!s&&g.return&&g.return()}finally{if(u)throw c}}t=new n.EdgeId(a)}else if(1===r.length)t=new n.ShellId(r[0]);else if(2===r.length){var d=parseInt(r[1],void 0);t=new n.FaceId(new n.ShellId(r[0]),d)}else{var I=parseInt(r[1],void 0),y=parseInt(r[2],void 0);t=new n.HalfEdgeId(new n.FaceId(new n.ShellId(r[0]),I),y)}return t},t.extractShellKey=function(e){var t=e.split(":");if(t.length>0)return t[0]}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={interceptors:!0,RequestClient:!0,parseCDN:!0,RequestClientParam:!0};Object.defineProperty(t,"RequestClient",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"parseCDN",{enumerable:!0,get:function(){return s.parseCDN}}),Object.defineProperty(t,"RequestClientParam",{enumerable:!0,get:function(){return u.RequestClientParam}}),t.interceptors=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(r,o,A):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r(31));t.interceptors=o;var A,a=(A=r(2069))&&A.__esModule?A:{default:A},s=r(1119),u=r(1120),c=r(2070);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(2072);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=i,t.default=function(e,t){if(t){var r=e[t];return void(r&&(e[t]=i(r)))}return function(t,r){var o,A,a;(0,n.isBoolean)(e)?(A=t[r],o=e):e.axios?(A=e.axios,o=e.isOss,a=e.isCoohom):A=e,A&&(t[r]=i(A,o,a))}};var n=r(2);function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.defaults.retry=!0,e.defaults.retryTimes=t?5:1,e.defaults.retryDelay=1e3,e.defaults.__retryCount=0,e.interceptors.request.use((function(e){return e.retry&&e.__retryCount&&(e.headers["x-retry"]=e.__retryCount),e})),e.interceptors.response.use(void 0,(function(t){var n=t.config;return n&&n.retry?(n.__retryCount=n.__retryCount||0,n.retryTimes=n.retryTimes||0,n.__retryCount>=n.retryTimes?Promise.reject(t):(n.__retryCount+=1,r&&n.url&&n.url.startsWith("/gateway")&&(n.url=n.url.replace("/gateway","")),new Promise((function(e){setTimeout((function(){e()}),n.retryDelay||0)})).then((function(){return e(n)})))):Promise.reject(t)})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(1)),i=o(r(661));function o(e){return e&&e.__esModule?e:{default:e}}function A(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){s=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(s)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},c=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e;return(e=t.client).request.apply(e,arguments)},this.get=function(){var e;return(e=t.client).get.apply(e,arguments)},this.delete=function(){var e;return(e=t.client).delete.apply(e,arguments)},this.post=function(){var e;return(e=t.client).post.apply(e,arguments)},this.put=function(){var e;return(e=t.client).put.apply(e,arguments)},this.encryptedRequest=function(){var e;return(e=t.encryptedClient).request.apply(e,arguments)},this.encryptedGet=function(){var e;return(e=t.encryptedClient).get.apply(e,arguments)},this.encryptedDelete=function(){var e;return(e=t.encryptedClient).delete.apply(e,arguments)},this.encryptedPost=function(){var e;return(e=t.encryptedClient).post.apply(e,arguments)},this.encryptedPut=function(){var e;return(e=t.encryptedClient).put.apply(e,arguments)},this.gzipRequest=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).request.apply(e,arguments):(r=t.encryptedClient).request.apply(r,arguments)},this.gzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).get.apply(e,arguments):(r=t.encryptedClient).get.apply(r,arguments)},this.ossGzipGet=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return u(t,void 0,void 0,n.default.mark((function e(){var t,o,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=function(){return u(this,void 0,void 0,n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.default.wasmLoaded||!(o<20)){e.next=7;break}return t=new Promise((function(e){setTimeout((function(){e()}),1e3)})),o++,e.next=5,t;case 5:return e.next=7,A();case 7:case"end":return e.stop()}}),e)})))},o=0,e.next=4,A();case 4:return e.abrupt("return",(t=this.ossGzippedEncryptClient).get.apply(t,r));case 5:case"end":return e.stop()}}),e,this)})))},this.ossDegradedGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.ossDegradedGzippedEncryptClient).get.apply(e,arguments):(r=t.ossDegradedEncryptedClient).get.apply(r,arguments)},this.pbGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).get.apply(e,arguments):(r=t.pbEncryptedClient).get.apply(r,arguments)},this.gzipDelete=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).delete.apply(e,arguments):(r=t.encryptedClient).delete.apply(r,arguments)},this.gzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).post.apply(e,arguments):(r=t.encryptedClient).post.apply(r,arguments)},this.pbGzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).post.apply(e,arguments):(r=t.pbEncryptedClient).post.apply(r,arguments)},this.gzipPut=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).put.apply(e,arguments):(r=t.encryptedClient).put.apply(r,arguments)}}var t,r,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){var t,r=A(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.request&&(this.client.interceptors.request.use(n.request.beforeSend),this.encryptedClient.interceptors.request.use(n.request.beforeSend),this.gzippedEncryptClient.interceptors.request.use(n.request.beforeSend)),n.response&&(this.client.interceptors.response.use(n.response.afterReceive),this.encryptedClient.interceptors.response.use(n.response.afterReceive),this.gzippedEncryptClient.interceptors.response.use(n.response.afterReceive))}}catch(e){r.e(e)}finally{r.f()}}}])&&s(t.prototype,r),o&&s(t,o),e}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"doTaskPolling",{enumerable:!0,get:function(){return n.doTaskPolling}});var n=r(2071)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doTaskPolling=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2?arguments[2]:void 0;return new Promise((function(n,A){var a=r;(function(e){return o(this,void 0,void 0,i.default.mark((function t(){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.taskPromise,o=e.createStatusOptions,t.abrupt("return",r.then((function(e){return o(e,{resolve:n,reject:A})})));case 2:case"end":return t.stop()}}),t)})))})(e).then((function(e){void 0!==e&&function e(t){return o(this,void 0,void 0,i.default.mark((function r(){var o,s,u,c,l,g,f;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:f=function(){setTimeout((function(){return e(t)}),l)},o=t.url,s=t.params,u=void 0===s?{}:s,c=t.interval,l=void 0===c?3e3:c,g=t.handlePolling,a(o,{params:u}).then((function(e){return g(e.data,{resolve:n,reject:A,next:f})}));case 3:case"end":return r.stop()}}),r)})))}(e)})).catch((function(e){return A(e)})),setTimeout((function(){return A("Time out")}),t)}))};var n,i=(n=r(1))&&n.__esModule?n:{default:n};var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseCode=void 0,t.ResponseCode=n,function(e){e.success="0",e.error="-1"}(n||(t.ResponseCode=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachedService=void 0;var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(47),A=r(356),a=r(2074),s=r(2075),u=r(2079),c=r(2081);function l(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=new A.ServiceConfig,this._resourceService=new s.ResourceDataService(this._config),this._paramModelGetAttachedService=new a.ParamModelGetAttachedService(this._config,this._resourceService),this._paramModelUpdateAttachedService=new c.ParamModelUpdateAttachedService(this._config,this._paramModelGetAttachedService),this._paramModelAssemblyUpdateAttachedService=new u.ParamModelAssemblyUpdateAttachedService(this._config,this._paramModelUpdateAttachedService),this._config[A.__INTERNAL__setHelper]({modelHandler:this._paramModelUpdateAttachedService.modelHandler,getAttachedsByData:this._paramModelGetAttachedService.getAttachedsByData,getRequestClient:this._config[A.__INTERNAL__getRequestClient]})}var t,r,n;return t=e,(r=[{key:"updateAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){var n,A,a,s;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.beforeAttached(),n=new Set,A=new Set,e.forEach((function(e){e instanceof o.CoreParamModel?n.add(e.getRootOrAccessory()):e instanceof o.CoreParamModelAssembly&&A.add(e)})),a=[],n.size&&a.push(this._paramModelUpdateAttachedService.updateModelAttacheds(l(n),t)),A.size&&a.push(this._paramModelAssemblyUpdateAttachedService.updateAssemblyAttacheds(l(A),t)),r.next=9,Promise.all(a);case 9:return s=r.sent,this.afterAttached(),r.abrupt("return",s);case 12:case"end":return r.stop()}}),r,this)})))}},{key:"beforeAttached",value:function(){}},{key:"afterAttached",value:function(){}},{key:"updateModelAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"updateAssemblyAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"config",get:function(){return this._config}},{key:"paramModelGetAttachedService",get:function(){return this._paramModelGetAttachedService}},{key:"paramModelUpdateAttachedService",get:function(){return this._paramModelUpdateAttachedService}}])&&f(t.prototype,r),n&&f(t,n),e}();t.AttachedService=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelGetAttachedService=void 0;var n=h(r(1)),i=h(r(700)),o=h(r(208)),A=r(1121),a=r(956),s=r(2),u=h(r(125)),c=r(717),l=r(716),g=r(1122),f=r(356);function h(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};function E(e,t){if(e.length<=0)return[];var r=e.map((function(e){return{model:e,nodeNumber:B(e)}})).sort((function(e,t){return e.nodeNumber-t.nodeNumber}));if(r[0].nodeNumber>=t)return r.map((function(e){return[e.model]}));for(var n=[],i=[],o=0,A=0,a=r.length;A<a;A++){var s=r[A];o+s.nodeNumber<=t?(o+=s.nodeNumber,i.push(s.model)):(n.push(i),i=[s.model],o=s.nodeNumber)}return i.length>0&&n.push(i),n}function B(e){return e.children.reduce((function(e,t){return e+B(t)}),1)}function v(e){var t=[],r=[];return e.forEach((function(e){t.push.apply(t,I(e.rebuildModels)),r.push.apply(r,I(e.failedModels))})),{rebuildModels:t,failedModels:r}}var m=function(){function e(t,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.resourceService=r,this.getAttachedsByModel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.map((function(e){var t=e.serialize(void 0,!0,!0);return{id:e.getId(),data:t,matrix:e.getConcatenatedMatrix()}}));return i.getAttachedsByData(r.map((function(e){return e.data})),t).then((function(e){return Object.assign(Object.assign({},e),{requestModels:r})}))},this.getAttachedsByData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C(i,void 0,void 0,n.default.mark((function r(){var i,A,a,s,u,c,l,g,f,h,p,d,y,B=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getAttachSwitch();case 2:return i=r.sent,A=i.isNew,a=i.nodeLimit,s=new o.default,A?(c=E(e,a),u=c.map((function(e){return B.requestAttacheds({paramModelDatas:e,context:s,params:t})}))):u=e.map((function(e){return B.requestAttacheds({paramModelDatas:[e],context:s,params:t})})),r.next=8,u.reduce((function(e,t){return C(B,void 0,void 0,n.default.mark((function r(){var i,o,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return i=r.sent,r.next=5,e;case 5:return(o=r.sent).attachedModels.push(i.attachedModels),i.paramModelTasks.length>0&&(A=o.paramModelTasks).push.apply(A,I(i.paramModelTasks)),r.abrupt("return",o);case 9:case"end":return r.stop()}}),r)})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 8:return l=r.sent,g=l.attachedModels,f=l.paramModelTasks,r.next=13,this.processParamModelTasks(f,s);case 13:return h=r.sent,p=h.result,d=h.errorParamModelIds,y=d.reduce((function(t,r){var n=e.find((function(e){return e.id===r}));return n&&t.push(n),t}),[]),r.abrupt("return",Object.assign(Object.assign({},v([].concat(I(g),I(p),[{rebuildModels:[],failedModels:y}]))),{requestModels:e,context:s}));case 18:case"end":return r.stop()}}),r,this)})))},this.rawRequestAttacheds=function(e){return C(i,void 0,void 0,n.default.mark((function t(){var r,i,o,A,a,u,g,h,p,d,y,C,E=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.paramModelDatas,i=e.context,o=e.params,A=e.isRetry,a=void 0!==A&&A,t.next=3,this.config[f.__INTERNAL__getParamModelBackEndParam](r,o);case 3:if(u=t.sent,g=r.map((function(e){return Object.assign({id:e.id,paramModelData:e,retryCount:a?1:void 0,calWireFrames:!0,needCustomFaceData:!1,needResourceData:!1},u)})),t.prev=5,!l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_ENABLE){t.next=12;break}return t.next=9,this.requestAttachedV4NonPb(g);case 9:h=t.sent,t.next=15;break;case 12:return t.next=14,this.originalRequestAttacheds(g);case 14:h=t.sent;case 15:return p=(0,s.map)(h.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})),t.next=18,this.applyAttachedResource(h,i);case 18:if(d=t.sent,y=(d.errorMessages||[]).reduce((function(e,t){if(t.errCode===c.PARAM_MODEL_TOO_BIG_ERROR)return e;var n=r.find((function(e){return e.id===t.paramModelId}));return n&&e.push(n),e}),[]),a||!(y.length>0)){t.next=23;break}return C={attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:[]},paramModelTasks:[]},t.abrupt("return",Promise.all([C].concat(I(y.map((function(e){return E.retryRequestAttacheds({paramModelDatas:[e],context:i,params:o,isRetry:!0})}))))).then((function(e){return{attachedModels:v((0,s.map)(e,"attachedModels")),paramModelTasks:[]}})));case 23:return t.abrupt("return",{attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:y},paramModelTasks:p});case 26:return t.prev=26,t.t0=t.catch(5),t.abrupt("return",{attachedModels:{rebuildModels:[],failedModels:r},paramModelTasks:[]});case 29:case"end":return t.stop()}}),t,this,[[5,26]])})))},this.requestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.retryRequestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.getAttachSwitch=(0,u.default)((function(){return i.config[f.__INTERNAL__getRequestClient]().get("/dcs-model/api/attach/switch").then((function(e){return e.data}),(function(){return{nodeLimit:1,isNew:!1}}))}),Object.assign({promise:!0},c.memoizeValues))}var t,r,h;return t=e,(r=[{key:"processParamModelTasks",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i,o,A,a,u;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=function(e){return C(this,void 0,void 0,n.default.mark((function r(){var c,g,f,h,p,d=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=(0,s.chunk)(e,l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_CHUNK_SIZE),r.next=3,c.reduce((function(e,r){return C(d,void 0,void 0,n.default.mark((function i(){var A,u,c,l;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,a.requestAttachedTasksNonPb(r);case 3:return u=n.sent,n.next=6,a.applyAttachedResource(u,t);case 6:return c=n.sent,n.next=9,e;case 9:l=n.sent,(A=l.paramModelTasks).push.apply(A,I((0,s.map)(u.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})))),l.attachedModels.push({rebuildModels:(0,s.uniqBy)(c.models,"id")||[],failedModels:[]}),n.next=18;break;case 14:return n.prev=14,n.t0=n.catch(0),o.push.apply(o,I((0,s.map)(r,"paramModelId"))),n.abrupt("return",e);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),i,null,[[0,14]])})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 3:if(g=r.sent,f=g.attachedModels,h=g.paramModelTasks,i.push.apply(i,I(f)),!(A<l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_COUNT&&h.length>0)){r.next=16;break}return A++,p=new Promise((function(e){setTimeout((function(){e()}),l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_DELAY||0)})),r.next=12,p;case 12:return r.next=14,u(h);case 14:r.next=17;break;case 16:o.push.apply(o,I((0,s.map)(h,"paramModelId")));case 17:case"end":return r.stop()}}),r)})))},i=[],o=[],A=0,a=this,r.next=7,u(e);case 7:return r.abrupt("return",{result:i,errorParamModelIds:o});case 8:case"end":return r.stop()}}),r,this)})))}},{key:"originalRequestAttacheds",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodel",e);case 2:return r=t.sent,t.abrupt("return",r.data);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedV4NonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model/api/c/parammodel/v4/plain",{requestData:e},{extra:{isRequestBodyJson:!0}});case 2:return r=t.sent,i=r.data,o=A.dcs_model_attach.PBParamModelResponseDataV3.decode(i).toJSON(),(0,g.removeKeys)(o,["FULL_NAME"]),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedTasksNonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model-task/api/site/parammodel/result/plain",A.dcs_model_attach.PBParamModelTaskQueryRequests.create({requests:e}));case 2:return r=t.sent,i=A.dcs_model_attach.PBParamModelResponseDataV3.decode(r.data).toJSON(),(0,g.removeKeys)(i,["FULL_NAME"]),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"applyAttachedResource",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.resourceService.updateParamModelDataWithResource(e);case 2:return i=r.sent,t.addCustomResources(i),r.abrupt("return",i);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"createParams",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var o,A,a;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e.getRootOrAccessory(),A=o.serialize(void 0,!0,!0),a={paramModelData:A,variableParams:[t]},r.next=6,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodeldata/param/update",a).then((function(e){for(var r=e.data,n=function(e){var n=r.children.find((function(r){return r.id===t.paramModelPath[e]}));if(!n)return{v:void 0};r=n},o=1;o<t.paramModelPath.length;o++){var A=n(o);if("object"===p(A))return A.v}var a=(r.params||[]).find((function(e){var r;return e.name===(null===(r=t.paramOperates[0])||void 0===r?void 0:r.param.name)}));if(a)return new i.default(a)}));case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(0),r.abrupt("return",void 0);case 12:case"end":return r.stop()}}),r,this,[[0,9]])})))}}])&&d(t.prototype,r),h&&d(t,h),e}();t.ParamModelGetAttachedService=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceDataService=void 0;var n=A(r(1)),i=A(r(2076)),o=r(356);function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g,f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};!function(e){e.Array="Array",e.Object="Object"}(g||(g={}));var h=new i.default({maxAge:36e5,max:200}),p=function(e,t,r){var n,i=u(e.keys());try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.split("_")[0]===t)if(o.split("_")[1].split(",").includes(r.toString())&&e.get(o))return o}}catch(e){i.e(e)}finally{i.f()}return""},d=function(e,t){return function(r,i,o){return f(void 0,void 0,void 0,n.default.mark((function A(){var a,s,c,l,f,d;return n.default.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:a=o===g.Array?[]:{},c=r.sort(),l=u(c),A.prev=3,d=n.default.mark((function r(){var o,A,u,l,g;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=f.value,A=p(h,i,o),u=void 0,A?(s=A,u=h.get(s)):(s="".concat(i,"_").concat(c.toString()),u=e(c),h.set(s,u)),r.prev=4,r.next=7,u;case 7:l=r.sent,Array.isArray(a)&&t?(g=l.find((function(e){return e[t.dataItemFilterField]===o})))&&a.push(g):l[o]&&(a[o]=l[o]),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(4),h.del(s);case 14:case"end":return r.stop()}}),r,null,[[4,11]])})),l.s();case 6:if((f=l.n()).done){A.next=10;break}return A.delegateYield(d(),"t0",8);case 8:A.next=6;break;case 10:A.next=15;break;case 12:A.prev=12,A.t1=A.catch(3),l.e(A.t1);case 15:return A.prev=15,l.f(),A.finish(15);case 18:return A.abrupt("return",a);case 19:case"end":return A.stop()}}),A,null,[[3,12,15,18]])})))}},I=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSpecificProductData=function(e){return function(t){return f(r,void 0,void 0,n.default.mark((function r(){var i,A=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.length){r.next=2;break}return r.abrupt("return",[]);case 2:return r.next=4,d((function(t){return f(A,void 0,void 0,n.default.mark((function r(){var i,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 3:return i=r.sent,A=i.data,r.abrupt("return",null==A?void 0:A.d[e]);case 8:return r.prev=8,r.t0=r.catch(0),r.abrupt("return",[]);case 11:case"end":return r.stop()}}),r,this,[[0,8]])})))}),{dataItemFilterField:"brandGoodId"})(t,e,g.Array);case 4:return i=r.sent,r.abrupt("return",i);case 6:case"end":return r.stop()}}),r)})))}},this.resourceObtainList=[{targetField:"hardwares",idField:"hardwareBgIds",handler:this.getSpecificProductData("hardwares"),dataType:g.Array},{targetField:"textures",idField:"textureBgIds",handler:this.getSpecificProductData("textures"),dataType:g.Array},{targetField:"virtualModels",idField:"virtualModelBgIds",handler:this.getSpecificProductData("virtualModels"),dataType:g.Array},{targetField:"paramModelProducts",idField:"paramModelBgIds",handler:this.getSpecificProductData("paramModelProducts"),dataType:g.Array},{targetField:"moldings",idField:"moldingBgIds",handler:this.getSpecificProductData("moldings"),dataType:g.Array},{targetField:"paramPackages",idField:"obsParamPackageIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/parampackage",{obsParamPackageIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"id"}),dataType:g.Array},{targetField:"displayInfoMap",idField:"hardwareBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displayinfo",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"displayInfoMap",idField:"textureBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displaymaterial",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"fitRules",idField:"obsRuleIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/fitrule",{obsRuleIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"obsRuleId"}),dataType:g.Array}]}var t,r,i;return t=e,(r=[{key:"updateParamModelDataWithResource",value:function(e){return f(this,void 0,void 0,n.default.mark((function t(){var r,i=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.assign({},e),t.next=3,Promise.all(this.resourceObtainList.map((function(e){return f(i,void 0,void 0,n.default.mark((function t(){var i,o,A,s,u,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.targetField,o=e.idField,A=e.handler,s=e.dataType,!(u=r[o]||[]).length){t.next=7;break}return t.next=5,A(u,i,s);case 5:c=t.sent,s===g.Array?r[i]=r[i]?[].concat(a(r[i]),a(c)):c:r[i]=r[i]?Object.assign(Object.assign({},r[i]),c):c;case 7:case"end":return t.stop()}}),t)})))})));case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t,this)})))}}])&&s(t.prototype,r),i&&s(t,i),e}();t.ResourceDataService=I},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(2077),A=Symbol("max"),a=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),g=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=function(){return 1},I=function(){function e(t){if(n(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[A]=t.max||1/0;var r=t.length||d;if(this[s]="function"!=typeof r?d:r,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0,this[l]=t.dispose,this[g]=t.noDisposeOnSet||!1,this[p]=t.updateAgeOnGet||!1,this.reset()}var t,r,I;return t=e,(r=[{key:"max",get:function(){return this[A]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[A]=e||1/0,E(this)}},{key:"allowStale",get:function(){return this[u]},set:function(e){this[u]=!!e}},{key:"maxAge",get:function(){return this[c]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,E(this)}},{key:"lengthCalculator",get:function(){return this[s]},set:function(e){var t=this;"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[a]=0,this[f].forEach((function(e){e.length=t[s](e.value,e.key),t[a]+=e.length}))),E(this)}},{key:"length",get:function(){return this[a]}},{key:"itemCount",get:function(){return this[f].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var r=this[f].tail;null!==r;){var n=r.prev;m(this,e,r,t),r=n}}},{key:"forEach",value:function(e,t){t=t||this;for(var r=this[f].head;null!==r;){var n=r.next;m(this,e,r,t),r=n}}},{key:"keys",value:function(){return this[f].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[f].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[l]&&this[f]&&this[f].length&&this[f].forEach((function(t){return e[l](t.key,t.value)})),this[h]=new Map,this[f]=new o,this[a]=0}},{key:"dump",value:function(){var e=this;return this[f].map((function(t){return!C(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[f]}},{key:"set",value:function(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");var n=r?Date.now():0,i=this[s](t,e);if(this[h].has(e)){if(i>this[A])return B(this,this[h].get(e)),!1;var o=this[h].get(e).value;return this[l]&&(this[g]||this[l](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[a]+=i-o.length,o.length=i,this.get(e),E(this),!0}var u=new v(e,t,i,n,r);return u.length>this[A]?(this[l]&&this[l](e,t),!1):(this[a]+=u.length,this[f].unshift(u),this[h].set(e,this[f].head),E(this),!0)}},{key:"has",value:function(e){if(!this[h].has(e))return!1;var t=this[h].get(e).value;return!C(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[f].tail;return e?(B(this,e),e.value):null}},{key:"del",value:function(e){B(this,this[h].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{var o=i-t;o>0&&this.set(n.k,n.v,o)}}}},{key:"prune",value:function(){var e=this;this[h].forEach((function(t,r){return y(e,r,!1)}))}}])&&i(t.prototype,r),I&&i(t,I),e}(),y=function(e,t,r){var n=e[h].get(t);if(n){var i=n.value;if(C(e,i)){if(B(e,n),!e[u])return}else r&&(e[p]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return i.value}},C=function(e,t){if(!t||!t.maxAge&&!e[c])return!1;var r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},E=function(e){if(e[a]>e[A])for(var t=e[f].tail;e[a]>e[A]&&null!==t;){var r=t.prev;B(e,t),t=r}},B=function(e,t){if(t){var r=t.value;e[l]&&e[l](r.key,r.value),e[a]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}},v=function e(t,r,i,o,A){n(this,e),this.key=t,this.value=r,this.length=i,this.now=o,this.maxAge=A||0},m=function(e,t,r,n){var i=r.value;C(e,i)&&(B(e,r),e[u]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=I},function(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function A(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)A(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,n=this.head;null!==n&&r<e;r++)n=n.next;var o=[];for(r=0;n&&r<t;r++)o.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(r=0;r<(arguments.length<=2?0:arguments.length-2);r++)n=i(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(2078)(n)}catch(e){}},function(e,t,r){"use strict";r.r(t),function(e){var t=r(1),n=r.n(t);e.exports=function(e){e.prototype[Symbol.iterator]=n.a.mark((function e(){var t;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}}.call(this,r(840)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyUpdateAttachedService=void 0;var n,i=(n=r(208))&&n.__esModule?n:{default:n},o=r(243),A=r(2),a=r(356),s=r(2080);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.paramModelService=r}var t,r,n;return t=e,(r=[{key:"updateAssemblyAttacheds",value:function(e,t){var r=this,n=Object.assign(Object.assign({},this.config[a.__INTERNAL__getDefaultParams]()),t),i=this.config[a.__INTERNAL__chunkParamAssemblyModels](e,n).map((function(e){return r.updateAssemblyAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(i)}},{key:"updateAssemblyAttachedsInternal",value:function(e,t){var r=[],n=[];e.forEach((function(e){e.isTemplateAssembly()?r.push(e):n.push(e)}));var i=[];return n.length>0&&i.push(this.updateInstanceAttacheds(n,t)),r.length>0&&i.push(this.updateTemplateAttacheds(r,t)),Promise.all(i)}},{key:"updateInstanceAttacheds",value:function(e,t){var r=(0,A.flatMap)(e,(function(e){return e.getParamModels()}));return this.paramModelService.updateModelAttacheds(r,t)}},{key:"updateTemplateAttacheds",value:function(e,t){var r=this,n=t.excludeAccessories,i=e.map((function(e){return r.updateTemplateAttached(e,t)}));if(!n){var a=(0,A.flatMap)(e,(function(e){return o.ParamModelUtils.collectAccessories(e.getParamModels())}));a.length>0&&i.push(this.paramModelService.updateModelAttacheds(a,t))}return Promise.all(i)}},{key:"updateTemplateAttached",value:function(e,t){var r=t.applyTransform,n=e.serialize(void 0,!1,{includeAccessory:!1,isRootWorldMatrix:!0});return(0,s.getTemplateAttachedByData)(n,t,this.config).then((function(t){var n=new i.default;n.addCustomResources(t);var o=e.getPosition().clone(),A=e.getRotation().clone(),a=t.assemblyDatas[0];if(a)e.parse(a,n,{isRootWorldMatrix:!0});else{e.applyResource(n,!0);var s,c=e.getMatrix4(),l=u(e.getParamModels());try{for(l.s();!(s=l.n()).done;){var g=s.value;g.setMatrix4(c.clone().multiply(g.getMatrix4()))}}catch(e){l.e(e)}finally{l.f()}}("function"==typeof r?r(e.getId()):r)||e.updateTransform(o,A),e.setHasAttached(!0),e.getParamModels().forEach((function(e){return e.setHasAttached(!0)}))}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyUpdateAttachedService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateAttachedByData=function(e,t,r){return A(this,void 0,void 0,i.default.mark((function n(){var A,a,s;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r[o.__INTERNAL__getParamModelAssemblyBackEndParam]([e],t);case 2:return A=n.sent,a=[Object.assign({id:e.id,assemblyData:e,calWireFrames:!0},A)],n.next=6,r[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/assemblymodel",a);case 6:return s=n.sent,n.abrupt("return",s.data);case 8:case"end":return n.stop()}}),n)})))};var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(356);var A=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelUpdateAttachedService=void 0;var n=r(243),i=r(356),o=r(2082);function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAttached=r,this.modelHandler=function(e,t){var r=t.applyTransform;return n.getAttached.getAttachedsByModel(e,t).then((function(t){return n.applyAttached(e,t,r)}))},this.applyAttached=function(e,t,r){var n=t.rebuildModels,i=t.failedModels,A=t.context,a=t.requestModels;e.forEach((function(e){if(e.setHasAttached(!0),i.find((function(t){return t.id===e.id})))e.setLegal(!1);else{var t=e.getMatrix4(),s=e.getPosition().clone(),u=e.getRotation().clone(),c=n.find((function(t){return t.id===e.id}));c?e.parse(c,A):e.applyResource(A,!0);var l=a?a.find((function(t){return t.id===e.id})).matrix:void 0,g=e.getMatrix4();(0,o.handleTransform)(e,{applyTransform:r,position:s,rotation:u,matrix:t,requestMatrix:l,responseMatrix:g})}}))}}var t,r,a;return t=e,(r=[{key:"updateModelAttacheds",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},this.config[i.__INTERNAL__getDefaultParams]()),r),o=this.config[i.__INTERNAL__chunkParamModels](e,n),A=o.map((function(e){return t.updateAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(A)}},{key:"updateAttachedsInternal",value:function(e,t){return t.excludeAccessories||(e=n.ParamModelUtils.flattenModels(e)),this.modelHandlerWrapper(e,t)}},{key:"modelHandlerWrapper",value:function(e,t){var r=this,n=new Map,o=this.config[i.__INTERNAL__getParamModelHandlers]();e.forEach((function(e){var t=o.find((function(t){return t.filter(e)})),i=t?t.attachHandler:r.modelHandler,A=n.get(i);void 0===A&&(A=[],n.set(i,A)),A.push(e)}));var A=[];return n.forEach((function(e,r){return A.push(r(e,t))})),Promise.all(A)}}])&&A(t.prototype,r),a&&A(t,a),e}();t.ParamModelUpdateAttachedService=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleTransform=function(e,t){var r=t.applyTransform,o=t.position,A=t.rotation,a=t.matrix,s=t.requestMatrix,u=t.responseMatrix;if("function"==typeof r?r(e.getId()):r){if(!a||!s||!u)return;if(!n.default.equals(s,a)){var c=(new i.default).getInverse(s).premultiply(a);e.setMatrix4(u.clone().premultiply(c))}}else{if(!o||!A)return;e.setPosition(o),e.setRotation(A)}};var n=o(r(114)),i=o(r(44));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2084);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2089);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelDataService=void 0;var n=p(r(1)),i=r(47),o=r(10),A=r(1121),a=p(r(5)),s=p(r(125)),u=r(2085),c=r(1123),l=r(717),g=r(716),f=r(1122),h=r(108);function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},y=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.noCacheGetParamModelDataByBrandGoodId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return I(r,void 0,void 0,n.default.mark((function r(){var i,o,a,s;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!g.COMMON_ENV.PARAM_MODEL_DATA_PB_ENABLE){r.next=18;break}return i=u.util.toJSONOptions.defaults||!0,u.util.toJSONOptions.defaults=!0,r.prev=3,r.next=6,this.config.requestClient.pbGzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"/v2?cache=").concat(t));case 6:return o=r.sent,a=A.dcs_model.PBParamModelViewData.decode(o.data).toJSON(),(0,f.removeKeys)(a,["FULL_NAME"]),r.abrupt("return",a);case 12:return r.prev=12,r.t0=r.catch(3),r.abrupt("return",Promise.reject(r.t0));case 15:return r.prev=15,u.util.toJSONOptions.defaults=i,r.finish(15);case 18:return r.next=20,this.config.requestClient.gzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"?cache=").concat(t));case 20:return s=r.sent,r.abrupt("return",s.data);case 22:case"end":return r.stop()}}),r,this,[[3,12,15,18]])})))},this.getParamModelDataByBrandGoodId=(0,s.default)((function(e){return r.noCacheGetParamModelDataByBrandGoodId(e,!0)}),Object.assign({promise:!0},l.memoizeValues))}var t,r,p;return t=e,(r=[{key:"getParamModelByProduct",value:function(e){return I(this,void 0,void 0,n.default.mark((function t(){var r,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getParamModelDataByBrandGoodId(e.brandGoodId);case 2:return r=t.sent,o=(new this.config.paramModelConstructor).parse(r.paramModelData,(new i.CoreCustomContext).addProduct(e)),(0,h.attach)(o,(0,h.toAttachedMap)(r)),o.setSize(this.calcSizeByProduct(o,e)),o.assignUniqueId(),(0,c.updatePositionByOffGround)(o,0),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"calcSizeByProduct",value:function(e,t){var r=t.size;return new a.default(r&&r.x||e.getParsedValue(o.ParamName.WIDTH),r&&r.y||e.getParsedValue(o.ParamName.DEPTH),r&&r.z||e.getParsedValue(o.ParamName.HEIGHT))}}])&&d(t.prototype,r),p&&d(t,p),e}();t.ParamModelDataService=y},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeInferBoundingBox=u,t.computeInferBoxHeight=function(e){var t=u(e).boundingBox;return Math.abs(t.max.z-t.min.z)};var n=s(r(417)),i=s(r(141)),o=s(r(98)),A=s(r(44)),a=s(r(5));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.getPosition().clone(),r=e.getRotation().clone(),s=e.getBox3(),u=n.default.reorderToBackend(r).z,c=(new A.default).compose(t.clone().negate(),(new o.default).setFromVector3(new a.default(0,0,-u))),l=s.getPoints().map((function(e){return e.clone().applyMatrix4(c)}));return{boundingBox:(new i.default).setFromPoints(l),position:t,rotationZ:u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isModelTop=function(e){return!(e instanceof n.CoreParamModel)||e.isRoot()&&!e.getAssembly()};var n=r(47)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTransform=function(e,t){var r=t.position,n=t.rotation,a=t.scale;if(e instanceof i.CoreParamModel)r&&e.setPosition(r),n&&e.setRotation(n),a&&e.setScale(a);else{var s=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getPosition(),"x","y","z")),r)),u=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getRotation(),"x","y","z")),n)),c=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getScale(),"x","y","z")),a));e.updateTransform(s,u,c)}};var n,i=r(47),o=(n=r(5))&&n.__esModule?n:{default:n},A=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyDataService=void 0;var n,i=r(47),o=r(1089),A=r(518),a=(n=r(125))&&n.__esModule?n:{default:n},s=r(1123),u=r(717),c=r(108);function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAssemblyDataByBrandGoodId=(0,a.default)((function(e,t){return r.config.requestClient.gzipGet("/dcs-model/api/c/assemblydata",{params:{bgid:e,assemblycollectiondataid:t}}).then((function(e){return e.data}))}),Object.assign({promise:!0},u.memoizeValues))}var t,r,n;return t=e,(r=[{key:"getAssemblyByProduct",value:function(e,t){return this.getAssemblyDataByBrandGoodId(t.brandGoodId,t.assemblyCollectionDataId).then((function(r){var n,a=r.assemblyData;(0,A.isAssemblyCollectionProduct)(t)?(a.collectBrandGoodId||(a=Object.assign(Object.assign({},a),{collectBrandGoodId:t.brandGoodId})),n=t.assembly):n=!0;var u=(0,o.parseAssembly)(a,new i.CoreCustomContext,n,e.paramModelAssemblyConstructor);return(0,c.attach)(u,(0,c.toAttachedMap)(r)),(0,s.updatePositionByOffGround)(u,0),u.assignUniqueId()}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyDataService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={response:{afterReceive:function(e){if(e.headers&&e.headers.hasOwnProperty("x-qunhe-bizcode")){var t={errorCodeData:e.data,response:e};return Promise.reject(t)}return e}}};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.point=e,this.offset=t};t.default=n},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.lengths=e,this.intersections=[]}return e.prototype.addIntersection=function(e){this.intersections.push(e)},e.prototype.getPoints=function(){return this.intersections.map((function(e){return e.point}))},e.prototype.getPointsInside=function(e){var t,r,i=[];try{for(var o=n(this.intersections),A=o.next();!A.done;A=o.next()){var a=A.value;a.offset.x>-e&&a.offset.x<this.lengths.x+e&&a.offset.y>-e&&a.offset.y<this.lengths.y+e&&i.push(a.point)}}catch(e){t={error:e}}finally{try{A&&!A.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i},e}();t.default=i},function(e,t,r){},function(e,t,r){"use strict";r.r(t),r.d(t,"FittingDesignService",(function(){return Sv})),r.d(t,"IntersectedService",(function(){return Am})),r.d(t,"CustomModelService",(function(){return dm})),r.d(t,"FittingHintService",(function(){return Qm})),r.d(t,"FittingModelService",(function(){return Om})),r.d(t,"ECameraMode",(function(){return Tm})),r.d(t,"ECameraMoveDirection",(function(){return Fm})),r.d(t,"ModelCameraService",(function(){return Ym})),r.d(t,"ModelHintService",(function(){return Zm})),r.d(t,"ModelService",(function(){return gQ})),r.d(t,"ESelectedType",(function(){return EQ})),r.d(t,"ESetSelectType",(function(){return BQ})),r.d(t,"ModelViewerSelectionService",(function(){return QQ})),r.d(t,"ModelViewerSelectionV2Service",(function(){return TQ})),r.d(t,"ModelViewerService",(function(){return YQ})),r.d(t,"PlankPathService",(function(){return gb})),r.d(t,"ModelValidateService",(function(){return Bb})),r.d(t,"SceneService",(function(){return Db})),r.d(t,"Application",(function(){return Q_})),r.d(t,"EIntersectedCreatedType",(function(){return f})),r.d(t,"EIntersectedType",(function(){return l})),r.d(t,"EFittingType",(function(){return c})),r.d(t,"EIntersectedInfoType",(function(){return g})),r.d(t,"ELanguage",(function(){return ve})),r.d(t,"FITTING_PARAM_GEOMETRY_COLOR_KEY",(function(){return Se})),r.d(t,"FITTING_PARAM_GEOMETRY_OPACITY_KEY",(function(){return we})),r.d(t,"CUSTOM_MODEL_CATEGORY_FILTER",(function(){return De})),r.d(t,"EPointType",(function(){return w})),r.d(t,"ELineType",(function(){return D})),r.d(t,"EDesignMode",(function(){return Qe})),r.d(t,"ETriggerType",(function(){return be})),r.d(t,"EModelType",(function(){return _e})),r.d(t,"KEYBOARD_KEY",(function(){return xe})),r.d(t,"EIntersectModelType",(function(){return I})),r.d(t,"EProductDirection",(function(){return y})),r.d(t,"EPlankPathType",(function(){return Re})),r.d(t,"EElementType",(function(){return Me})),r.d(t,"EToolType",(function(){return Ig}));r(733),r(1346);var n,i,o,A,a=r(1),s=r.n(a),u=r(3);!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL",e.ORDER_AUDIT="ORDER_AUDIT",e.FOP_ORDER="FOP_ORDER",e.DOOR_COVERING_HARDWARE="DOOR_COVERING_HARDWARE"}(n||(n={})),function(e){e.TRUE="true",e.FALSE="false"}(i||(i={})),function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(o||(o={})),function(e){e.Intersect="intersect",e.Validity="validity",e.Rule="rule"}(A||(A={}));var c,l,g,f,h,p,d,I,y,C,E,B,v,m,Q,b,_,S,w,D,R,M,x,P="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),F=new Array(36);function O(e,t,r){return void 0===r&&(r="-"),[t,e].map((function(e){return e.replace(new RegExp("^"+r+"+|"+r+"+$","g"),"")})).filter((function(e){return!!e.trim()})).join(r)}!function(e){e[e.GROOVE=1]="GROOVE",e[e.HOLE=2]="HOLE",e[e.HARDWARE=3]="HARDWARE",e[e.HARDWARE_GROOVE=4]="HARDWARE_GROOVE",e.INTERSECTED="intersected"}(c||(c={})),function(e){e.SHELL="1",e.FACE="2",e.THROUGH_SHELL="3"}(l||(l={})),function(e){e.SHELL="1",e.THROUGH_SHELL="3"}(g||(g={})),function(e){e[e.BOTH_PLANK=0]="BOTH_PLANK",e[e.PLANK_FURNITURE=1]="PLANK_FURNITURE"}(f||(f={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.LOCK=1]="LOCK",e[e.UNLOCK=2]="UNLOCK",e[e.RAW=3]="RAW"}(h||(h={})),function(e){e.Space="spaceDivision"}(p||(p={})),function(e){e[e.CAD=7]="CAD",e[e.JPG=2]="JPG",e[e.PDF=3]="PDF"}(d||(d={})),function(e){e[e.PLANK=0]="PLANK",e[e.HARDWARE=1]="HARDWARE",e[e.PRODUCT=2]="PRODUCT"}(I||(I={})),function(e){e[e.XY=0]="XY",e[e.YZ=1]="YZ",e[e.XZ=2]="XZ"}(y||(y={})),function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(C||(C={})),function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=6]="TEMPLATE_ASSEMBLY"}(E||(E={})),function(e){e.MINIAPP_APPEND="$$miniappAppend"}(B||(B={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE",e[e.BZ_STORE=2]="BZ_STORE"}(v||(v={})),function(e){e.NAME="name",e.REMARK="remark",e.POSITION="position",e.ROTATION="rotation",e.TOOL_TYPE="toolType",e.POSITION_FORMULA="positionFormula",e.ROTATION_FORMULA="rotationFormula"}(m||(m={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(Q||(Q={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(b||(b={})),function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(_||(_={})),function(e){e.number="number",e.string="string",e.boolean="boolean"}(S||(S={})),function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE",e[e.ELLIPSE=4]="ELLIPSE"}(w||(w={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(D||(D={})),function(e){e.Wardrobe="Wardrobe",e.WardrobeCopy="WardrobeCopy",e.Cabinet="Cabinet",e.CabinetCopy="CabinetCopy",e.DoorWindow="DoorWindow",e.DoorWindowCopy="DoorWindowCopy",e.CustomGroup="CustomGroup"}(R||(R={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(M||(M={})),function(e){e.Design="Design",e.Audit="Audit",e.Production="Production"}(x||(x={}));var L,k,N,G,U,j,V,Y=[[M.Cabinet,0],[M.Wardrobe,1],[M.DoorWindow,2],[M.CabinetCopy,4],[M.WardrobeCopy,5],[M.DoorWindowCopy,6]],H=[[x.Design,0],[x.Audit,1],[x.Production,2]],K=new Map(Y),q=(new Map(H),new Map(Y.map((function(e){return e.reverse()}))),new Map(H.map((function(e){return e.reverse()}))),[[M.Cabinet,R.Cabinet],[M.Wardrobe,R.Wardrobe],[M.DoorWindow,R.DoorWindow],[M.CabinetCopy,R.CabinetCopy],[M.WardrobeCopy,R.WardrobeCopy],[M.DoorWindowCopy,R.DoorWindowCopy]]),J=new Map(q);new Map(q.map((function(e){return e.reverse()})));function W(e,t){return void 0===t&&(t=!1),t?R.CustomGroup:J.get(e)}!function(e){e.waiting="waiting",e.assigned="assigned",e.running="running",e.finished="finished",e.abnormal="abnormal",e.failed="failed"}(L||(L={})),function(e){e.BODY="BODY",e.BACK="BACK",e.DOOR="DOOR"}(k||(k={})),function(e){e.LineSeg="LineSeg",e.Arc="Arc"}(N||(N={})),function(e){e.PLANK="PLANK",e.FITTING="FITTING",e.AUXILIARY="AUXILIARY"}(G||(G={})),function(e){e.PLANK="PLANK",e.FITTING="FITTING",e.AUXILIARY="AUXILIARY",e.LAMELLO="LAMELLO",e.LOCK="LOCK"}(U||(U={})),function(e){e.SQUARE="SQUARE",e.ROUND_CORNER="ROUND_CORNER",e.PATH="PATH",e.SPECIAL_SHAPED="SPECIAL_SHAPED"}(j||(j={})),function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(V||(V={}));
66
+ */A=function(){return function e(t,r,n){function i(A,a){if(!r[A]){if(!t[A]){if(o)return o(A,!0);var s=new Error("Cannot find module '"+A+"'");throw s.code="MODULE_NOT_FOUND",s}var u=r[A]={exports:{}};t[A][0].call(u.exports,(function(e){var r=t[A][1][e];return i(r||e)}),u,u.exports,e,t,r,n)}return r[A].exports}for(var o=!1,A=0;A<n.length;A++)i(n[A]);return i}({1:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,A=new i(c),a=e.document.createTextNode("");A.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var s=new e.MessageChannel;s.port1.onmessage=c,r=function(){s.port2.postMessage(0)}}var u=[];function c(){var e,t;n=!0;for(var r=u.length;r;){for(t=u,u=[],e=-1;++e<r;)t[e]();r=u.length}n=!1}t.exports=function(e){1!==u.push(e)||n||r()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var n=e(1);function i(){}var o={},A=["REJECTED"],s=["FULFILLED"],u=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function g(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return o.reject(e,t)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function f(e){var t=e&&e.then;if(e&&("object"===a(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var A=p((function(){t(i,n)}));"error"===A.status&&n(A.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===A)return this;var r=new this.constructor(i);return this.state!==u?g(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){g(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){o.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){g(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=s,e.outcome=t;for(var i=-1,A=e.queue.length;++i<A;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=A,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A=new Array(r),a=0,s=-1,u=new this(i);++s<r;)c(e[s],s);return u;function c(e,i){t.resolve(e).then((function(e){A[i]=e,++a!==r||n||(n=!0,o.resolve(u,A))}),(function(e){n||(n=!0,o.reject(u,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A,a=-1,s=new this(i);++a<r;)A=e[a],t.resolve(A).then((function(e){n||(n=!0,o.resolve(s,e))}),(function(e){n||(n=!0,o.reject(s,e))}));return s}},{1:1}],3:[function(e,t,n){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},i=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var A=Promise;function s(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function l(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var g=void 0,f={},h=Object.prototype.toString;function p(e){return"boolean"==typeof g?A.resolve(g):function(e){return new A((function(t){var r=e.transaction("local-forage-detect-blob-support","readwrite"),n=o([""]);r.objectStore("local-forage-detect-blob-support").put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return g=e}))}function d(e){var t=f[e.name],r={};r.promise=new A((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function I(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function y(e,t){var r=f[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function C(e,t){return new A((function(r,n){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);d(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var A=i.open.apply(i,o);t&&(A.onupgradeneeded=function(t){var r=A.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore("local-forage-detect-blob-support")}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),A.onerror=function(e){e.preventDefault(),n(A.error)},A.onsuccess=function(){r(A.result),I(e)}}))}function E(e){return C(e,!1)}function B(e){return C(e,!0)}function v(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,i=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||r){if(r){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function m(e){return o([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}(atob(e.data))],{type:e.type})}function Q(e){return e&&e.__local_forage_encoded_blob}function b(e){var t=this,r=t._initReady().then((function(){var e=f[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(r,e,e),r}function _(e,t,r,n){void 0===n&&(n=1);try{var i=e.db.transaction(e.storeName,t);r(null,i)}catch(i){if(n>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return A.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),B(e)})).then((function(){return function(e){d(e);for(var t=f[e.name],r=t.forages,n=0;n<r.length;n++){var i=r[n];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,E(e).then((function(t){return e.db=t,v(e)?B(e):t})).then((function(n){e.db=t.db=n;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=n})).catch((function(t){throw y(e,t),t}))}(e).then((function(){_(e,t,r,n-1)}))})).catch(r);r(i)}}var S={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var i=f[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},f[r.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=b);var o=[];function a(){return A.resolve()}for(var s=0;s<i.forages.length;s++){var u=i.forages[s];u!==t&&o.push(u._initReady().catch(a))}var c=i.forages.slice(0);return A.all(o).then((function(){return r.db=i.db,E(r)})).then((function(e){return r.db=e,v(r,t._defaultConfig.version)?B(r):e})).then((function(e){r.db=i.db=e,t._dbInfo=r;for(var n=0;n<c.length;n++){var o=c[n];o!==t&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))},_support:function(){try{if(!i||!i.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).openCursor(),a=1;A.onsuccess=function(){var r=A.result;if(r){var n=r.value;Q(n)&&(n=m(n));var i=e(n,r.key,a++);void 0!==i?t(i):r.continue()}else t()},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).get(e);A.onsuccess=function(){var e=A.result;void 0===e&&(e=null),Q(e)&&(e=m(e)),t(e)},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=new A((function(r,i){var o;n.ready().then((function(){return o=n._dbInfo,"[object Blob]"===h.call(t)?p(o.db).then((function(e){return e?t:(r=t,new A((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:r.type})},n.readAsBinaryString(r)})));var r})):t})).then((function(t){_(n._dbInfo,"readwrite",(function(o,A){if(o)return i(o);try{var a=A.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var s=a.put(t,e);A.oncomplete=function(){void 0===t&&(t=null),r(t)},A.onabort=A.onerror=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readwrite",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){n(A.error)},o.onabort=function(){var e=A.error?A.error:A.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readwrite",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){e<0?t(null):r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName),a=!1,s=A.openKeyCursor();s.onsuccess=function(){var r=s.result;r?0===e||a?t(r.key):(a=!0,r.advance(e)):t(null)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),A=[];o.onsuccess=function(){var t=o.result;t?(A.push(t.key),t.continue()):e(A)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,o=this;if(e.name){var a=e.name===r.name&&o._dbInfo.db,u=a?A.resolve(o._dbInfo.db):E(e).then((function(t){var r=f[e.name],n=r.forages;r.db=t;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=t;return t}));n=e.storeName?u.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;d(e);var n=f[e.name],o=n.forages;t.close();for(var a=0;a<o.length;a++){var s=o[a];s._dbInfo.db=null,s._dbInfo.version=r}return new A((function(t,n){var o=i.open(e.name,r);o.onerror=function(e){o.result.close(),n(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<o.length;t++){var r=o[t];r._dbInfo.db=e,I(r._dbInfo)}})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}})):u.then((function(t){d(e);var r=f[e.name],n=r.forages;t.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new A((function(t,r){var n=i.deleteDatabase(e.name);n.onerror=n.onblocked=function(e){var t=n.result;t&&t.close(),r(e)},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}})).then((function(e){r.db=e;for(var t=0;t<n.length;t++)I(n[t]._dbInfo)})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}))}else n=A.reject("Invalid arguments");return s(n,t),n}},w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=/^~~local_forage_type~([^~]+)~/,R="__lfsc__:".length,M=R+"arbf".length,x=Object.prototype.toString;function P(e){var t,r,n,i,o,A=.75*e.length,a=e.length,s=0;"="===e[e.length-1]&&(A--,"="===e[e.length-2]&&A--);var u=new ArrayBuffer(A),c=new Uint8Array(u);for(t=0;t<a;t+=4)r=w.indexOf(e[t]),n=w.indexOf(e[t+1]),i=w.indexOf(e[t+2]),o=w.indexOf(e[t+3]),c[s++]=r<<2|n>>4,c[s++]=(15&n)<<4|i>>2,c[s++]=(3&i)<<6|63&o;return u}function T(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=w[r[t]>>2],n+=w[(3&r[t])<<4|r[t+1]>>4],n+=w[(15&r[t+1])<<2|r[t+2]>>6],n+=w[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var F={serialize:function(e,t){var r="";if(e&&(r=x.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===x.call(e.buffer))){var n,i="__lfsc__:";e instanceof ArrayBuffer?(n=e,i+="arbf"):(n=e.buffer,"[object Int8Array]"===r?i+="si08":"[object Uint8Array]"===r?i+="ui08":"[object Uint8ClampedArray]"===r?i+="uic8":"[object Int16Array]"===r?i+="si16":"[object Uint16Array]"===r?i+="ur16":"[object Int32Array]"===r?i+="si32":"[object Uint32Array]"===r?i+="ui32":"[object Float32Array]"===r?i+="fl32":"[object Float64Array]"===r?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+T(n))}else if("[object Blob]"===r){var o=new FileReader;o.onload=function(){var r="~~local_forage_type~"+e.type+"~"+T(this.result);t("__lfsc__:blob"+r)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,R))return JSON.parse(e);var t,r=e.substring(M),n=e.substring(R,M);if("blob"===n&&D.test(r)){var i=r.match(D);t=i[1],r=r.substring(i[0].length)}var A=P(r);switch(n){case"arbf":return A;case"blob":return o([A],{type:t});case"si08":return new Int8Array(A);case"ui08":return new Uint8Array(A);case"uic8":return new Uint8ClampedArray(A);case"si16":return new Int16Array(A);case"ur16":return new Uint16Array(A);case"si32":return new Int32Array(A);case"ui32":return new Uint32Array(A);case"fl32":return new Float32Array(A);case"fl64":return new Float64Array(A);default:throw new Error("Unkown type: "+n)}},stringToBuffer:P,bufferToString:T};function O(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function L(e,t,r,n,i,o){e.executeSql(r,n,i,(function(e,A){A.code===A.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,A):O(e,t,(function(){e.executeSql(r,n,i,o)}),o)}),o):o(e,A)}),o)}function k(e,t,r,n){var i=this;e=c(e);var o=new A((function(o,A){i.ready().then((function(){void 0===t&&(t=null);var a=t,s=i._dbInfo;s.serializer.serialize(t,(function(t,u){u?A(u):s.db.transaction((function(r){L(r,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){A(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void o(k.apply(i,[e,a,r,n-1]));A(t)}}))}))})).catch(A)}));return s(o,r),o}function N(e){return new A((function(t,r){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}var G={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var i=new A((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(i){O(i,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=F,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT * FROM "+i.storeName,[],(function(r,n){for(var o=n.rows,A=o.length,a=0;a<A;a++){var s=o.item(a),u=s.value;if(u&&(u=i.serializer.deserialize(u)),void 0!==(u=e(u,s.key,a+1)))return void t(u)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=i.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){return k.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,r){var n=r.rows.item(0).c;e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var n=r.rows.length?r.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],i=0;i<r.rows.length;i++)n.push(r.rows.item(i).key);e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,i=this;return s(n=e.name?new A((function(t){var n;n=e.name===r.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(N(n))})).then((function(e){return new A((function(t,r){e.db.transaction((function(n){function i(e){return new A((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var o=[],a=0,s=e.storeNames.length;a<s;a++)o.push(i(e.storeNames[a]));A.all(o).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):A.reject("Invalid arguments"),t),n}};function U(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function j(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var V={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=U(e,this._defaultConfig),j()?(this._dbInfo=t,t.serializer=F,A.resolve()):A.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,i=n.length,o=localStorage.length,A=1,a=0;a<o;a++){var s=localStorage.key(a);if(0===s.indexOf(n)){var u=localStorage.getItem(s);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,s.substring(i),A++)))return u}}}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new A((function(i,o){var A=n._dbInfo;A.serializer.serialize(t,(function(t,n){if(n)o(n);else try{localStorage.setItem(A.keyPrefix+e,t),i(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return s(n,t),n},clear:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],i=0;i<r;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&n.push(o.substring(e.keyPrefix.length))}return n}));return s(r,e),r},dropInstance:function(e,t){if(t=l.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var n,i=this;return s(n=e.name?new A((function(t){e.storeName?t(U(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):A.reject("Invalid arguments"),t),n}},Y=function(e,t){for(var r,n,i=e.length,o=0;o<i;){if((r=e[o])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;o++}return!1},H=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},K={},q={},J={INDEXEDDB:S,WEBSQL:G,LOCALSTORAGE:V},W=[J.INDEXEDDB._driver,J.WEBSQL._driver,J.LOCALSTORAGE._driver],z=["dropInstance"],X=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(z),Z={description:"",driver:W.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function $(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function ee(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(H(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var te=new(function(){function e(t){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J)if(J.hasOwnProperty(r)){var n=J[r],i=n._driver;this[r]=i,K[i]||this.defineDriver(n)}this._defaultConfig=ee({},Z),this._config=ee({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new A((function(t,r){try{var n=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(i);for(var o=X.concat("_initStorage"),a=0,u=o.length;a<u;a++){var c=o[a];if((!Y(z,c)||e[c])&&"function"!=typeof e[c])return void r(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=A.reject(t);return s(r,arguments[arguments.length-1]),r}},r=0,n=z.length;r<n;r++){var i=z[r];e[i]||(e[i]=t(i))}}();var l=function(r){K[n]&&console.info("Redefining LocalForage driver: "+n),K[n]=e,q[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(l,r):l(!!e._support):l(!0)}catch(e){r(e)}}));return u(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=K[e]?A.resolve(K[e]):A.reject(new Error("Driver not found."));return u(n,t,r),n},e.prototype.getSerializer=function(e){var t=A.resolve(F);return u(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;H(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){n._config.driver=n.driver()}function a(e){return n._extend(e),o(),n._ready=n._initStorage(n._config),n._ready}var s=null!==this._driverSet?this._driverSet.catch((function(){return A.resolve()})):A.resolve();return this._driverSet=s.then((function(){var e=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var i=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(i).then(a).catch(r)}o();var s=new Error("No available storage method found.");return n._driverSet=A.reject(s),n._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return n._driverSet=A.reject(e),n._driverSet})),u(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!q[e]},e.prototype._extend=function(e){ee(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=X.length;e<t;e++)$(this,X[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=te},{3:3}]},{},[4])(4)},"object"===a(t)&&void 0!==e?e.exports=A():(i=[],void 0===(o="function"==typeof(n=A)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(144))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=function(){t.stop(),t.autoSaveTimer=window.setInterval((function(){t.state.dirty&&(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV||t.mergeState({autoSaveSignalCount:t.state.autoSaveSignalCount+1}))}),18e4)},t.stop=function(){t.autoSaveTimer&&(clearInterval(t.autoSaveTimer),t.autoSaveTimer=void 0)},t}return(0,n.__extends)(t,e),t.prototype.initState=function(){this.updateState({autoSaveSignalCount:0,dirty:!1})},t.prototype.markDirty=function(e){this.mergeState({dirty:e})},t}(i.default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logDocumentLoad=function(e,t){(0,n.sendKTrackerEvent)("toolLoad",{type:e,errorMsg:t})};var n=r(938)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ModelUpdateType",{enumerable:!0,get:function(){return i.ModelUpdateType}}),t.default=t.MultiBackupItem=void 0;var n=r(4),i=r(290),o=r(1879),A=r(659),a=r(2),s=r(1007);function u(e,t){var r=new Map;return e.forEach((function(e,n){r.set(n,t(e,n))})),r}var c=function(e){function t(t){var r=e.call(this,t)||this;return r.multiData=u(t,(function(e){return{data:new e.BackupItemImpl(e.model),BackupItemImpl:e.BackupItemImpl}})),r}return(0,n.__extends)(t,e),t.prototype.toModel=function(){return u(this.multiData,(function(e){return{model:e.data.toModel(),BackupItemImpl:e.BackupItemImpl}}))},t}(i.BackupItem);function l(e,t,r){var i=r.value;return(0,n.__assign)((0,n.__assign)({},r),{value:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.started)i.apply(this,e);else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw new Error("method "+t+" can only be called after app started.")}})}t.MultiBackupItem=c;var g=function(e){function t(r){var n=e.call(this,{getModel:function(){return u(n.documentSources,(function(e){var t=e.getModel();if(!t)throw new Error("MultiDocumentManager: getModel() return undefined for: "+e.key);return{model:t,BackupItemImpl:e.BackupItemImpl}}))},onUpdateModel:function(e,t){n.mapEachPrioritySync((function(r){r.forEach((function(r){var n=e.get(r.key);if(!n)throw new Error('No backup model for "'+r.key+"\", perhaps it's been added after this backup triggered.");r.onUpdateModel(n.model,t)}))}))},onUpdateState:r.onUpdateState,maxBackupStep:r.maxBackupStep,useHybridStorage:r.useHybridStorage})||this;return n.started=!1,n.cancelLoadToken=o.CancelToken.source(),n.id="kafDocument"+t.instanceCount++,n.monitoredRequestedKeySet=new Set,n.monitorSourceFetch=function(e,t,r){var i=e+r;return n.monitoredRequestedKeySet.has(i)?t:(n.monitoredRequestedKeySet.add(i),n.reportSource(e,t,r))},n.onModelChange=r.onModelChange||a.noop,n.onPause=r.onPause||a.noop,n.onToggleAutoBackup=r.onToggleAutoBackup||a.noop,n.onResume=r.onResume||a.noop,n}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"documentSources",{get:function(){return this.internalDocumentSources||(this.internalDocumentSources=new Map),this.internalDocumentSources},enumerable:!0,configurable:!0}),t.prototype.getBackupItemImpl=function(){return c},t.prototype.setId=function(e){this.id=e},t.prototype.getId=function(){return this.id},t.prototype.onModelChanges=function(e){this.started&&(this.requestCommit(),this.onModelChange())},t.prototype.toggleAutoBackup=function(t){e.prototype.toggleAutoBackup.call(this,t),this.onToggleAutoBackup(t)},t.prototype.commit=function(){e.prototype.commit.call(this)},t.prototype.onLoadSessionStart=function(){var e=(0,s.createDocumentLoadReporter)(),t=e.reportSource,r=e.statisticsPromise,n=e.getStatistics;(0,e.setTotal)(this.documentSources.size),this.loadStatisticsPromise=r,this.getStatisticsSync=n,this.reportSource=t,this.monitoredRequestedKeySet.clear()},t.prototype.createFetchDocumentPromises=function(e,r){var n=this,i=this.getDocumentsSortedByPriority(t.getDocFetchPriority),o=new Map;return i.reduce((function(t,i){return t.then((function(){var t=[];return i.documents.forEach((function(i){if(void 0!==i.fetch){var A=n.monitorSourceFetch(i.key,i.fetch({isInitialLoad:e,reloadInfo:r}),"fetch");t.push(A),o.set(i.key,A)}})),Promise.all(t)}))}),Promise.resolve()),o},t.prototype.openDocuments=function(){var e=this;this.onLoadSessionStart();var t=this.createFetchDocumentPromises(!0);return this.mapEachPriority((function(r){return Promise.all(r.map((function(r){return(t.get(r.key)||Promise.resolve()).then((function(t){return e.monitorSourceFetch(r.key,r.open(t),"open")}))})))}))},t.prototype.loadUntilCancel=function(e,t){var r=this;return this.cancelLoadToken=o.CancelToken.source(),Promise.race([e,this.cancelLoadToken.token.promise]).then((function(e){if((0,A.isCancel)(e))return e;t&&t(),r.requestCommit(),r.commit()}))},t.prototype.start=function(){var e=this;if(this.started)throw new Error("Cannot start twice");return this.loadUntilCancel(this.openDocuments(),(function(){e.started=!0,e.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!0,e.onDocumentChange),e.afterInit&&e.afterInit(e.onDocumentChange)})),e.toggleAutoBackup(!0)}))},t.prototype.reloadDocuments=function(e){var t=this;this.onLoadSessionStart();var r={data:e},n=this.createFetchDocumentPromises(!1,r);return this.mapEachPriority((function(e){return Promise.all(e.map((function(e){var i=e.reload;return i?(n.get(e.key)||Promise.resolve()).then((function(n){return t.monitorSourceFetch(e.key,i(r,n),"open")})):Promise.resolve()})))}))},t.prototype.reload=function(e){return this.clearBackupHistory(),this.pause(),this.loadUntilCancel(this.reloadDocuments(e),this.resume.bind(this))},t.prototype.pause=function(){this.toggleAutoBackup(!1),this.onPause(),this.started=!1},t.prototype.resume=function(){this.started=!0,this.onResume(),this.toggleAutoBackup(!0)},t.prototype.beforeDispose=function(){this.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!1,a.noop),e.beforeDispose&&e.beforeDispose()})),this.toggleAutoBackup(!1),this.cancelLoadToken.cancel("DocumentManager has been disposed"),this.started=!1},t.prototype.getLoadStatistics=function(e){return void 0===e&&(e=!0),e?(this.loadStatisticsPromise||console.error("Please wail until the document load completed"),this.loadStatisticsPromise):this.getStatisticsSync()},t.prototype.beforeSaveDocument=function(e){if(!this.started)return!1;var t=!0;return this.documentSources.forEach((function(r){r.beforeSaveDocument&&(r.beforeSaveDocument(e)||(t=!1))})),t},t.prototype.saveDocument=function(e,t){var r=this.generateActionId(),i={actionId:r};return t&&(i=(0,n.__assign)((0,n.__assign)({},t),{actionId:r})),this.mapEachPriority((function(t){return Promise.all(t.map((function(t){return t.saveDocument(e,i)})))}))},t.prototype.clearDocument=function(e,t){this.mapEachPrioritySync((function(r){r.forEach((function(r){t&&!t(r)||r.clearDocument({data:e})}))}))},t.prototype.addDocumentSource=function(e){var t=this;if(this.started)throw new Error("MultiDocumentManager: currently don't support to dynamicly add/remove document source after app started.");if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(e.updateListeners&&console.warn("[Deprecated]:updateListeners,请在 afterInit 方法内监听数据变化,在 beforeDispose 内移除监听"),!e.updateListeners&&!e.afterInit))throw Error("updateListeners 和 afterInit 请至少实现一个");var r=e.key;if(this.documentSources.get(r))throw new Error("MultiDocumentManager: duplicate document source key: "+e.key);this.documentSources.set(r,(0,n.__assign)((0,n.__assign)({},e),{onDocumentChange:function(){return t.onModelChanges(r)}}))},t.prototype.getDocumentsSortedByPriority=function(e){var t,r,n,i={};return t=this.documentSources,r=function(t,r){var n=e(t);i[n]||(i[n]=[]),i[n].push(t)},n=[],t.forEach((function(e,t){n.push(r(e,t))})),Object.keys(i).map((function(e){var t=parseFloat(e);return{priority:t,documents:i[t]}})).sort((function(e,t){return t.priority-e.priority}))},t.prototype.mapEachPriority=function(e){return this.getDocumentsSortedByPriority(t.getDocPriority).reduce((function(t,r){return t=t.then((function(){return e(r.documents,r.priority)}))}),Promise.resolve())},t.prototype.mapEachPrioritySync=function(e){this.getDocumentsSortedByPriority(t.getDocPriority).forEach((function(t){e(t.documents,t.priority)}))},t.prototype.generateActionId=function(){return Date.now()+"-"+this.id},t.instanceCount=0,t.getDocFetchPriority=function(e){return e.fetchPriority||0},t.getDocPriority=function(e){return e.priority||0},(0,n.__decorate)([l],t.prototype,"toggleAutoBackup",null),(0,n.__decorate)([l],t.prototype,"commit",null),t}(i.default);t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1880),i=function(){function e(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){return t=e}));var r=this;e((function(e){r.reason||(r.reason=new n.Cancel(e),t(r.reason))}))}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var t=function(){};return{token:new e((function(e){return t=e})),cancel:t}},e}();t.CancelToken=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.message=e}return e.prototype.__CANCEL__=function(){},e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e}();t.Cancel=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.scoped=function(e){return function(t,r,o){return(0,i.__assign)((0,i.__assign)({},o),{value:function(){for(var t,r,i=this,A=[],a=0;a<arguments.length;a++)A[a]=arguments[a];var s=A.find((function(e){var t;return!0===(null===(t=e)||void 0===t?void 0:t.isScope)}));if(!s||!s.valid)return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING?void(s?s.valid||console.warn("Scope is not valid!"):console.warn("No scope found!")):null===(t=o.value)||void 0===t?void 0:t.apply(this,A);var u=function(){s.push((function(){e.apply(i,A)}))};try{var c=null===(r=o.value)||void 0===r?void 0:r.apply(this,A);return c&&("object"===n(c)||"function"==typeof c)&&(c instanceof Promise||"function"==typeof c.then)?c.then(u):u(),c}catch(e){throw e}}})}},t.ScopeGroup=void 0;var i=r(4);var o=function(){function e(e,t,r,n){this.parent=e,this.onScopeDispose=t,this.pushChange=r,this.isValid=n,this.isScope=!0,this.disposed=!1}return Object.defineProperty(e.prototype,"valid",{get:function(){return!this.disposed&&this.isValid(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alive",{get:function(){return!this.disposed},enumerable:!0,configurable:!0}),e.prototype.push=function(e){this.valid?this.pushChange(this,e):console.warn("Scope is not valid!")},e.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.onScopeDispose(this))},e}(),A=function(){function e(){var e=this;this.changeStack=[],this.lockedScope=new Set,this.onScopeDispose=function(t){e.sequenceRestore(t)},this.pushChange=function(t,r){e.changeStack.push({scope:t,restore:r})},this.isScopeValid=function(t){for(var r=-1,n=e.changeStack.length-1;n>0;n--)if(e.changeStack[n].scope===t){r=n;break}return!e.lockedScope.has(t)&&(-1===r||r===e.changeStack.length-1)}}return e.prototype.sequenceRestore=function(e){for(var t,r,n=[];this.changeStack.length;){var o=this.changeStack[this.changeStack.length-1];if(o.scope.alive)break;this.changeStack.pop(),n.push(o)}try{for(var A=(0,i.__values)(n),a=A.next();!a.done;a=A.next()){a.value.restore()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=A.return)&&r.call(A)}finally{if(t)throw t.error}}},e.prototype.lock=function(e){e.parent===this&&this.lockedScope.add(e)},e.prototype.unLock=function(e){this.lockedScope.delete(e)},e.prototype.createScope=function(){return new o(this,this.onScopeDispose,this.pushChange,this.isScopeValid)},e.prototype.dispose=function(){for(;this.changeStack.length;){this.changeStack.pop().restore()}[].forEach((function(e){return e.alive&&e.dispose()}))},e}();t.ScopeGroup=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scopedState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Object.defineProperty(t.prototype,A,{value:e,writable:!1,enumerable:!1,configurable:!1}),(0,o.scopedObject)({diff:s,getter:c,restore:u})(t)}};var n=r(4),i=r(2),o=r(1040),A=Symbol("scoped_property");var a,s=(a=new Set,function(e,t){var r={};return Object.keys(e).forEach((function(e){a.add(e)})),Object.keys(t).forEach((function(e){a.add(e)})),a.forEach((function(n){e[n]!==t[n]&&(r[n]={from:e[n],to:t[n]})})),a.clear(),r});function u(e){var t=(0,n.__assign)({},this.state);Object.keys(e).forEach((function(r){var n=e[r];Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&n.to!==t[r]&&console.error("Scoped state "+r+" changed outside current scope!"),t[r]=n.from})),this.state=t}function c(){var e=this[A];return function(e,t){return t&&t.length?(0,i.pick)(e,t):(0,n.__assign)({},e)}(this.state,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"drawPolygonWithHole",{enumerable:!0,get:function(){return n.drawPolygonWithHole}}),Object.defineProperty(t,"drawBox",{enumerable:!0,get:function(){return n.drawBox}}),Object.defineProperty(t,"drawPolyline",{enumerable:!0,get:function(){return n.drawPolyline}}),Object.defineProperty(t,"drawLine",{enumerable:!0,get:function(){return n.drawLine}}),Object.defineProperty(t,"drawDashLine",{enumerable:!0,get:function(){return n.drawDashLine}}),Object.defineProperty(t,"drawPolygon",{enumerable:!0,get:function(){return n.drawPolygon}}),Object.defineProperty(t,"drawPolyDashLine",{enumerable:!0,get:function(){return n.drawPolyDashLine}}),Object.defineProperty(t,"drawSector",{enumerable:!0,get:function(){return n.drawSector}}),Object.defineProperty(t,"drawRect",{enumerable:!0,get:function(){return n.drawRect}});var n=r(995)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"generatePopMesh",{enumerable:!0,get:function(){return n.generatePopMesh}}),Object.defineProperty(t,"updateMaterials",{enumerable:!0,get:function(){return n.updateMaterials}}),Object.defineProperty(t,"updateTransform",{enumerable:!0,get:function(){return n.updateTransform}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return n.loadComponent}});var n=r(1041)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ContainerType2D",{enumerable:!0,get:function(){return n.ContainerType2D}});var n=r(229)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.SelectControls2D}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1887)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1016)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pureWithCustomizedCompare",{enumerable:!0,get:function(){return n.pureWithCustomizedCompare}}),Object.defineProperty(t,"pureWithPickKeys",{enumerable:!0,get:function(){return n.pureWithPickKeys}}),Object.defineProperty(t,"pureWithOmitKeys",{enumerable:!0,get:function(){return n.pureWithOmitKeys}});var n=r(1889)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pureWithCustomizedCompare=function e(t){void 0===t&&(t={});return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!(i=this.props,A=e,a=t,s=Object.keys(i),u=Object.keys(A),s.length===u.length&&s.every((function(e){return(a[e]||o)(i[e],A[e])}))&&(0,n.default)(this.state,r));var i,A,a,s,u},r}},t.pureWithPickKeys=function e(t){return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!function(e,t,r){return r.every((function(r){return o(e[r],t[r])}))}(this.props,e,t)||!(0,n.default)(this.state,r)},r}},t.pureWithOmitKeys=function e(t){var r=t.reduce((function(e,t){return e[t]=!0,e}),{});return function(t){return t.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+t.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),t.prototype.shouldComponentUpdate=function(e,t){return!function(e,t,r){var n=Object.keys(e).filter((function(e){return!r[e]})),i=Object.keys(t).filter((function(e){return!r[e]}));return n.length===i.length&&n.every((function(r){return o(e[r],t[r])}))}(this.props,e,r)||!(0,n.default)(this.state,t)},t}};var n=r(264),i=r(186);function o(e,t){return e===t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__expectedPublicAPIs__=void 0;t.__expectedPublicAPIs__=""},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RenderSystem2D",{enumerable:!0,get:function(){return n.RenderSystem2D}}),Object.defineProperty(t,"RenderSystem3D",{enumerable:!0,get:function(){return n.RenderSystem3D}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"InferenceSystem3D",{enumerable:!0,get:function(){return i.InferenceSystem3D}}),Object.defineProperty(t,"EntityListSystem",{enumerable:!0,get:function(){return o.EntityListSystem}}),Object.defineProperty(t,"VisibleEntityListSystem",{enumerable:!0,get:function(){return A.default}});var n=r(229),i=r(412),o=r(183),A=r(204)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectionFeature",{enumerable:!0,get:function(){return n.SelectionFeature}}),Object.defineProperty(t,"HintFeature",{enumerable:!0,get:function(){return i.HintFeature}}),Object.defineProperty(t,"WithObjectEventListenersFeature",{enumerable:!0,get:function(){return o.Feature}});var n=r(409),i=r(670),o=r(976)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DocumentEvents",{enumerable:!0,get:function(){return n.DocumentEvents}}),Object.defineProperty(t,"combine",{enumerable:!0,get:function(){return n.combine}}),Object.defineProperty(t,"Language",{enumerable:!0,get:function(){return n.Language}}),Object.defineProperty(t,"EVENT_STOPPED",{enumerable:!0,get:function(){return n.EVENT_STOPPED}}),Object.defineProperty(t,"InteractionEventType",{enumerable:!0,get:function(){return n.InteractionEventType}});var n=r(1042)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(512),o=r(1898),A=r(692),a=r(693),s=function(){function e(){}return e.prototype.setPrecision=function(e){this.precisionMap=e},e.prototype.setGlobalUnit=function(e){var t=this.getGlobalUnitInfoMap(e);t&&(this.currentGlobalUnitInfoMap=t)},e.prototype.setGlobalLengthUnit=function(e){var t=this.getGlobalLengthUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{length:t}))},e.prototype.setGlobalAreaUnit=function(e){var t=this.getGlobalAreaUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{area:t}))},e.prototype.getDisplayText=function(e,t,r,n,o){var A;if(void 0===r&&(r=!1),o){if(o.customUnitInfo){if((0,a.getQuantityTypeForUnit)(o.customUnitInfo.unitType)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customUnitInfo.unitType and quantityType do not match.");return""}A=(0,a.getUnitInstance)(o.customUnitInfo.unitType),n=o.customUnitInfo.precision}if(o.customBaseUnit){if((0,a.getQuantityTypeForUnit)(o.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customBaseUnit and quantityType do not match.");return""}var s=(0,a.getDefaultBaseUnitForQuantity)(t);if(!s)return"";e=(0,a.convertBetweenUnits)(e,o.customBaseUnit,s)}}if(!A){var u=this.getGlobalUnitInfo(t),c=void 0;if(u){if(c=u.precision,this.precisionMap){var l=this.precisionMap.tool_length_and_precision,g=this.precisionMap.tool_area_and_precision;switch(t){case"length":l&&l.unit&&i.factorMap[l.unit]===u.unit.factor&&void 0!==l.precision&&(c=l.precision);break;case"area":g&&g.unit&&i.factorMap[g.unit]===u.unit.factor&&void 0!==g.precision&&(c=g.precision)}}A=u.unit,n=void 0===n?c:n}}if(A&&n)return A.getDisplayText(e,r,n);if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): illegal input.");return""},e.prototype.getValueFromDisplayText=function(e,t,r,n){var i;if(void 0===r&&(r=!1),n&&n.customUnit){if((0,a.getQuantityTypeForUnit)(n.customUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customUnit and quantityType do not match.");return 0}i=(0,a.getUnitInstance)(n.customUnit)}if(!i){var o=this.getGlobalUnitInfo(t);o&&(i=o.unit)}if(i){var A=i.getValueFromDisplayText(e,r);if(n&&n.customBaseUnit){if((0,a.getQuantityTypeForUnit)(n.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customBaseUnit and quantityType do not match.");return 0}var s=(0,a.getDefaultBaseUnitForQuantity)(t);s&&(A=(0,a.convertBetweenUnits)(A,s,n.customBaseUnit))}return A}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): 'currentGlobalUnitInfoMap' is not defined or illegal 'quantityType'");return 0},e.prototype.getGlobalUnitInfo=function(e){if(this.currentGlobalUnitInfoMap)return this.currentGlobalUnitInfoMap[e]},e.prototype.getGlobalUnitInfoMap=function(e){var t;switch(e){case A.GlobalUnitType.mm:t=o.globalUnitInfoMaps.metricSystem.millimeter;break;case A.GlobalUnitType.m:t=o.globalUnitInfoMaps.metricSystem.meter;break;case A.GlobalUnitType.ft:t=o.globalUnitInfoMaps.imperialSystem.foot;break;default:if(String(e).match(/^1\d{2}$/)){var r=this.getGlobalLengthUnitInfo(Number(String(e)[1])),n=this.getGlobalAreaUnitInfo(Number(String(e)[2]));r&&n&&(t={length:r,area:n})}else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}return t},e.prototype.getGlobalLengthUnitInfo=function(e){var t;switch(e){case i.LengthUnitType.mm:t=o.globalLengthUnitInfoMaps.metricSystem.millimeter;break;case i.LengthUnitType.m:t=o.globalLengthUnitInfoMaps.metricSystem.meter;break;case i.LengthUnitType.ft:t=o.globalLengthUnitInfoMaps.imperialSystem.foot;break;case i.LengthUnitType.in:t=o.globalLengthUnitInfoMaps.imperialSystem.inch;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalLengthUnitInfo(): illegal globalLengthUnitType")}return t},e.prototype.getGlobalAreaUnitInfo=function(e){var t;switch(e){case i.AreaUnitType.sqMm:t=o.globalAreaUnitInfoMaps.metricSystem.millimeter;break;case i.AreaUnitType.sqM:t=o.globalAreaUnitInfoMaps.metricSystem.meter;break;case i.AreaUnitType.sqFt:t=o.globalAreaUnitInfoMaps.imperialSystem.foot;break;case i.AreaUnitType.mats:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.mats;break;case i.AreaUnitType.tsubo:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.tsubo;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalAreaUnitInfo(): illegal globalAreaUnitType")}return t},e}();t.default=s},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.tsubo=t.mats=t.squareMillimeter=t.squareMeter=t.squareFoot=t.footAndInch=t.inch=t.millimeter=t.meter=void 0;var i=n(r(1896)),o=r(513),A=n(r(1897)),a=new i.default("m",o.FACTORS.m2mm,o.regexMap.number,o.regexMap.meterText);t.meter=a;var s=new i.default("mm",o.FACTORS.mm2mm,o.regexMap.number,o.regexMap.millimeterText);t.millimeter=s;var u=new i.default("''",o.FACTORS.inch2mm,o.regexMap.number,o.regexMap.inchText);t.inch=u;var c=new A.default;t.footAndInch=c;var l=new i.default("ft²",o.FACTORS.sqft2sqmm,o.regexMap.number,o.regexMap.squareFootText);t.squareFoot=l;var g=new i.default("m²",o.FACTORS.sqm2sqmm,o.regexMap.number,o.regexMap.squareMeterText);t.squareMeter=g;var f=new i.default("mm²",o.FACTORS.sqmm2sqmm,o.regexMap.number,o.regexMap.squareMillimeterText);t.squareMillimeter=f;var h=new i.default("mats",o.FACTORS.mats2sqmm,o.regexMap.number,o.regexMap.matsText);t.mats=h;var p=new i.default("tsubo",o.FACTORS.tsubo2sqmm,o.regexMap.number,o.regexMap.tsuboText);t.tsubo=p},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(1043),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.factor=r,this.regexWithoutUnit=n,this.regexWithUnit=o}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return t?"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r)).concat(this.name):"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r))}},{key:"getValueFromDisplayText",value:function(e,t){return t?this.getValueFromFirstNumber(this.regexWithUnit,e):this.getValueFromFirstNumber(this.regexWithoutUnit,e)}},{key:"getValueFromFirstNumber",value:function(e,t){var r=(0,A.testStringAndExtractNumbers)(e,t);return void 0!==r[0]?r[0]*this.factor:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=a},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(513),a=r(1043),s=function(){function e(){(0,i.default)(this,e),this.factor=0}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return this.getFootAndInchText(e)}},{key:"getValueFromDisplayText",value:function(e,t){return this.getValueFromFootAndInchText(e)}},{key:"getFootAndInchText",value:function(e){var t=(0,a.numberPrecisionOperationAndRound)(e/A.FACTORS.inch2mm,0),r=Math.floor(t/A.FACTORS.foot2inch),n=t-r*A.FACTORS.foot2inch;return"".concat(r,"'").concat(n,"''")}},{key:"getValueFromFootAndInchText",value:function(e){var t,r;return A.regexMap.number.test(e)||A.regexMap.inchText.test(e)?(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])):A.regexMap.footAndInchText.test(e)&&(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])*A.FACTORS.foot2inch,2===t.length&&(r+=Number(t[1]))),void 0!==r?r*A.FACTORS.inch2mm:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalLengthUnitInfoMaps=t.globalAreaUnitInfoMaps=t.globalUnitInfoMaps=void 0;var n=r(512),i={metricSystem:{meter:{length:{precision:.001,unit:n.meter},area:{precision:.01,unit:n.squareMeter}},millimeter:{length:{precision:1,unit:n.millimeter},area:{precision:.01,unit:n.squareMeter}}},imperialSystem:{foot:{length:{precision:1,unit:n.footAndInch},area:{precision:1,unit:n.squareFoot}}}};t.globalUnitInfoMaps=i;var o={metricSystem:{meter:{precision:.01,unit:n.squareMeter},millimeter:{precision:.01,unit:n.squareMillimeter}},imperialSystem:{foot:{precision:.01,unit:n.squareFoot}},JapaneseUnitSystem:{mats:{precision:.01,unit:n.mats},tsubo:{precision:.01,unit:n.tsubo}}};t.globalAreaUnitInfoMaps=o;var A={metricSystem:{meter:{precision:.001,unit:n.meter},millimeter:{precision:1,unit:n.millimeter}},imperialSystem:{foot:{precision:1,unit:n.footAndInch},inch:{precision:.01,unit:n.inch}}};t.globalLengthUnitInfoMaps=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.TransactionDocument}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"flatEntitiesCreator",{enumerable:!0,get:function(){return o.flatEntitiesCreator}}),Object.defineProperty(t,"HighlightSystem2D",{enumerable:!0,get:function(){return A.HighlightSystem2D}}),Object.defineProperty(t,"HighlightSystem3D",{enumerable:!0,get:function(){return A.HighlightSystem3D}});var n=r(1900),i=r(412),o=r(1904),A=r(499)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.default}});var n=r(1901)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1902),i=r(1903),o=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=i.TransactionDocumentStatus.None,this.onDocumentChange=function(e,r,n){t.status!==i.TransactionDocumentStatus.Aborting&&t.activeTransaction.record(e,r,n),t.status===i.TransactionDocumentStatus.None&&t.onBackupRecord&&t.onBackupRecord(e,r,n)},this.updateDocument=e.updateDocument,this.onBackupRecord=e.onBackupRecord,this.maxBackupStep=e.maxBackupStep||25,this.openTransaction()}return e.prototype.setMaxBackupStep=function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)},e.prototype.openTransaction=function(){this.redoStack.length=0,this.activeTransaction=this.createTransaction()},e.prototype.commitTransaction=function(){this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-(this.maxBackupStep+1)),this.undoStack.push(this.activeTransaction),this.openTransaction()},e.prototype.abortTransaction=function(){this.status=i.TransactionDocumentStatus.Aborting,this.activeTransaction.recover(),this.status=i.TransactionDocumentStatus.None,this.activeTransaction=this.createTransaction()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Undoing,this.undoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.redoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.redo=function(){return 0!==this.redoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Redoing,this.redoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.undoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.createTransaction=function(){return new n.default(this.updateDocument)},e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function e(e){this.updateDocument=e,this.records=new Map}return e.prototype.record=function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)},e.prototype.recover=function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){e.updateDocument(r,n,t)}))}))},e.prototype.isEmpty=function(){return 0===this.records.size},e}();t.default=n},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDocumentStatus=void 0,t.TransactionDocumentStatus=n,function(e){e[e.None=0]="None",e[e.Undoing=1]="Undoing",e[e.Redoing=2]="Redoing",e[e.Aborting=3]="Aborting"}(n||(t.TransactionDocumentStatus=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatEntitiesCreator=function(e){var t=[],r=[];return function(n){var i=t,o=r;if(n!==i){for(var A=[],a=i.length,s=n.length,u=0;u<a&&u<s;u++){if(i[u]!==(f=n[u]))break;A.push(o[u])}if(u===a)for(;u<s;u++)A.push(e(n[u]));else{for(var c=new Map,l=u;l<a;l++)c.set(i[l],o[l]);for(var g=u;g<s;g++){var f=n[g],h=c.get(f);void 0===h?A.push(e(f)):A.push(h)}}return t=n,r=A,Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK&&(Object.freeze(t),Object.freeze(r)),A}return r}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"perf",{enumerable:!0,get:function(){return n.perf}});var n=r(232)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KAFApp=void 0;var n=r(4),i=r(211),o=r(143),A=r(1044),a=r(1048),s=r(232),u=r(492),c=r(137),l=r(11),g=r(91);function f(e){var t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.position="absolute",t.style.top="0",t.style.width="100%",t.style.height="100%",document.body.appendChild(t)),t}var h={fpsDetectorEnabled:!0},p=function(){function t(){this.appNodeId="kaf-app-"+t.AppCount++,this.pluginManager=new i.PluginManager,this.started=!1,this.registerPlugin(A.AppServicePlugin)}return t.prototype.registerPlugin=function(e){if(this.started)throw new Error("KAFApp.registerPlugin: cannot register plugin after App is started.");return this.pluginManager.registerPlugin(e),this},t.prototype.getPlugin=function(e){return this.pluginManager.getPlugin(e)},t.prototype.start=function(t){var r=this;if(this.started)throw new Error("KAFApp.start: App is already started.");t=(0,n.__assign)((0,n.__assign)({},h),t),this.started=!0;var i=(0,s.measurePluginLoadTiming)(this.pluginManager);this.pluginManager.loadAll(),i();var p=this.pluginManager.getPlugin(A.AppServicePlugin);this.fpsDetector=new s.FpsDetector(p.logger),this.fpsDataMerger=new s.FpsDataMerger({onMerged:function(e){return p.logger.fpsMerged(e)}}),p.stateManager.toolbox[u.setAppIdSymbol](this.appNodeId),p.stateManager.document[u.setAppIdSymbol](this.appNodeId),t.fpsDetectorEnabled?this.keepLoggingFps():this.fpsDetector.dispose(),(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)&&(window.kafProfiler=(0,a.profiler)(),window.kafDebuger=(0,a.debugManager)()),(0,o.config)({onError:p.logger.error}),p.stateManager.document.start(),p.stateManager.document.getLoadStatistics().then((function(e){(0,s.setDocumentsTiming)(e,r.appNodeId)}));var d,I,y=p.getLayout();d=y&&l.createElement(y,null),I={logger:p.logger,fpsDetector:this.fpsDetector,fpsDataMerger:this.fpsDataMerger,kafCoreState:p.stateManager,nodeId:this.appNodeId},g.render(l.createElement(c.RootStateContext.Provider,{value:{rootState:I.kafCoreState}},l.createElement(A.App,{logger:I.logger,fpsDetector:I.fpsDetector,fpsDataMerger:I.fpsDataMerger,appNodeId:I.nodeId},d)),f(I.nodeId)),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kafApp=this)},t.prototype.dispose=function(){var e,t;this.pluginManager.unloadAll(),e={nodeId:this.appNodeId},t=f(e.nodeId),g.unmountComponentAtNode(t),t.remove(),this.fpsDetector.dispose(),this.started=!1},t.prototype.getAppNodeId=function(){return this.appNodeId},t.prototype.keepLoggingFps=function(){var e=this;this.fpsDetector.on("frame",(function(t,r){r&&e.fpsDataMerger.add(t.duration)})),(0,s.initPerf)()},t.AppCount=0,t}();t.KAFApp=p}).call(this,r(86))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MountedViews=void 0;var n=r(4),i=r(137),o=r(2),A=r(11),a=r(91),s=r(510),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=document.createElement("span"),t.viewKeyMap=new WeakMap,t}return(0,n.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props.mountedViews.map((function(t,r){return A.createElement(s.ViewMountOrderContext.Provider,{key:e.getViewKey(t),value:r},A.createElement(t,null))})).reverse();return a.createPortal(t,this.placeholder)},t.prototype.componentWillUnmount=function(){this.placeholder=void 0},t.prototype.getViewKey=function(e){var t=this.viewKeyMap.get(e);return void 0===t&&(t=(0,o.uniqueId)("mounted-view-"),this.viewKeyMap.set(e,t)),t},t}(A.PureComponent);t.MountedViews=u;var c=(0,i.connect)((function(e){return{root:e}}),(function(e){return{mountedViews:e.root.__INTERNAL__mountedAppViews}}),u);t.default=c},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppServicePlugin=void 0;var n=r(4),i=r(211),o=r(1046),A=r(690),a=r(672),s=r(677),u=r(274),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootState=new A.default,t.logger=new s.Logger,t.enableConflictSessionCheck=function(e,r){t.getSessionManager().prepareSession(e,r)},t}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"stateManager",{get:function(){return this.rootState},enumerable:!0,configurable:!0}),t.prototype.onInitialize=function(){var e=this;this.rootState=new A.default,this.rootState.initState(),this.kaf2AppService=this.dependencies.get(a.AppServicePlugin),this.rootState[A.RootState_setKaf2](this.kaf2AppService.state),this.rootState.toolbox.provideToolContext(u.ToolContextInternal,(function(){return{rootState:e.rootState}})),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kaf=this)},t.prototype.onDispose=function(){this.rootState.dispose(),this.getSessionManager().stopSessionChecking(),this.layout=void 0},t.prototype.setLayout=function(e){if(this.layout)throw new Error("Layout cannot be set twice.");this.layout=e},t.prototype.getLayout=function(){return this.layout},t.prototype.addDocumentSource=function(e){this.rootState.document.addDocumentSource(e)},t.prototype.mountView=function(e){this.rootState.__INTERNAL__addMountedAppView(e)},t.prototype.getSessionManager=function(){var e=this;return this.sessionManager||(this.sessionManager=new o.default((function(t){t?e.rootState.document.autoSave.start():e.rootState.document.autoSave.stop()}))),this.sessionManager},t.prototype.registerEntityDocument=function(e){this.kaf2AppService.registerDocument(e)},t.dependencies=[a.AppServicePlugin],t}(i.BasePlugin);t.AppServicePlugin=c},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(343),i=r(4),o=r(228),A=r(1042),a=r(683),s=r(11),u=r(232),c=r(1049),l=r(1050);r(1911);var g,f={"./DebugComponent.module.scss":{"debug-root":"ui-debug-root_47b7b","debug-button":"ui-debug-button_73a33","debug-setting":"ui-debug-setting_bb0cc","debug-setting-row":"ui-debug-setting-row_94ade","debug-setting-row-title":"ui-debug-setting-row-title_6b6be","debug-setting-row-content":"ui-debug-setting-row-content_fc85a","debug-setting-item":"ui-debug-setting-item_6ac86","debug-setting-item-label":"ui-debug-setting-item-label_9289f","profile-wrapper":"ui-profile-wrapper_f26ef","profile-visible":"ui-profile-visible_b5bbc"}};g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.render=function(){return null},t}(a.default);var h=null;try{h=localStorage.getItem("__kafPerfEnabled__")}catch(e){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw e}if("1"===h||null===h&&(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)){g=function(e){function t(t){var r=e.call(this,t)||this;return r.switchProfile=function(e){var t=e.target.checked;r.setState({showProfile:t}),t||r.cleanRenderProfile()},r.switchDebug=function(e){var t=e.target.checked;r.setState({showDebug:t})},r.switchLanguage=function(e){var t=e.target.checked,r=window,n=t?A.Language.EN_US:A.Language.ZH_CN;try{r.kafDebuger.set("lang",n,!0),r.localStorage["local-language"]=n}catch(e){}window.location.reload()},r.switchAxis=function(e){var t=e.target.checked;r.setState({showAxis:t}),window.kafDebuger.set("axis3d",t)},r.onKey=function(e){e&&192==e.keyCode&&r.recordCurrentState()},r.state=r.state||{},r.state.showProfile=!1,r.state.showDebug=!0,r.state.showAxis=!1,r}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.initPixi(),document.body.addEventListener("keydown",this.onKey,!1)},t.prototype.render=function(){var e=this,t=this.state.showDebug;return s.createElement("div",{className:"ui-debug-root_47b7b",style:{display:t?"block":"none"}},this.renderDebugButton(),s.createElement("div",{ref:function(t){return e.elProfiler=t},className:(0,n.default)("profile-wrapper "+(this.state.showProfile?"profile-visible":""),f)}))},t.prototype.renderDebugButton=function(){return s.createElement("div",{className:"ui-debug-button_73a33"},s.createElement(u.Stats,null),this.renderSettingPanel())},t.prototype.renderSettingPanel=function(){var e=this.state.views,t="";try{t=window.localStorage["local-language"]}catch(e){}return s.createElement("div",{className:"ui-debug-setting_bb0cc"},s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"基本"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showProfile,onChange:this.switchProfile}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"性能(旧)")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showDebug,onChange:this.switchDebug}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"调试")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:t===A.Language.EN_US,onChange:this.switchLanguage}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"英文")),this.renderAxisSwitch())),s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"性能"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Timing,null)),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Profiling,null)))),e.map((function(e,t){return s.createElement("div",{key:e.key,className:"ui-debug-setting-row_94ade"},e.content)})))},t.prototype.renderAxisSwitch=function(){return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV?s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showAxis,onChange:this.switchAxis}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"坐标系")):null},t.prototype.renderProfile=function(){var e="",t=this.recordState||this.dumpProfile(),r=t.normalCosts,n=t.normalCounts,i=t.totalValues;e="时间统计\n\n",r.sort((function(e,t){return t.time-e.time})),r.forEach((function(t){e+=t.key+" "+t.time+" "+t.count+"\n"})),this.pxCostsText.text=e,e="计数统计\n\n",n.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxCountsText.text=e,e="全局计数\n\n",i.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxInfoText.text=e},t.prototype.cleanRenderProfile=function(){this.pxCostsText.text="",this.pxCountsText.text="",this.pxInfoText.text=""},t.prototype.dumpProfile=function(){var e,t,r,n,i=(0,l.profiler)().dump(),o=Object.values(i.costs);e=[];for(var A=0,a=o.length;A<a;++A)n=o[A],(0,c.isCrcp)(n.key)||e.push(n);var s=Object.values(i.counts).sort((function(e,t){return t.count-e.count}));t=[];for(A=0,a=s.length;A<a;++A)n=s[A],(0,c.isCrcp)(n.key)||t.push(n);var u=i.totals;return(r=Object.keys(u).map((function(e){return{key:e,count:u[e]}}))).sort((function(e,t){return t.count-e.count})),{normalCosts:e.length<50?e:e.slice(0,50),normalCounts:t.length<50?t:t.slice(0,50),totalValues:r.length<50?r:r.slice(0,50),datas:i.datas}},t.prototype.recordCurrentState=function(){this.recordState?this.recordState=void 0:(this.recordState=this.dumpProfile(),window.__pd=this.recordState.datas[this.recordState.datas.length-1])},t.prototype.initPixi=function(){var e=this;if(this.elProfiler){this.pxApp=new o.Application(3e3,1200,{backgroundColor:0});var t=this.pxApp;this.elProfiler.appendChild(t.view);var r=function(e,r){void 0===r&&(r=5);var n=new o.Text("",{fontSize:20,fill:65280,align:"left"});return n.x=e,n.y=r,t.stage.addChild(n),n};this.pxCostsText=r(500),this.pxCountsText=r(1e3),this.pxInfoText=r(1500);var n=Date.now();t.ticker.add((function(){Date.now()-n<1e3||(n=Date.now(),e.state.showProfile&&e.renderProfile())}))}},t}(a.default)}var p=g;t.default=p}).call(this,r(86))},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DisplayInfoMesh",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"DisplayInfoDrawable",{enumerable:!0,get:function(){return i.default}});var n=r(1913),i=r(1919)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(139),o=r(83),A=r(1051),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.meshBuilder=new A.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.state.loadingStatus}),(function(e){return t.setState({loadingStatus:e})}),(function(e,r){return t.onMeshCreated(e,r)}),(function(){return t.notifyWorldUpdate()})),t.componentInstances=t.meshBuilder.componentInstances,t.state={},t}return(0,n.__extends)(t,e),t.prototype.onMeshCreated=function(e,t){},t.prototype.buildMesh=function(){var e=this.meshBuilder.createMesh();return e.visible=void 0===this.props.visible||this.props.visible,e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),this.meshBuilder.updateMesh(this.mesh);var n=this.props.visible;this.mesh.visible=void 0===n||n},t.prototype.componentWillUnmount=function(){this.meshBuilder.disposeMesh(),e.prototype.componentWillUnmount.call(this)},t=(0,n.__decorate)([i.default],t)}(o.default);t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(44),i=r(1052),o=function(){function e(){this.doubleSided=!1}return e.prototype.getId=function(){return this.id},e.prototype.setId=function(e){return this.id=e,this},e.prototype.getMesh=function(){return this.mesh},e.prototype.setMesh=function(e){return this.mesh=e,this},e.prototype.getTransform=function(){return this.transform},e.prototype.setTransform=function(e){return this.transform=e,this},e.prototype.getMtl=function(){return this.mtl},e.prototype.setMtl=function(e){return this.mtl=e,this},e.prototype.getDoubleSided=function(){return this.doubleSided},e.prototype.setDoubleSided=function(e){return void 0===e&&(e=!1),this.doubleSided=e,this},e}();t.PopBufferComponent=o,t.toPopBufferComponent=function(e){var t=new o;return t.setId(e.id).setMesh(e.mesh).setDoubleSided(e.doubleSided),e.transform&&t.setTransform((new n.default).fromString(e.transform)),t.setMtl(e.mtl.filter((function(e){return!!e})).map(i.toPopBufferMtl)),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(6),i=r(12),o=function(){function e(e){this.props=e}return e.prototype.create=function(){var t=this.props,r=t.color,i=t.opacity,o=e.NORMAL_BOX;this.opacity=i,this.material=new n.MeshBasicMaterial({color:r,transparent:!0,opacity:i||1});var A=new n.Mesh(o,this.material);return this.applyTransform(A,this.props),A.setAttribute("shadowCaster",!1),i&&i<1&&(A.setAttribute("outline-color-marked",!0),A.setAttribute("transparent-line-faded",!0)),A},e.prototype.update=function(t){var r=this.props,n=r.opacity,i=r.color;t.geometry=e.NORMAL_BOX,this.material.setValues({color:i,opacity:n}),this.opacity!==n&&(this.opacity=n,this.updateMeshAttributeFromOpacity(t,n)),this.applyTransform(t,this.props)},e.prototype.dispose=function(){},e.prototype.applyTransform=function(e,t){var r=t.position,n=t.rotation,o=t.scale,A=void 0===o?i.SCALE_ONE:o,a=t.size;e.position.set(r.x,r.y,r.z),e.scale.set(A.x*a.x,A.y*a.y,A.z*a.z),e.rotation.set(n.x,n.y,n.z)},e.prototype.updateMeshAttributeFromOpacity=function(e,t){t&&t<1?(e.setAttribute("outline-color-marked",!0),e.setAttribute("transparent-line-faded",!0)):(e.setAttribute("outline-color-marked",!1),e.setAttribute("transparent-line-faded",!1))},e.NORMAL_BOX=new n.BoxGeometry(1,1,1),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1917),i=function(){function e(e){this.props=e}return e.prototype.create=function(){var e=(0,n.createMesh)(this.props);return(0,n.applyTransform)(e,this.props),e},e.prototype.update=function(e){(0,n.applyTransform)(e,this.props)},e.prototype.dispose=function(){},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMesh=u,t.applyTransform=c,t.default=void 0;var n=r(4),i=r(6),o=r(98),A=r(5),a=r(227),s=r(83);function u(e){var t=e.size,r=new i.BoxBufferGeometry(t.x,t.y,t.z),n=new i.EdgesBufferGeometry(r,1),o=new i.LineBasicMaterial({color:16722688,depthTest:!1});return new i.LineSegments(n,o)}function c(e,t){var r=t.position,n=t.pivot,i=t.scale,s=t.rotation;e.position.copy((0,a.vector3ToThree)(A.default.add(r,n||new A.default))),e.scale.copy((0,a.vector3ToThree)(i)),e.rotation.copy((0,a.eulerToThree)((new o.default).setFromVector3(s))),e.renderOrder=1}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.buildMesh=function(){var e=u(this.props);return c(e,this.props),e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),c(this.mesh,this.props)},t}(s.default);t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseQueue=void 0;var n=function(){function e(e){var t=this;this.isCanceled=!1,this.hasSuccess=!1,this.hasFailure=!1,this.promise=Promise.all(e.map((function(e){return e.then((function(){t.hasSuccess=!0}),(function(){t.hasFailure=!0}))}))).then((function(){return{hasSuccess:t.hasSuccess,hasFailure:t.hasFailure,isCanceled:t.isCanceled}}))}return e.prototype.setCanceled=function(){this.isCanceled=!0},e}();t.PromiseQueue=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(34),o=r(1051),A=r(2),a=function(){function e(e){this.props=e}return e.prototype.create=function(e){var t=this;return this.meshBuilder=new o.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.loadingStatus}),(function(e){return t.loadingStatus=e}),A.noop,e),this.meshBuilder.createMesh()},e.prototype.update=function(e){this.meshBuilder.updateMesh(e)},e.prototype.dispose=function(e){this.meshBuilder.disposeMesh()},(0,n.__decorate)([i.observable],e.prototype,"loadingStatus",void 0),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastHandledSignalCount=0,t}return(0,n.__extends)(t,e),t.prototype.componentWillMount=function(){this.lastHandledSignalCount=this.props.autoSaveSignalCount,this.props.rootState.document.autoSave.start()},t.prototype.componentWillReceiveProps=function(e){e.autoSaveSignalCount!==this.lastHandledSignalCount&&(this.props.rootState.document.saveDocument(!0),this.lastHandledSignalCount=e.autoSaveSignalCount)},t.prototype.render=function(){return null},t}(r(11).Component),A=(0,i.connect)((function(e){return{autoSave:e.document.autoSave}}),(function(e){return{autoSaveSignalCount:e.autoSave.autoSaveSignalCount}}),o);t.default=A},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1063);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1923);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1924);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.createReactContext=exports.PureComponent=exports.Component=void 0;var React=_interopRequireWildcard(__webpack_require__(11)),_async=__webpack_require__(1063),enterModule;function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var BaseComponent=function(_React$Component){_inherits(BaseComponent,_React$Component);var _super=_createSuper(BaseComponent);function BaseComponent(){return _classCallCheck(this,BaseComponent),_super.apply(this,arguments)}return _createClass(BaseComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BaseComponent}(React.Component),BasePureComponent=function(_React$PureComponent){_inherits(BasePureComponent,_React$PureComponent);var _super2=_createSuper(BasePureComponent);function BasePureComponent(){return _classCallCheck(this,BasePureComponent),_super2.apply(this,arguments)}return _createClass(BasePureComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BasePureComponent}(React.PureComponent),Component=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent);exports.Component=Component;var PureComponent=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);exports.PureComponent=PureComponent,_async.context.extend(Component),_async.context.extend(PureComponent);var createReactContext=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.asyncContext||(0,_async.createAsyncContext)(),r=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent),n=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);return t.extend(r),t.extend(n),{Component:r,PureComponent:n}},reactHotLoader,leaveModule;exports.createReactContext=createReactContext,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(BaseComponent,"BaseComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(BasePureComponent,"BasePureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(Component,"Component","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(PureComponent,"PureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(createReactContext,"createReactContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingletonRef=void 0;var _util=__webpack_require__(79),enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var SingletonRef=function(){function SingletonRef(e){var t=this;_classCallCheck(this,SingletonRef),this.instance=function(){return t.value||t.preValue},this.preInstance=function(){return t.preValue},e&&(this.noPreInstance=!0)}return _createClass(SingletonRef,[{key:"set",value:function(e){if(this.value)throw new Error("CUSTOM: Singleton exception while set!");this.value=e}},{key:"unset",value:function(e){this.value!==e&&_util.Util.asyncThrow(new Error("CUSTOM: Singleton exception while unset!")),this.noPreInstance||(this.preValue=this.value),this.value=void 0}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),SingletonRef}(),reactHotLoader,leaveModule;exports.SingletonRef=SingletonRef,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&reactHotLoader.register(SingletonRef,"SingletonRef","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/Singleton.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(322);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1926);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1058);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(695);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1059);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(1060);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(694);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(1061);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(1062);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.tde=void 0;var n,i=r(322),o=r(695);(n=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).enterModule)&&n(e);var A={desc:"dummy",module:function(){return this},defineCase:function(){return this}};function a(e,t){try{return i.tci.enabled?o.TestDesign.create(e,t):A}catch(e){return A}}var s,u,c={design:a};t.tde=c,(s=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).default)&&(s.register(A,"DUMMY_DESIGN","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(a,"design","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(c,"tde","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js")),(u=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).leaveModule)&&u(e)}).call(this,r(24)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1928);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1929);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1064);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1065);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1930);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Service=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var Service=function(){function Service(){_classCallCheck(this,Service)}return _createClass(Service,[{key:"getId",value:function(){return this.id}},{key:"onAdd",value:function(e,t){if(!this.center||this.center!==e){if(!e||!t)throw new Error("CUSTOM: Registe a invalid service!");if("string"!=typeof t&&!(this instanceof t))throw new Error("CUSTOM: Registe a service whose decl is not compatible with impl!");this.center&&this.center.rem(this.id),this.center=e,this.id=t}}},{key:"onRem",value:function(e,t){this.center===e&&(this.center=void 0,this.id=void 0)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),Service}(),reactHotLoader,leaveModule;exports.Service=Service,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&reactHotLoader.register(Service,"Service","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/Service.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceApplication=exports.DynamicServiceApplication=void 0;var _PluginApplication2=__webpack_require__(696),_util=__webpack_require__(79),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var DynamicServiceApplication=function(_PluginApplication){_inherits(DynamicServiceApplication,_PluginApplication);var _super=_createSuper(DynamicServiceApplication);function DynamicServiceApplication(e,t,r){var n;return _classCallCheck(this,DynamicServiceApplication),(n=_super.call(this,t,r||e.getPlugin())).framework=e,n}return _createClass(DynamicServiceApplication,[{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppRunning(e)}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppExited(e)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments)}}))}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),DynamicServiceApplication}(_PluginApplication2.PluginApplication);exports.DynamicServiceApplication=DynamicServiceApplication;var ServiceApplication=function(_DynamicServiceApplic){_inherits(ServiceApplication,_DynamicServiceApplic);var _super2=_createSuper(ServiceApplication);function ServiceApplication(e,t){return _classCallCheck(this,ServiceApplication),_super2.call(this,e,t)}return _createClass(ServiceApplication,[{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"postInit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppInited(e)}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),ServiceApplication}(DynamicServiceApplication),reactHotLoader,leaveModule;exports.ServiceApplication=ServiceApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(DynamicServiceApplication,"DynamicServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js"),reactHotLoader.register(ServiceApplication,"ServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceContainerApplication=exports.ContainerStaticContext=exports.EDynamicPolicy=exports.EAppOrder=void 0;var _PluginApplication2=__webpack_require__(696),_util=__webpack_require__(79),_ServiceFramework=__webpack_require__(1065),enterModule,EAppOrder;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module),exports.EAppOrder=EAppOrder,function(e){e[e.LOW=1]="LOW",e[e.NORMAL=500]="NORMAL",e[e.HIGH=1e3]="HIGH"}(EAppOrder||(exports.EAppOrder=EAppOrder={}));var defaultRegisteOptions=function(){return{order:EAppOrder.NORMAL,dependencies:[]}},EDynamicPolicy;exports.EDynamicPolicy=EDynamicPolicy,function(e){e[e.DEFAULT=1]="DEFAULT",e[e.DELAY=2]="DELAY",e[e.DEFFERED=3]="DEFFERED"}(EDynamicPolicy||(exports.EDynamicPolicy=EDynamicPolicy={}));var defaultRegisteDynamicOptions=function(){return{policy:EDynamicPolicy.DEFAULT,delay:0,dependencies:[]}},ContainerStaticContext=function(){function ContainerStaticContext(){_classCallCheck(this,ContainerStaticContext),this.appDescs=[],this.dynamicAppDescs=[],this.serviceDescs=new Map}return _createClass(ContainerStaticContext,[{key:"addDependentPlugins",value:function(e){var t=void 0;this.pluginClass?t=this.pluginClass.dependencies:(this.tempDeps||(this.tempDeps=[]),t=this.tempDeps),e.forEach((function(e){t.includes(e)||t.push(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}},{key:"pluginClass",get:function(){return this._pluginClass},set:function(e){if(this._pluginClass)throw new Error("CUSTOM: Plugin of container application has been set");if(this._pluginClass=e,this.tempDeps){var t=this._pluginClass.dependencies;this.tempDeps.forEach((function(e){t.includes(e)||t.push(e)})),this.tempDeps=void 0}}}]),ContainerStaticContext}();exports.ContainerStaticContext=ContainerStaticContext;var containerStaticContexts=new Map;function getContainerStaticContext(e){var t=containerStaticContexts.get(e);return t||(t=new ContainerStaticContext,containerStaticContexts.set(e,t)),t}function generateContainerAnnotations(e){var t=getContainerStaticContext(e);return{registe:function(e,r){if(t.appDescs.findIndex((function(t){return t.create===e}))>=0)throw new Error("CUSTOM: ServiceApplication registe twice!");return r=r?Object.assign(defaultRegisteOptions(),r):defaultRegisteOptions(),t.appDescs.push({create:e,options:r}),t.addDependentPlugins(r.dependencies||[]),function(e){}},registeDynamic:function(e,r,n){if(t.dynamicAppDescs.findIndex((function(t){return t.id===e}))>=0)throw new Error("CUSTOM: DynamicServiceApplication registe twice!");return n=n?Object.assign(defaultRegisteDynamicOptions(),n):defaultRegisteDynamicOptions(),t.dynamicAppDescs.push({create:r,id:e,options:n}),t.addDependentPlugins(n.dependencies||[]),function(e){}},service:function(e,r){if(!e||!r)throw new Error("CUSTOM: decl or provider of service is invalid!");return function(n){var i=t.serviceDescs.get(r);if(i||(i=[],t.serviceDescs.set(r,i)),i.some((function(t){return t.id===e})))throw new Error("CUSTOM: id of service conflict!");i.push({id:e,impl:n})}}}}var ServiceContainerApplication=function(_PluginApplication){_inherits(ServiceContainerApplication,_PluginApplication);var _super=_createSuper(ServiceContainerApplication);function ServiceContainerApplication(e,t){var r;_classCallCheck(this,ServiceContainerApplication),(r=_super.call(this,e,t)).apps=[];var n=r.getStaticContext();if(!(n.pluginClass&&t instanceof n.pluginClass))throw new Error("CUSTOM: Plugin of container application is invalid");return r}return _createClass(ServiceContainerApplication,[{key:"getStaticContext",value:function(){return getContainerStaticContext(this.constructor)}},{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"initApps",value:function(){var e=this,t=this.getStaticContext().appDescs;t.sort((function(e,t){return t.options.order-e.options.order})),t.forEach((function(t){_util.Util.safeExec((function(){e.apps.push(t.create(e.framework))}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.prevInit()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.init()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.postInit()}),!0)}))}},{key:"runApps",value:function(){this.apps.forEach((function(e){_util.Util.safeExec((function(){e.run()}),!0)}))}},{key:"exitApps",value:function(){this.apps.slice().reverse().forEach((function(e){_util.Util.safeExec((function(){e.exit()}),!0)})),this.apps=[]}},{key:"tryStartDynamicApplications",value:function(){var e=this;Promise.resolve().then((function(){e.getStaticContext().dynamicAppDescs.forEach((function(t){_util.Util.safeExec((function(){t.options.policy===EDynamicPolicy.DEFFERED?e.framework.startDynamicApp(t.id):t.options.policy===EDynamicPolicy.DELAY&&setTimeout((function(){e.framework.startDynamicApp(t.id)}),t.options.delay)}),!0)}))}))}},{key:"initFramework",value:function(){var e=this.options.coreClass&&this.options.coreClass.ServiceFramework||_ServiceFramework.ServiceFramework;this.framework=new e(this),this.framework.init()}},{key:"releaseFramework",value:function(){this.framework&&this.framework.release()}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework&&this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.initApps(),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.runApps(),e.framework.setAppRunning(e),e.tryStartDynamicApplications()}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){e.framework.setAppExited(e),e.exitApps(),t.apply(e,arguments)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){e.initFramework(),t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments),e.releaseFramework()}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"setPluginClass",value:function(e){getContainerStaticContext(this).pluginClass=e}},{key:"generateAnnotations",value:function(){return generateContainerAnnotations(this)}}]),ServiceContainerApplication}(_PluginApplication2.PluginApplication),reactHotLoader,leaveModule;exports.ServiceContainerApplication=ServiceContainerApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(EAppOrder,"EAppOrder","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteOptions,"defaultRegisteOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(EDynamicPolicy,"EDynamicPolicy","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteDynamicOptions,"defaultRegisteDynamicOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ContainerStaticContext,"ContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(containerStaticContexts,"containerStaticContexts","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(getContainerStaticContext,"getContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(generateContainerAnnotations,"generateContainerAnnotations","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ServiceContainerApplication,"ServiceContainerApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1066);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1932);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1067);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1068);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1933);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Monitor=void 0;var _AXR2=__webpack_require__(837),_Collector=__webpack_require__(416),_IdleWorker=__webpack_require__(1066),_PerfLog=__webpack_require__(1067),_TimeLog=__webpack_require__(1068),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function defaultSendLog(e,t){console.log(e,t)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var Monitor=function(_AXR){_inherits(Monitor,_AXR);var _super=_createSuper(Monitor);function Monitor(){var e;return _classCallCheck(this,Monitor),(e=_super.apply(this,arguments)).perfLog=e.partialCreator.create(_PerfLog.PerfLog),e.idleWorker=e.partialCreator.create(_IdleWorker.IdleWorker),e.timeLog=e.partialCreator.create(_TimeLog.TimeLog),e}return _createClass(Monitor,[{key:"module",value:function(){return"monitor"}},{key:"init",value:function(){_get(_getPrototypeOf(Monitor.prototype),"init",this).call(this),this.collector||(this.collector=Monitor.getDefaultCollector()),this.sendLog||(this.sendLog=defaultSendLog)}},{key:"addConfig",value:function(e){var t=this,r=e.sendLog,n=e.collector,i=e.timeLogConfig,o=e.perfLogConfig;r&&(this.sendLog=r),n&&(this.collector=n),i&&this.timeLog.addConfig(i),o&&o.forEach((function(e){return t.perfLog.addConfig(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"getDefaultCollector",value:function(){return Monitor.collector||(Monitor.collector=new _Collector.Collector,Monitor.collector.init()),Monitor.collector}}]),Monitor}(_AXR2.AXR),reactHotLoader,leaveModule;exports.Monitor=Monitor,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(defaultSendLog,"defaultSendLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js"),reactHotLoader.register(Monitor,"Monitor","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BehaviorsLog=exports.BehaviorsLogCore=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var BehaviorsLogCore=function(){function BehaviorsLogCore(e){_classCallCheck(this,BehaviorsLogCore),this.toolName=e.toolName,this.designId=e.designId,this.userId=e.userId,this.levelId=e.levelId,this.toolVersion=e.toolVersion,this.errorHandler=e.errorHandler}return _createClass(BehaviorsLogCore,[{key:"valueParser",value:function(e){return"function"==typeof e?e():e}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId;BehaviorsLog.log({type:r,description:i,toolName:t||this.valueParser(this.toolName),toolVersion:n||this.valueParser(this.toolVersion),userId:o||this.valueParser(this.userId),designId:A||this.valueParser(this.designId),levelId:a||this.valueParser(this.levelId),errorHandler:this.errorHandler})}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BehaviorsLogCore}();exports.BehaviorsLogCore=BehaviorsLogCore;var BehaviorsLog=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"create",value:function(e){return new BehaviorsLogCore(e)}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId,s=e.errorHandler;try{fetch("https://actionstat.kujiale.com/api/toolbehaviors/".concat(r,"/log"),{method:"POST",body:JSON.stringify({description:i,toolName:t,toolVersion:n,ua:null===navigator||void 0===navigator?void 0:navigator.userAgent,userId:o,designId:A,levelId:a,behavior:r}),headers:{"content-type":"application/json"}})}catch(e){"function"==typeof s&&s(e)}}}]),e}(),reactHotLoader,leaveModule;exports.BehaviorsLog=BehaviorsLog,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(BehaviorsLogCore,"BehaviorsLogCore","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js"),reactHotLoader.register(BehaviorsLog,"BehaviorsLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TOLERANCE=t.SIN_THETA_ZERO_TOLERANCE=t.RADIANS_TOLERANCE=t.DEGREES_TOLERANCE=t.DISTANCE_TOLERANCE=t.SIZE_TOLERANCE=t.NUMBER_TOLERANCE=void 0;var n=r(3);t.NUMBER_TOLERANCE=1e-6;t.SIZE_TOLERANCE=.1;t.DISTANCE_TOLERANCE=1;t.DEGREES_TOLERANCE=1;var i=Math.PI/180;t.RADIANS_TOLERANCE=i;var o=Math.sin(i);t.SIN_THETA_ZERO_TOLERANCE=o;var A=new n.Tolerance.Tolerance(Math.cos(i),1,1e-6);t.TOLERANCE=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhysicalModel=void 0;var n=r(3),i=r(321),o=v(r(188)),A=v(r(141)),a=v(r(358)),s=v(r(68)),u=v(r(98)),c=v(r(207)),l=v(r(531)),g=v(r(44)),f=v(r(113)),h=v(r(16)),p=v(r(5)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==w(e)&&"function"!=typeof e)return{default:e};var r=B(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(n,o,A):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(99)),I=r(418),y=r(697),C=r(1072),E=r(1938);function B(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(B=function(e){return e?r:t})(e)}function v(e){return e&&e.__esModule?e:{default:e}}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Q(e,t){return(Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=S(e);if(t){var i=S(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _(this,r)}}function _(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var D,R,M,x,P,T,F,O,L,k,N,G=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":w(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},U=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":w(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q(e,t)}(A,e);var t,r,i,o=b(A);function A(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A),(e=o.call(this)).position=new p.default(0,0,0),e.rotation=new p.default(0,0,0),e.scale=new p.default(1,1,1),e.size=new p.default(1,1,1),e.translation=new p.default,e.center=new p.default,e}return t=A,(r=[{key:"getBoundingBox2",value:function(){return this.getBox2().getBoundingBox()}},{key:"getBoundingBox3",value:function(){return this.getBox3().getBoundingBox()}},{key:"getPolygon",value:function(){return this.getBox2().getPolygon()}},{key:"getBox2",value:function(){return this.box2||(this.box2=new a.default(new h.default(this.getScaledSize()),new h.default(this.getPosition()),this.getRotation().z)),this.box2}},{key:"getBox3",value:function(){return this.box3||(this.box3=new s.default(this.getScaledSize(),this.getPosition(),this.getRotation())),this.box3}},{key:"getMatrix4",value:function(){return this.matrix4||(this.matrix4=(new g.default).compose(this.getPosition(),(new u.default).setFromVector3(this.getRotation()),this.getScale())),this.matrix4}},{key:"setMatrix4",value:function(e){var t=new p.default,r=new u.default(0,0,0),n=new p.default;e.decompose(t,r,n),this.position=t,this.rotation=(new p.default).setXYZ(r),this.scale=n}},{key:"getConcatenatedMatrix",value:function(){return this.getMatrix4()}},{key:"getConcatenatedBox3",value:function(){return this.getBox3()}},{key:"getMatrix3",value:function(){return this.matrix3||(this.matrix3=(new l.default).compose(new h.default(this.getPosition()),this.getRotation().z,new h.default(this.getScale()))),this.matrix3}},{key:"getTop",value:function(){return this.position.z+this.getScaledSize().z/2}},{key:"getBottom",value:function(){return this.position.z-this.getScaledSize().z/2}},{key:"getHeightRange",value:function(){return new c.default(this.getBottom(),this.getTop())}},{key:"getScaledSize",value:function(){return p.default.mul(this.getSize(),this.getScale())}},{key:"getScale",value:function(){return this.scale}},{key:"setScale",value:function(e){if((0,C.equalsNumber3)(this.scale,e))return this;var t=Object.assign(Object.assign({},this.scale),e),r=(0,C.checkNotZero)(t.x),n=(0,C.checkNotZero)(t.y),i=(0,C.checkNotZero)(t.z),o=(0,C.hackScaleValue)(r),A=(0,C.hackScaleValue)(n),a=(0,C.hackScaleValue)(i);return this.scale=new p.default(o,A,a),o===r&&A===n&&a===i||I.LOGGER.logError(new Error("illegal setScale ".concat(this.getId(),",error val is x:").concat(r,",y:").concat(n,",z:").concat(i))),this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(e){if((0,C.equalsNumber3)(this.size,e))return this;var t=Object.assign(Object.assign({},this.size),e),r=t.x,n=t.y,i=t.z;return this.size=new p.default((0,C.hackSizeValue)(r),(0,C.hackSizeValue)(n),(0,C.hackSizeValue)(i)),this}},{key:"getRotation",value:function(){return this.rotation}},{key:"setRotation",value:function(e){return(0,C.equalsNumber3)(this.rotation,e)||(this.rotation=new p.default(Object.assign(Object.assign({},this.rotation),e))),this}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){if((0,C.equalsNumber3)(this.position,e))return this;var t=e.x,r=e.y,n=e.z;return void 0!==t&&(0,y.checkNumberAndLog)(t,"setPositionX"),void 0!==r&&(0,y.checkNumberAndLog)(r,"setPositionY"),void 0!==n&&(0,y.checkNumberAndLog)(n,"setPositionZ"),this.position=new p.default(Object.assign(Object.assign({},this.position),e)),this}},{key:"getTranslation",value:function(){return this.translation}},{key:"setTranslation",value:function(e){return this.translation=e,this}},{key:"getCenter",value:function(){return this.center}},{key:"setCenter",value:function(e){return this.center=e,this}},{key:"isSizeNaN",value:function(){return isNaN(this.size.x)||isNaN(this.size.y)||isNaN(this.size.z)}},{key:"isScaled",value:function(){return!this.scale.nearEquals(p.default.ONE)}},{key:"localToGlobal",value:function(e){var t=this.getConcatenatedMatrix(),r=e.clone();return r.applyMatrix4(t),r}},{key:"globalToLocal",value:function(e){var t=(new g.default).getInverse(this.getConcatenatedMatrix()),r=e.clone();return r.applyMatrix4(t),r}},{key:"globalToLocal2d",value:function(e){var t=e.clone(),r=new p.default(t.x,t.y,0),i=this.globalToLocal(r);return new n.Point2d(i.x,i.y)}},{key:"localToGlobal2d",value:function(e){var t=e.clone(),r=new p.default(t.x,t.y,0),i=this.localToGlobal(r);return new n.Point2d(i.x,i.y)}},{key:"afterSet",value:function(e,t,r){t===E.ModelPropertyType.Physical&&(this.matrix3=void 0,this.matrix4=void 0,this.box3=void 0,this.box2=void 0)}}])&&m(t.prototype,r),i&&m(t,i),A}(d.default);t.PhysicalModel=j,G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(D=void 0!==p.default&&p.default)?D:Object)],j.prototype,"position",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(R=void 0!==p.default&&p.default)?R:Object)],j.prototype,"rotation",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(M=void 0!==p.default&&p.default)?M:Object)],j.prototype,"scale",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(x=void 0!==p.default&&p.default)?x:Object)],j.prototype,"size",void 0),G([(0,d.property)(p.default.isEqual),U("design:type","function"==typeof(P=void 0!==p.default&&p.default)?P:Object)],j.prototype,"translation",void 0),G([(0,d.property)(p.default.isEqual),U("design:type","function"==typeof(T=void 0!==p.default&&p.default)?T:Object)],j.prototype,"center",void 0),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(F=void 0!==o.default&&o.default)?F:Object)],j.prototype,"getBoundingBox2",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(O=void 0!==A.default&&A.default)?O:Object)],j.prototype,"getBoundingBox3",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(L=void 0!==f.default&&f.default)?L:Object)],j.prototype,"getPolygon",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getBox2",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getBox3",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(k=void 0!==p.default&&p.default)?k:Object)],j.prototype,"getScale",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getSize",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(N=void 0!==p.default&&p.default)?N:Object)],j.prototype,"getRotation",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getPosition",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getTranslation",null)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkNumberAndLog=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(void 0===e)return void n.LOGGER.logError(new Error("".concat(t," undefined number: ").concat(e)));if(!Number.isFinite(e))return void n.LOGGER.logError(new Error("".concat(t," Infinity number: ").concat(e)));if("string"==typeof e)return void n.LOGGER.logError(new Error("".concat(t," string number: ").concat(e)));if(isNaN(e))return void n.LOGGER.logError(new Error("".concat(t," NaN number: ").concat(e)))};var n=r(418)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setOnCheckParamErrorCallBack=function(e){u=e},t.checkParamAndLog=function(e,t,r){c(e,t)&&s(e,t,r)},t.checkParsedValueAndLog=function(e,t,r){l(e,t)&&s(e,t,r)},t.checkParam=c,t.checkParsedValue=l;var n,i=r(2),o=r(10),A=r(418),a=(n=r(1070))&&n.__esModule?n:{default:n};function s(e,t,r){var n=r.action,i=r.oldValue,o=r.paramName;A.LOGGER.logError(new Error("action: ".concat(n," invalid ").concat(e," type value, paramName: ").concat(o,", value: ").concat(JSON.stringify(t),", ").concat(t,", oldValue: ").concat(i))),u(o,e,t,n)}var u=i.noop;function c(e,t){var r=!1;try{switch(e){case o.ParamType.FLOAT:var n=(0,a.default)(e,t);("number"!=typeof n||isNaN(n))&&(r=!0);break;case o.ParamType.INT:var A=(0,a.default)(e,t);("number"!=typeof A||isNaN(A))&&(r=!0),(0,i.isInteger)(A)&&!t.includes(".")||(r=!0);break;case o.ParamType.MATERIAL:case o.ParamType.SHAPE:var s=Number(t);(0,i.isInteger)(s)||(r=!0);break;case o.ParamType.BOOLEAN:"true"!==t&&"false"!==t&&(r=!0);break;case o.ParamType.STYLE:var u=(0,a.default)(e,t);"bgId"in u&&"versionId"in u||(r=!0),"number"==typeof u.bgId&&"number"==typeof u.versionId||(r=!0)}}catch(e){r=!0}return r}function l(e,t){var r=!1;try{switch(e){case o.ParamType.FLOAT:("number"!=typeof t||isNaN(t))&&(r=!0);break;case o.ParamType.INT:("number"!=typeof t||isNaN(t))&&(r=!0),(0,i.isInteger)(t)||(r=!0);break;case o.ParamType.MATERIAL:case o.ParamType.SHAPE:(0,i.isInteger)(Number(t))||(r=!0);break;case o.ParamType.BOOLEAN:"boolean"!=typeof t&&(r=!0);break;case o.ParamType.STYLE:"bgId"in t&&"versionId"in t||(r=!0),"number"==typeof t.bgId&&"number"==typeof t.versionId||(r=!0);break;case o.ParamType.STRING:"string"!=typeof t&&(r=!0)}}catch(e){r=!0}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelPropertyType=void 0;var n={Physical:Symbol("Physical"),Hole:Symbol("Hole"),NEED_CHANGED_EVENT:Symbol("NEED_CHANGED_EVENT")};t.ModelPropertyType=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamBizProperty=void 0;var n=r(1940);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.paramKey=t.key,this.namespace=t.namespace,this.name=t.name,this.value=t.value,this.valueType=t.valueType}var t,r,o;return t=e,(r=[{key:"getParsedValue",value:function(){switch(this.valueType){case n.ParamBizValueType.boolean:case n.ParamBizValueType.int:case n.ParamBizValueType.float:return JSON.parse(this.value);default:return this.value}}},{key:"getName",value:function(){return this.name}},{key:"getValue",value:function(){return this.value}},{key:"getParamKey",value:function(){return this.paramKey}},{key:"getData",value:function(){return this.data}}])&&i(t.prototype,r),o&&i(t,o),e}();t.ParamBizProperty=o},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ParamBizValueType=void 0,t.ParamBizValueType=n,function(e){e.boolean="boolean",e.float="float",e.int="int"}(n||(t.ParamBizValueType=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseVector2=c,t.parseVector3=l,t.parseShape3=function(e){var t=new s.default,r=[];return e.curves.forEach((function(e){if("RevitLine3D"===e.type){var t=e;r.push(new a.default(l(t.start),l(t.end)))}else if("RevitArc3D"===e.type){var i=e,o=new n.default(l(i.position),l(i.xDirection),l(i.yDirection));r.push(new A.default(o,c(i.center),i.radius,i.startAngle,i.arcAngle))}})),t.setRevitCurves(r)},t.RevitArc3Data=void 0;var n=u(r(242)),i=u(r(16)),o=u(r(5)),A=u(r(699)),a=u(r(516)),s=u(r(1078));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){return e?new i.default(e):void 0}function l(e){return e?new o.default(e):void 0}t.RevitArc3Data=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=""}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(722),i=r(78),o=r(112),A=r(339),a=r(102),s=r(16),u=function(){function e(e,t,r,n){this.center=e,this.radius=t,this.startAngle=r,this.arcAngle=n}return e.prototype.getAngleAtT=function(e){return this.startAngle+e*this.arcAngle},e.prototype.getPointAtT=function(e){return this.getPointByAngle(this.getAngleAtT(e))},e.prototype.getLengthAtT=function(e){var t=this.arcAngle;return this.radius*(Math.abs(t)*e)},e.prototype.getTByLength=function(e){var t=this.arcAngle;return e/this.radius/Math.abs(t)},e.prototype.getAngleByPoint=function(e){var t=this.getCircle().getAngle(e),r=this.getTByAngle(t);return this.getAngleAtT(r)},e.prototype.getTByAngle=function(e){var t=this.startAngle,r=this.arcAngle,n=A.default.normalize(e),i=A.default.normalize(t),o=A.default.normalize(t+r),a=!this.isClockwise(),s=i>o;if(s&&a||!s&&!a){var u=A.default.normalize(n-i);return u>Math.abs(r)&&(u=A.TWO_PI-u),u/Math.abs(r)}return(n-i)/r},e.prototype.getPointByAngle=function(e){var t=this.center,r=this.radius;return s.default.add(t,new s.default(r*Math.cos(e),r*Math.sin(e)))},e.prototype.isAngleInArc=function(e){var t=this.startAngle,r=this.arcAngle,n=A.default.normalize(e),i=A.default.normalize(t),o=A.default.normalize(t+r),a=Math.min(i,o),s=Math.max(i,o),u=r>0,c=i<o;return u&&c||!u&&!c?n>=a&&n<=s:n<=a||n>=s},e.prototype.getApproximatePoints=function(e){void 0===e&&(e=.3);var t=[],r=[new s.default(0,1)];if(0===this.radius||0===this.arcAngle)return t;for(;0!==r.length;){var n=r.pop(),i=.5*(n.x+n.y),A=new o.default(this.getPointAtT(n.x),this.getPointAtT(n.y)).signedDistanceFromPoint(this.getPointAtT(i));Math.abs(A)<e?t.push(this.getPointAtT(n.x)):r.push(new s.default(i,n.y),new s.default(n.x,i))}return t.push(this.getPointAtT(1)),t},e.prototype.getPointsByIncrement=function(e){if(e<=0)throw new Error("Increment must be greater than zero: "+e);var t,r=[];for(t=0;t<=1;t+=e)r.push(this.getPointAtT(t));return a.default.isEqual(t,1,.5*e)||r.push(this.getPointAtT(1)),r},e.prototype.getNearestPoint=function(e){var t=this.center,r=s.default.sub(e,t).angle();if(!this.isAngleInArc(r)){var n=this.getPointAtT(0),i=this.getPointAtT(1);return e.distance(n)<e.distance(i)?n:i}return this.getPointByAngle(r)},e.prototype.getPointSide=function(e){var t=this.center,r=this.radius,n=this.arcAngle,i=e.distance(t),o=-1;return a.default.isEqual(i,r)?o=0:i<r&&(o=1),0===(o*=Math.sign(n))?"ON_CURVE":o>0?"ON_LEFT":"ON_RIGHT"},e.prototype.getDistance=function(e,t){return void 0===t&&(t=!0),Math.abs(this.getSignedDistance(e,t))},e.prototype.getSignedDistance=function(e,t){var r;if(void 0===t&&(t=!0),t)r=this.getNearestPoint(e);else{var n=this.getAngleByPoint(e);r=this.getCircle().getPoint(n)}var i=e.distance(r);return"ON_LEFT"===this.getPointSide(e)?-i:i},e.prototype.isPointOnArcCurveInclusive=function(e,t){if(void 0===t&&(t=i.NUMBER_TOLERANCE),!this.getCircle().isPointOnCircle(e,t))return!1;var r=s.default.sub(e,this.center).angle();return this.isAngleInArc(r)},e.prototype.isPointOnArcCurveExclusive=function(e,t){return void 0===t&&(t=i.NUMBER_TOLERANCE),this.isPointOnArcCurveInclusive(e,t)&&!this.isPointOnArcEnds(e,t)},e.prototype.isPointOnArcEnds=function(e,t){return void 0===t&&(t=i.NUMBER_TOLERANCE),this.getPointAtT(0).nearEquals(e,t)||this.getPointAtT(1).nearEquals(e,t)},e.prototype.isClockwise=function(){return this.arcAngle<0},e.prototype.getBulge=function(){return Math.tan(this.arcAngle/4)},e.prototype.getCircle=function(){return new n.default(this.center,this.radius)},e.prototype.clone=function(){return new e(this.center.clone(),this.radius,this.startAngle,this.arcAngle)},e.fromChordAndBulge=function(t,r){var n=t.start,i=t.length(),o=t.getCenter(),a=Math.sign(r),u=a*r,c=4*Math.atan(u),l=i/2/Math.tan(c/2),g=t.getVector().rotate(a*A.HALF_PI).normalize(),f=s.default.add(o,g.mul(l)),h=s.default.sub(n,f);return new e(f,h.length(),h.angle(),a*c)},e}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShape3=function(e){return{curves:e.getRevitCurves().map((function(e){if(e instanceof o.default)return{start:a(e.getStartPoint()),end:a(e.getEndPoint()),type:"RevitLine3D"};if(e instanceof i.default){var t=e.getRectFace();return{center:(r=e.getCenter(),(0,n.pick)(r,"x","y")),radius:e.getRadius(),startAngle:e.getStartAngle(),arcAngle:e.getArcAngle(),position:a(t.origin),xDirection:a(t.directionU),yDirection:a(t.directionV),type:"RevitArc3D"}}var r}))}};var n=r(2),i=A(r(699)),o=A(r(516));function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return(0,n.pick)(e,"x","y","z")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatParamValue=function(e,t){switch(e){case i.default.FLOAT:return A(t);case i.default.FLOAT2:case i.default.FLOAT3:return function(e){return e.toArray().map(A).join(",")}(t);case i.default.FLOAT3_BUFFER:return function(e){return e.map((function(e){return e.toArray().map(A).join(",")})).join(";")}(t);case i.default.INT:return function(e){return e.toFixed()}(t);case i.default.BOOLEAN:return function(e){return e.toString()}(t);case i.default.STYLE:case i.default.FIT:return function(e){return JSON.stringify(e)}(t);case i.default.BOOLEAN_LIST:return function(e){return parseInt((0,o.reverseStr)(e),2).toString()}(t)}return t},t.FRACTION_DIGITS=void 0;var n,i=(n=r(590))&&n.__esModule?n:{default:n},o=r(1071);function A(e){return e.toString()}t.FRACTION_DIGITS=1},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(21),i=void 0,o={},A={saveLog:function(){var e=function(){n.Util.safeExec((function(){i=void 0;var e=Object.values(o);if(e.length){var t=function(e){var t="",r=[];return e.forEach((function(e){var n=e[0];r.push(n.modelId+(n.rootModelId?">"+n.rootModelId:"")),t+="".concat(n.modelName," ").concat(n.rootModelName?">"+n.rootModelName:""," change param {"),e.forEach((function(e){t+="".concat(e.paramName,": ").concat(e.prevVal," to ").concat(e.nextVal,"。 ")})),t+="}; "})),{logContent:t,modelIds:r}}(e),r=t.modelIds,A=t.logContent;(0,n.getLocalLogger)().add({module:"params",logLevel:n.LocalLogLevel.Info,entityIds:r,type:n.LogType.Data,content:A})}o={}}),!1)};n.Util.safeExec((function(){i&&window.cancelIdleCallback(i),i=window.requestIdleCallback(e)}),!1)},collectParams:function(e,t,r){n.Util.safeExec((function(){if(r&&e.value!==t.value){var n=r.getId();o[n]||(o[n]=[]);var i=r.getRoot();o[n].push({paramName:t.name,modelId:n,modelName:r.getName(),rootModelId:i!==r?i.getId():void 0,rootModelName:i!==r?i.getName():void 0,prevVal:e.value,nextVal:t.value})}}),!1)}};t.default=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCommonOverrideData=u,t.setCommonOverrideData=function(e,t){var r=u(e);if(!r)return(0,i.set)(e,"commonOverrideAttr",JSON.stringify(t));var a=Object.assign({},r);function s(e,t){var r=o(e);return r.reverse(),(0,n.uniqBy)(r,(function(e){return JSON.stringify(t.map((function(t){return e[t]})))})).reverse()}return Object.entries(t).forEach((function(e){var t,r=A(e,2),n=r[0],i=r[1];a[n]?(t=a[n]).push.apply(t,o(i)):a[n]=i})),Object.entries(a).forEach((function(e){var t=A(e,2),r=t[0],n=t[1];"modelAttr"===r?a[r]=s(n,["attrName","setBizType"]):"modelParamAttr"===r&&(a[r]=s(n,["attrName","attrName","setBizType"]))})),(0,i.set)(e,"commonOverrideAttr",JSON.stringify(a))},t.delCommonOverrideData=function(e,t,r){var o=u(e)||{},a=o[t];if(!a)return;return(0,n.remove)(a,(function(e){return Object.entries(r).every((function(t){var r=A(t,2),n=r[0];return r[1]===e[n]}))})),0===Object.keys(o).length||Object.values(o).every((function(e){return 0===e.length}))?(0,i.del)(e,"commonOverrideAttr"):(0,i.set)(e,"commonOverrideAttr",JSON.stringify(o))},t.COMMON_OVERRIDE_ATTR_KEY=void 0;var n=r(2),i=r(1947);function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,i,o=[],A=!0,a=!1;try{for(r=r.call(e);!(A=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);A=!0);}catch(e){a=!0,i=e}finally{try{A||null==r.return||r.return()}finally{if(a)throw i}}return o}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=(0,i.get)(e,"commonOverrideAttr");if(r)try{var n=JSON.parse(r);return t?Object.entries(n).reduce((function(e,r){var n=A(r,2),i=n[0],o=n[1];return e[i]=o.filter((function(e){return e.setBizType===t})),e}),{}):n}catch(e){}}t.COMMON_OVERRIDE_ATTR_KEY="commonOverrideAttr"},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,i,o=[],A=!0,a=!1;try{for(r=r.call(e);!(A=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);A=!0);}catch(e){a=!0,i=e}finally{try{A||null==r.return||r.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.get=function(e,t){var r=i(a(e,t),1)[0];return r&&r.data},t.del=function(e,t){var r=i(a(e,t),4),o=r[0],s=r[1],u=r[2],c=r[3];if(o)return s.splice(c,1),e.setBizProperties(Object.assign(Object.assign({},u),n({},A,JSON.stringify(s)))),!0},t.set=function(e,t,r){var o=i(a(e,t),3),s=o[0],u=o[1],c=o[2];s?s.data=r:u&&u.push({bizType:t,data:r});e.setBizProperties(Object.assign(Object.assign({},c),n({},A,JSON.stringify(u||[{bizType:t,data:r}]))))};var A="com.neican.extpoint.build.afterbuildbypmd";function a(e,t){var r=e.getBizProperties();if(r){var n;try{n=JSON.parse(r[A])}catch(e){}if(Array.isArray(n)){for(var i,o=n.length;o;)if((i=n[--o])&&i.bizType===t)return[i,n,r,o];return[void 0,n,r]}return[void 0,void 0,r]}return[]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeWireGeometry=function(e,t){for(var r,n,o=e?e.coordinates:[],A=e?e.coordinatesIndex:[],a=t||new i.default,s=0;s<A.length-1;s+=2)r=3*A[s],n=3*A[s+1],a.vertices.push(o[r],o[r+1],o[r+2],o[n],o[n+1],o[n+2]);return a};var n,i=(n=r(1087))&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseZoneDivisionData=function(e){return function e(t){var r=Object.assign(Object.assign({},t),{size:new o.default(t.size.x,t.size.y,t.size.z),position:new o.default(t.position.x,t.position.y,t.position.z)});return t.zoneDivisions&&t.zoneDivisions.length&&(r.zoneDivisions=t.zoneDivisions.map((function(t){return e(t)}))),r}(e)},t.ZoneDivisionType=void 0;var n,i,o=(n=r(5))&&n.__esModule?n:{default:n};t.ZoneDivisionType=i,function(e){e.X="X",e.Y="Y",e.Z="Z"}(i||(t.ZoneDivisionType=i={}))},function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterAssignment=t.SourceObjectType=void 0,t.SourceObjectType=i,function(e){e[e.MODEL=0]="MODEL",e[e.DRAIN_HOLE=1]="DRAIN_HOLE",e[e.FAUCET_HOLE=2]="FAUCET_HOLE",e[e.AUX_HOLE=3]="AUX_HOLE"}(i||(t.SourceObjectType=i={}));var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,i;return t=e,(r=[{key:"getModel",value:function(){return this.model}},{key:"setModel",value:function(e){return this.model=e,this}},{key:"getName",value:function(){return this.name}},{key:"setName",value:function(e){return this.name=e,this}},{key:"getCategory",value:function(){return this.category}},{key:"setCategory",value:function(e){return this.category=e,this}},{key:"getSourceObjectType",value:function(){return this.sourceObjectType}},{key:"setSourceObjectType",value:function(e){return this.sourceObjectType=e,this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(e){return this.size=e,this}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){return this.position=e,this}},{key:"getRotate",value:function(){return this.rotate}},{key:"setRotate",value:function(e){return this.rotate=e,this}}])&&n(t.prototype,r),i&&n(t,i),e}();t.ParameterAssignment=o},function(e,t,r){"use strict";function n(e,t,r){if(e===t)return!0;if(e&&t&&e.length===t.length){for(var n=0,i=e.length;n<i;n++)if(r?!r(e[n],t[n]):e[n]!==t[n])return!1;return!0}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={equalsArray:n,equalsArrayBuffer:function(e,t){return e===t||!(!e||!t)&&n(new Float64Array(e),new Float64Array(t))},equalsBox3:function(e,t){return e===t||!(!e||!t)&&(e.getPosition().equals(t.getPosition())&&e.getSize().equals(t.getSize())&&e.getRotation().equals(t.getRotation()))},diffArray:function(e,t,r){t=t||[];var n=void 0,i=void 0,o=void 0,A=void 0;if(0===(e=e||[]).length)n=[],i=[],o=[],A=t.slice();else if(0===t.length)n=e.slice(),i=[],o=[],A=[];else{n=[],i=[],o=[],A=[];for(var a=void 0,s=void 0,u=void 0,c=0,l=Math.min(e.length,t.length);c<l;++c)if((s=e[c])!==(a=t[c])){if(r?r(s)!==r(a):s.id!==a.id){0!==c&&(e=e.slice(c),t=t.slice(c));break}i.push(s),o.push(a)}if(c===l){if(c<e.length)for(;c<e.length;)n.push(e[c]),++c;else if(c<t.length)for(;c<t.length;)A.push(t[c]),++c}else{for(var g={},f={},h=0,p=e.length;h<p;++h)s=e[h],g[u=r?r(s):s.id]=e[h];for(var d=0,I=t.length;d<I;++d)a=t[d],s=g[u=r?r(a):a.id],f[u]=a,s?s!==a&&(i.push(s),o.push(a)):A.push(a);for(var y=0,C=e.length;y<C;++y)s=e[y],(a=f[u=r?r(s):s.id])||n.push(s)}}return{removed:n,updatedOld:i,updatedNew:o,added:A}}};t.default=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={CoreCustomContext:!0,CoreParamModelAssemblyBackup:!0,CoreParamModelBackup:!0};Object.defineProperty(t,"CoreCustomContext",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"CoreParamModelAssemblyBackup",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"CoreParamModelBackup",{enumerable:!0,get:function(){return u.default}});var o=r(1953);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(208));Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=r(1958);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=c(r(703)),u=c(r(704));function c(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={DoorHoleData:!0,InnerFrameData:!0,MeshData:!0,ParamData:!0,ParamModelData:!0,ParamModelGroupData:!0,BaseParamModelData:!0};Object.defineProperty(t,"DoorHoleData",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"InnerFrameData",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"MeshData",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"ParamData",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"ParamModelData",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ParamModelGroupData",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"BaseParamModelData",{enumerable:!0,get:function(){return B.default}});var o=r(1954);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=r(1074);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=m(r(1076));Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=r(1079);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=m(r(1080));Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(1955);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(1956);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var g=m(r(1082));Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=m(r(419));Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(1088);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=r(1089);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var d=m(r(702));Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var I=m(r(701));Object.keys(I).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===I[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return I[e]}}))}));var y=r(1957);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var C=r(1083);Object.keys(C).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===C[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return C[e]}}))}));var E,B=(E=r(1073))&&E.__esModule?E:{default:E};function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(v=function(e){return e?r:t})(e)}function m(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=v(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}return i.default=e,r&&r.set(e,i),i}},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuleLimitData=void 0;t.RuleLimitData=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}},function(e,t,r){},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={InnerFrame:!0,DoorHole:!0,FitRule:!0,IntersectBox:!0,ParamPackage:!0,AutoGenerateConfig:!0,NamedValue:!0,ParamModelAttached:!0,IParamModelAttachedPartialPb:!0};Object.defineProperty(t,"InnerFrame",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"DoorHole",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"FitRule",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"IntersectBox",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"ParamPackage",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"AutoGenerateConfig",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"NamedValue",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ParamModelAttached",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"IParamModelAttachedPartialPb",{enumerable:!0,get:function(){return I.IParamModelAttachedPartialPb}});var o=r(1960);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=E(r(1081));Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=r(1075);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=E(r(698));Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=E(r(515));Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(1961);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=E(r(1086));Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var g=E(r(517));Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=r(518);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(1084);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=y(r(1085)),d=y(r(1962)),I=E(r(428));function y(e){return e&&e.__esModule?e:{default:e}}function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(C=function(e){return e?r:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=C(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}return i.default=e,r&&r.set(e,i),i}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RevitArc3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"RevitCurve3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"deltaTransformPoint",{enumerable:!0,get:function(){return o.deltaTransformPoint}}),Object.defineProperty(t,"RevitLine3",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"RevitShape3",{enumerable:!0,get:function(){return a.default}});var i=u(r(699)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(1077)),A=u(r(516)),a=u(r(1078));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseGeoReferenceData=function(e){var t,r=Object.assign(Object.assign({},e),{value:JSON.parse(e.value)});switch(r.type){case I.CCS3D:t=(0,n.deserialize)(Q,r);break;case I.CURVES:t=(0,n.deserialize)(b,r);break;case I.FACE:t=(0,n.deserialize)(_,r);break;case I.EXTRUSION:t=(0,n.deserialize)(S,r);break;default:t=(0,n.deserialize)(m,r)}return t},t.transformLocalGRPToWorldGRP=function(e,t){e instanceof Q?e.value=function(e,t){var r=e.toCCS();return r.transform(t),new i.CCS3dData(r)}(e.value,t):e instanceof b?e.value=w(e.value,t):e instanceof _?e.value=function(e,t){var r,n=e.surface.toSurface();n.transform(t),r=n instanceof i.Plane?new i.PlaneData(n):n instanceof i.CylindricalSurface?new i.CylindricalSurfaceData(n):n instanceof i.SurfaceOfLinearExtrusion?new i.SurfaceOfLinearExtrusionData(n):new i.SurfaceData(n);return e.surface=r,e.outLoop=w(e.outLoop,t),e.innerLoops=e.innerLoops.map((function(e){return w(e,t)})),e}(e.value,t):e instanceof S&&(e.value=function(e,t){var r=e.matrix.toMatrix();return r.premultiply(t),e.matrix=new i.Matrix4Data(r),e}(e.value,t));return e},t.GeoReferenceExtrusionData=t.GeoReferenceFaceData=t.GeoReferenceCurveData=t.GeoReferencePointData=t.BaseGeoReferenceData=t.GRPExtrusionData=t.GRPSurfaceData=t.GRPCurveData=t.GeoReferenceType=void 0;var n=r(17),i=r(3);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var g,f,h,p,d,I,y=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":l(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},C=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":l(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};t.GeoReferenceType=I,function(e){e.CCS3D="CCS3D",e.CURVES="CURVES",e.FACE="FACE",e.EXTRUSION="EXTRUSION"}(I||(t.GeoReferenceType=I={}));var E=function e(){c(this,e)};t.GRPCurveData=E,y([(0,n.JsonProperty)({class:i.BoundedCurve3dData,converter:i.DataConverter.BoundedCurve3dDatasConverter}),C("design:type",Array)],E.prototype,"curves",void 0);var B=function e(){c(this,e)};t.GRPSurfaceData=B,y([(0,n.JsonProperty)({converter:i.DataConverter.SurfaceDataConverter}),C("design:type","function"==typeof(g=void 0!==i.SurfaceData&&i.SurfaceData)?g:Object)],B.prototype,"surface",void 0),y([(0,n.JsonProperty)(),C("design:type",E)],B.prototype,"outLoop",void 0),y([(0,n.JsonProperty)({class:E,default:[]}),C("design:type",Array)],B.prototype,"innerLoops",void 0);var v=function e(){c(this,e)};t.GRPExtrusionData=v,y([(0,n.JsonProperty)(),C("design:type","function"==typeof(f=void 0!==i.Matrix4Data&&i.Matrix4Data)?f:Object)],v.prototype,"matrix",void 0),y([(0,n.JsonProperty)(),C("design:type",Number)],v.prototype,"distance",void 0),y([(0,n.JsonProperty)(),C("design:type","function"==typeof(h=void 0!==i.GeomFace2dData&&i.GeomFace2dData)?h:Object)],v.prototype,"face",void 0);var m=function e(){c(this,e)};t.BaseGeoReferenceData=m,y([(0,n.JsonProperty)({default:""}),C("design:type",String)],m.prototype,"id",void 0),y([(0,n.JsonProperty)({default:""}),C("design:type",String)],m.prototype,"name",void 0),y([(0,n.JsonProperty)(),C("design:type",String)],m.prototype,"type",void 0),y([(0,n.JsonProperty)(),C("design:type",String)],m.prototype,"businessType",void 0),y([(0,n.JsonProperty)({default:new Map}),C("design:type","function"==typeof(p="undefined"!=typeof Map&&Map)?p:Object)],m.prototype,"data",void 0);var Q=function(e){o(r,e);var t=a(r);function r(){return c(this,r),t.apply(this,arguments)}return r}(m);t.GeoReferencePointData=Q,y([(0,n.JsonProperty)(),C("design:type","function"==typeof(d=void 0!==i.CCS3dData&&i.CCS3dData)?d:Object)],Q.prototype,"value",void 0);var b=function(e){o(r,e);var t=a(r);function r(){return c(this,r),t.apply(this,arguments)}return r}(m);t.GeoReferenceCurveData=b,y([(0,n.JsonProperty)({class:E}),C("design:type",E)],b.prototype,"value",void 0);var _=function(e){o(r,e);var t=a(r);function r(){return c(this,r),t.apply(this,arguments)}return r}(m);t.GeoReferenceFaceData=_,y([(0,n.JsonProperty)(),C("design:type",B)],_.prototype,"value",void 0);var S=function(e){o(r,e);var t=a(r);function r(){return c(this,r),t.apply(this,arguments)}return r}(m);function w(e,t){return e.curves=e.curves.map((function(e){var r=e.toCurve();return r.transform(t),r instanceof i.Arc3d?new i.Arc3dData(r):r instanceof i.LineSeg3d?new i.LineSeg3dData(r):new i.BoundedCurve3dData(r)})),e}t.GeoReferenceExtrusionData=S,y([(0,n.JsonProperty)(),C("design:type",v)],S.prototype,"value",void 0)},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCoreParamModel=function(e){return e instanceof n.default},t.isCoreParamModelAssembly=function(e){return e instanceof i.default};var n=o(r(107)),i=o(r(420));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";e.exports=function(){}},function(e,t,r){"use strict";var n=r(1966),i=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*o(i(e)):e}},function(e,t,r){"use strict";e.exports=r(1967)()?Math.sign:r(1968)},function(e,t,r){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&-1===e(-20))}},function(e,t,r){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,r){"use strict";var n=r(234),i=r(519),o=r(279),A=r(1971),a=r(1091);e.exports=function e(t){var r,s,u;if(n(t),(r=Object(arguments[1])).async&&r.promise)throw new Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!r.force?t:(s=a(r.length,t.length,r.async&&o.async),u=A(t,s,r),i(o,(function(e,t){r[t]&&e(r[t],u,r)})),e.__profiler__&&e.__profiler__(u),u.updateEnv(),u.memoized)}},function(e,t,r){"use strict";var n=r(234),i=r(348),o=Function.prototype.bind,A=Function.prototype.call,a=Object.keys,s=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(r,u){var c,l=arguments[2],g=arguments[3];return r=Object(i(r)),n(u),c=a(r),g&&c.sort("function"==typeof g?o.call(g,r):void 0),"function"!=typeof e&&(e=c[e]),A.call(e,c,(function(e,n){return s.call(r,e)?A.call(u,l,r[e],e,r,n):t}))}}},function(e,t,r){"use strict";var n=r(1972),i=r(1093),o=r(280),A=r(1986).methods,a=r(1987),s=r(2003),u=Function.prototype.apply,c=Function.prototype.call,l=Object.create,g=Object.defineProperties,f=A.on,h=A.emit;e.exports=function(e,t,r){var A,p,d,I,y,C,E,B,v,m,Q,b,_,S,w,D=l(null);return p=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(m=s(r.normalizer),d=m.get,I=m.set,y=m.delete,C=m.clear),null!=r.resolvers&&(w=a(r.resolvers)),S=d?i((function(t){var r,i,o=arguments;if(w&&(o=w(o)),null!==(r=d(o))&&hasOwnProperty.call(D,r))return Q&&A.emit("get",r,o,this),D[r];if(i=1===o.length?c.call(e,this,o[0]):u.call(e,this,o),null===r){if(null!==(r=d(o)))throw n("Circular invocation","CIRCULAR_INVOCATION");r=I(o)}else if(hasOwnProperty.call(D,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return D[r]=i,b&&A.emit("set",r,null,i),i}),p):0===t?function(){var t;if(hasOwnProperty.call(D,"data"))return Q&&A.emit("get","data",arguments,this),D.data;if(t=arguments.length?u.call(e,this,arguments):c.call(e,this),hasOwnProperty.call(D,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return D.data=t,b&&A.emit("set","data",null,t),t}:function(t){var r,i,o=arguments;if(w&&(o=w(arguments)),i=String(o[0]),hasOwnProperty.call(D,i))return Q&&A.emit("get",i,o,this),D[i];if(r=1===o.length?c.call(e,this,o[0]):u.call(e,this,o),hasOwnProperty.call(D,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return D[i]=r,b&&A.emit("set",i,null,r),r},A={original:e,memoized:S,profileName:r.profileName,get:function(e){return w&&(e=w(e)),d?d(e):String(e[0])},has:function(e){return hasOwnProperty.call(D,e)},delete:function(e){var t;hasOwnProperty.call(D,e)&&(y&&y(e),t=D[e],delete D[e],_&&A.emit("delete",e,t))},clear:function(){var e=D;C&&C(),D=l(null),A.emit("clear",e)},on:function(e,t){return"get"===e?Q=!0:"set"===e?b=!0:"delete"===e&&(_=!0),f.call(this,e,t)},emit:h,updateEnv:function(){e=A.original}},E=d?i((function(e){var t,r=arguments;w&&(r=w(r)),null!==(t=d(r))&&A.delete(t)}),p):0===t?function(){return A.delete("data")}:function(e){return w&&(e=w(arguments)[0]),A.delete(e)},B=i((function(){var e,r=arguments;return 0===t?D.data:(w&&(r=w(r)),e=d?d(r):String(r[0]),D[e])})),v=i((function(){var e,r=arguments;return 0===t?A.has("data"):(w&&(r=w(r)),null!==(e=d?d(r):String(r[0]))&&A.has(e))})),g(S,{__memoized__:o(!0),delete:o(E),clear:o(A.clear),_get:o(B),_has:o(v)}),A}},function(e,t,r){"use strict";var n=r(1092),i=r(1978),o=r(277),A=Error.captureStackTrace;e.exports=function(t){var r=new Error(t),a=arguments[1],s=arguments[2];return o(s)||i(a)&&(s=a,a=null),o(s)&&n(r,s),o(a)&&(r.code=a),A&&A(r,e.exports),r}},function(e,t,r){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,r){"use strict";var n=r(1975),i=r(348),o=Math.max;e.exports=function(e,t){var r,A,a,s=o(arguments.length,2);for(e=Object(i(e)),a=function(n){try{e[n]=t[n]}catch(e){r||(r=e)}},A=1;A<s;++A)n(t=arguments[A]).forEach(a);if(void 0!==r)throw r;return e}},function(e,t,r){"use strict";e.exports=r(1976)()?Object.keys:r(1977)},function(e,t,r){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,r){"use strict";var n=r(277),i=Object.keys;e.exports=function(e){return i(n(e)?Object(e):e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(277),o={function:!0,object:!0};e.exports=function(e){return i(e)&&o[n(e)]||!1}},function(e,t,r){"use strict";var n=r(1980),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!n(e)&&!i.test(o.call(e))}},function(e,t,r){"use strict";var n=r(1981);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!n(e)}},function(e,t,r){"use strict";var n=r(1982);e.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(1095),o={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!i(e)&&hasOwnProperty.call(o,n(e))}},function(e,t,r){"use strict";e.exports=r(1984)()?String.prototype.contains:r(1985)},function(e,t,r){"use strict";var n="razdwatrzy";e.exports=function(){return"function"==typeof n.contains&&(!0===n.contains("dwa")&&!1===n.contains("foo"))}},function(e,t,r){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o,A,a,s,u,c,l=r(280),g=r(234),f=Function.prototype.apply,h=Function.prototype.call,p=Object.create,d=Object.defineProperty,I=Object.defineProperties,y=Object.prototype.hasOwnProperty,C={configurable:!0,enumerable:!1,writable:!0};o=function(e,t){var r,n;return g(t),n=this,i.call(this,e,r=function(){A.call(n,e,r),f.call(t,this,arguments)}),r.__eeOnceListener__=t,this},s={on:i=function(e,t){var r;return g(t),y.call(this,"__ee__")?r=this.__ee__:(r=C.value=p(null),d(this,"__ee__",C),C.value=null),r[e]?"object"===n(r[e])?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:o,off:A=function(e,t){var r,i,o,A;if(g(t),!y.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"===n(i=r[e]))for(A=0;o=i[A];++A)o!==t&&o.__eeOnceListener__!==t||(2===i.length?r[e]=i[A?0:1]:i.splice(A,1));else i!==t&&i.__eeOnceListener__!==t||delete r[e];return this},emit:a=function(e){var t,r,i,o,A;if(y.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"===n(o)){for(r=arguments.length,A=new Array(r-1),t=1;t<r;++t)A[t-1]=arguments[t];for(o=o.slice(),t=0;i=o[t];++t)f.call(i,this,A)}else switch(arguments.length){case 1:h.call(o,this);break;case 2:h.call(o,this,arguments[1]);break;case 3:h.call(o,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,A=new Array(r-1),t=1;t<r;++t)A[t-1]=arguments[t];f.call(o,this,A)}}},u={on:l(i),once:l(o),off:l(A),emit:l(a)},c=I({},u),e.exports=t=function(e){return null==e?p(c):I(Object(e),u)},t.methods=s},function(e,t,r){"use strict";var n,i=r(1988),o=r(277),A=r(234),a=Array.prototype.slice;n=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(a.call(e,this.length))},e.exports=function(e){return(e=i(e)).forEach((function(e){o(e)&&A(e)})),n.bind(e)}},function(e,t,r){"use strict";var n=r(705),i=Array.isArray;e.exports=function(e){return i(e)?e:n(e)}},function(e,t,r){"use strict";e.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&(t=r(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,r){"use strict";var n=r(1991).iterator,i=r(2e3),o=r(2001),A=r(278),a=r(234),s=r(348),u=r(277),c=r(2002),l=Array.isArray,g=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},h=Object.defineProperty;e.exports=function(e){var t,r,p,d,I,y,C,E,B,v,m=arguments[1],Q=arguments[2];if(e=Object(s(e)),u(m)&&a(m),this&&this!==Array&&o(this))t=this;else{if(!m){if(i(e))return 1!==(I=e.length)?Array.apply(null,e):((d=new Array(1))[0]=e[0],d);if(l(e)){for(d=new Array(I=e.length),r=0;r<I;++r)d[r]=e[r];return d}}d=[]}if(!l(e))if(void 0!==(B=e[n])){for(C=a(B).call(e),t&&(d=new t),E=C.next(),r=0;!E.done;)v=m?g.call(m,Q,E.value,r):E.value,t?(f.value=v,h(d,r,f)):d[r]=v,E=C.next(),++r;I=r}else if(c(e)){for(I=e.length,t&&(d=new t),r=0,p=0;r<I;++r)v=e[r],r+1<I&&(y=v.charCodeAt(0))>=55296&&y<=56319&&(v+=e[++r]),v=m?g.call(m,Q,v,p):v,t?(f.value=v,h(d,p,f)):d[p]=v,++p;I=p}if(void 0===I)for(I=A(e.length),t&&(d=new t(I)),r=0;r<I;++r)v=m?g.call(m,Q,e[r],r):e[r],t?(f.value=v,h(d,r,f)):d[r]=v;return t&&(f.value=null,d.length=I),d}},function(e,t,r){"use strict";e.exports=r(1992)()?r(520).Symbol:r(1995)},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(520),o={object:!0,symbol:!0};e.exports=function(){var e,t=i.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch(e){return!1}return!!o[n(t.iterator)]&&(!!o[n(t.toPrimitive)]&&!!o[n(t.toStringTag)])}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){return"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))&&(!!globalThis&&globalThis.Array===Array)}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=function(){if("object"===("undefined"==typeof self?"undefined":r(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":r(window))&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o,A,a=r(280),s=r(1096),u=r(520).Symbol,c=r(1997),l=r(1998),g=r(1999),f=Object.create,h=Object.defineProperties,p=Object.defineProperty;if("function"==typeof u)try{String(u()),A=!0}catch(e){}else u=null;o=function(e){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return i(e)},e.exports=i=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return A?u(t):(r=f(o.prototype),t=void 0===t?"":String(t),h(r,{__description__:a("",t),__name__:a("",c(t))}))},l(i),g(i),h(o.prototype,{constructor:a(i),toString:a("",(function(){return this.__name__}))}),h(i.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(i.prototype,i.toPrimitive,a("",(function(){var e=s(this);return"symbol"===n(e)?e:e.toString()}))),p(i.prototype,i.toStringTag,a("c","Symbol")),p(o.prototype,i.toStringTag,a("c",i.prototype[i.toStringTag])),p(o.prototype,i.toPrimitive,a("c",i.prototype[i.toPrimitive]))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return!!e&&("symbol"===n(e)||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}},function(e,t,r){"use strict";var n=r(280),i=Object.create,o=Object.defineProperty,A=Object.prototype,a=i(null);e.exports=function(e){for(var t,r,i=0;a[e+(i||"")];)++i;return a[e+=i||""]=!0,o(A,t="@@"+e,n.gs(null,(function(e){r||(r=!0,o(this,t,n(e)),r=!1)}))),t}},function(e,t,r){"use strict";var n=r(280),i=r(520).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:n("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:n("",i&&i.iterator||e("iterator")),match:n("",i&&i.match||e("match")),replace:n("",i&&i.replace||e("replace")),search:n("",i&&i.search||e("search")),species:n("",i&&i.species||e("species")),split:n("",i&&i.split||e("split")),toPrimitive:n("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:n("",i&&i.toStringTag||e("toStringTag")),unscopables:n("",i&&i.unscopables||e("unscopables"))})}},function(e,t,r){"use strict";var n=r(280),i=r(1096),o=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:n((function(t){return o[t]?o[t]:o[t]=e(String(t))})),keyFor:n((function(e){var t;for(t in i(e),o)if(o[t]===e)return t}))})}},function(e,t,r){"use strict";var n=Object.prototype.toString,i=n.call(function(){return arguments}());e.exports=function(e){return n.call(e)===i}},function(e,t,r){"use strict";var n=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);e.exports=function(e){return"function"==typeof e&&i(n.call(e))}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=Object.prototype.toString,o=i.call("");e.exports=function(e){return"string"==typeof e||e&&"object"===n(e)&&(e instanceof String||i.call(e)===o)||!1}},function(e,t,r){"use strict";var n=r(234);e.exports=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:n(e.get)},void 0!==e.set?(t.set=n(e.set),e.delete&&(t.delete=n(e.delete)),e.clear&&(t.clear=n(e.clear)),t):(t.set=t.get,t))}},function(e,t,r){"use strict";e.exports=function(e){var t,r,n=e.length;if(!n)return"";for(t=String(e[r=0]);--n;)t+=""+e[++r];return t}},function(e,t,r){"use strict";e.exports=function(e){return e?function(t){for(var r=String(t[0]),n=0,i=e;--i;)r+=""+t[++n];return r}:function(){return""}}},function(e,t,r){"use strict";var n=r(706),i=Object.create;e.exports=function(){var e=0,t=[],r=i(null);return{get:function(e){var r,i=0,o=t,A=e.length;if(0===A)return o[A]||null;if(o=o[A]){for(;i<A-1;){if(-1===(r=n.call(o[0],e[i])))return null;o=o[1][r],++i}return-1===(r=n.call(o[0],e[i]))?null:o[1][r]||null}return null},set:function(i){var o,A=0,a=t,s=i.length;if(0===s)a[s]=++e;else{for(a[s]||(a[s]=[[],[]]),a=a[s];A<s-1;)-1===(o=n.call(a[0],i[A]))&&(o=a[0].push(i[A])-1,a[1].push([[],[]])),a=a[1][o],++A;-1===(o=n.call(a[0],i[A]))&&(o=a[0].push(i[A])-1),a[1][o]=++e}return r[e]=i,e},delete:function(e){var i,o=0,A=t,a=r[e],s=a.length,u=[];if(0===s)delete A[s];else if(A=A[s]){for(;o<s-1;){if(-1===(i=n.call(A[0],a[o])))return;u.push(A,i),A=A[1][i],++o}if(-1===(i=n.call(A[0],a[o])))return;for(e=A[1][i],A[0].splice(i,1),A[1].splice(i,1);!A[0].length&&u.length;)i=u.pop(),(A=u.pop())[0].splice(i,1),A[1].splice(i,1)}delete r[e]},clear:function(){t=[],r=i(null)}}}},function(e,t,r){"use strict";e.exports=r(2008)()?Number.isNaN:r(2009)},function(e,t,r){"use strict";e.exports=function(){var e=Number.isNaN;return"function"==typeof e&&(!e({})&&e(NaN)&&!e(34))}},function(e,t,r){"use strict";e.exports=function(e){return e!=e}},function(e,t,r){"use strict";var n=r(706);e.exports=function(){var e=0,t=[],r=[];return{get:function(e){var i=n.call(t,e[0]);return-1===i?null:r[i]},set:function(n){return t.push(n[0]),r.push(++e),e},delete:function(e){var i=n.call(r,e);-1!==i&&(t.splice(i,1),r.splice(i,1))},clear:function(){t=[],r=[]}}}},function(e,t,r){"use strict";var n=r(706),i=Object.create;e.exports=function(e){var t=0,r=[[],[]],o=i(null);return{get:function(t){for(var i,o=0,A=r;o<e-1;){if(-1===(i=n.call(A[0],t[o])))return null;A=A[1][i],++o}return-1===(i=n.call(A[0],t[o]))?null:A[1][i]||null},set:function(i){for(var A,a=0,s=r;a<e-1;)-1===(A=n.call(s[0],i[a]))&&(A=s[0].push(i[a])-1,s[1].push([[],[]])),s=s[1][A],++a;return-1===(A=n.call(s[0],i[a]))&&(A=s[0].push(i[a])-1),s[1][A]=++t,o[t]=i,t},delete:function(t){for(var i,A=0,a=r,s=[],u=o[t];A<e-1;){if(-1===(i=n.call(a[0],u[A])))return;s.push(a,i),a=a[1][i],++A}if(-1!==(i=n.call(a[0],u[A]))){for(t=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&s.length;)i=s.pop(),(a=s.pop())[0].splice(i,1),a[1].splice(i,1);delete o[t]}},clear:function(){r=[[],[]],o=i(null)}}}},function(e,t,r){"use strict";var n=r(705),i=r(1097),o=r(1094),A=r(1093),a=r(707),s=Array.prototype.slice,u=Function.prototype.apply,c=Object.create;r(279).async=function(e,t){var r,l,g,f=c(null),h=c(null),p=t.memoized,d=t.original;t.memoized=A((function(e){var t=arguments,n=t[t.length-1];return"function"==typeof n&&(r=n,t=s.call(t,0,-1)),p.apply(l=this,g=t)}),p);try{o(t.memoized,p)}catch(e){}t.on("get",(function(e){var n,i,o;if(r){if(f[e])return"function"==typeof f[e]?f[e]=[f[e],r]:f[e].push(r),void(r=null);n=r,i=l,o=g,r=l=g=null,a((function(){var A;hasOwnProperty.call(h,e)?(A=h[e],t.emit("getasync",e,o,i),u.call(n,A.context,A.args)):(r=n,l=i,g=o,p.apply(i,o))}))}})),t.original=function(){var e,i,o,A;return r?(e=n(arguments),i=function e(r){var i,o,s=e.id;if(null!=s){if(delete e.id,i=f[s],delete f[s],i)return o=n(arguments),t.has(s)&&(r?t.delete(s):(h[s]={context:this,args:o},t.emit("setasync",s,"function"==typeof i?1:i.length))),"function"==typeof i?A=u.call(i,this,o):i.forEach((function(e){A=u.call(e,this,o)}),this),A}else a(u.bind(e,this,arguments))},o=r,r=l=g=null,e.push(i),A=u.call(d,this,e),i.cb=o,r=i,A):u.call(d,this,arguments)},t.on("set",(function(e){r?(f[e]?"function"==typeof f[e]?f[e]=[f[e],r.cb]:f[e].push(r.cb):f[e]=r.cb,delete r.cb,r.id=e,r=null):t.delete(e)})),t.on("delete",(function(e){var r;hasOwnProperty.call(f,e)||h[e]&&(r=h[e],delete h[e],t.emit("deleteasync",e,s.call(r.args,1)))})),t.on("clear",(function(){var e=h;h=c(null),t.emit("clearasync",i(e,(function(e){return s.call(e.args,1)})))}))}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(771),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(144))},function(e,t,r){"use strict";var n=r(1097),i=r(2015),o=r(2016),A=r(2018),a=r(1099),s=r(707),u=Object.create,c=i("then","then:finally","done","done:finally");r(279).promise=function(e,t){var r=u(null),i=u(null),l=u(null);if(!0===e)e=null;else if(e=o(e),!c[e])throw new TypeError("'"+A(e)+"' is not valid promise mode");t.on("set",(function(n,o,A){var u=!1;if(!a(A))return i[n]=A,void t.emit("setasync",n,1);r[n]=1,l[n]=A;var c=function(e){var o=r[n];if(u)throw new Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");o&&(delete r[n],i[n]=e,t.emit("setasync",n,o))},g=function(){u=!0,r[n]&&(delete r[n],delete l[n],t.delete(n))},f=e;if(f||(f="then"),"then"===f){var h=function(){s(g)};"function"==typeof(A=A.then((function(e){s(c.bind(this,e))}),h)).finally&&A.finally(h)}else if("done"===f){if("function"!=typeof A.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");A.done(c,g)}else if("done:finally"===f){if("function"!=typeof A.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof A.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");A.done(c),A.finally(g)}})),t.on("get",(function(e,n,i){var o;if(r[e])++r[e];else{o=l[e];var A=function(){t.emit("getasync",e,n,i)};a(o)?"function"==typeof o.done?o.done(A):o.then((function(){s(A)})):A()}})),t.on("delete",(function(e){if(delete l[e],r[e])delete r[e];else if(hasOwnProperty.call(i,e)){var n=i[e];delete i[e],t.emit("deleteasync",e,[n])}})),t.on("clear",(function(){var e=i;i=u(null),r=u(null),l=u(null),t.emit("clearasync",n(e,(function(e){return[e]})))}))}},function(e,t,r){"use strict";var n=Array.prototype.forEach,i=Object.create;e.exports=function(e){var t=i(null);return n.call(arguments,(function(e){t[e]=!0})),t}},function(e,t,r){"use strict";var n=r(348),i=r(2017);e.exports=function(e){return i(n(e))}},function(e,t,r){"use strict";var n=r(1098);e.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){throw new TypeError("Passed argument cannot be stringifed")}}},function(e,t,r){"use strict";var n=r(2019),i=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=n(e);return t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,(function(e){return JSON.stringify(e).slice(1,-1)}))}},function(e,t,r){"use strict";var n=r(1098);e.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){return"<Non-coercible to string value>"}}},function(e,t,r){"use strict";var n=r(234),i=r(519),o=r(279),A=Function.prototype.apply;o.dispose=function(e,t,r){var a;if(n(e),r.async&&o.async||r.promise&&o.promise)return t.on("deleteasync",a=function(t,r){A.call(e,null,r)}),void t.on("clearasync",(function(e){i(e,(function(e,t){a(t,e)}))}));t.on("delete",a=function(t,r){e(r)}),t.on("clear",(function(e){i(e,(function(e,t){a(t,e)}))}))}},function(e,t,r){"use strict";var n=r(705),i=r(519),o=r(707),A=r(1099),a=r(2022),s=r(279),u=Function.prototype,c=Math.max,l=Math.min,g=Object.create;s.maxAge=function(e,t,r){var f,h,p,d;(e=a(e))&&(f=g(null),h=r.async&&s.async||r.promise&&s.promise?"async":"",t.on("set"+h,(function(r){f[r]=setTimeout((function(){t.delete(r)}),e),"function"==typeof f[r].unref&&f[r].unref(),d&&(d[r]&&"nextTick"!==d[r]&&clearTimeout(d[r]),d[r]=setTimeout((function(){delete d[r]}),p),"function"==typeof d[r].unref&&d[r].unref())})),t.on("delete"+h,(function(e){clearTimeout(f[e]),delete f[e],d&&("nextTick"!==d[e]&&clearTimeout(d[e]),delete d[e])})),r.preFetch&&(p=!0===r.preFetch||isNaN(r.preFetch)?.333:c(l(Number(r.preFetch),1),0))&&(d={},p=(1-p)*e,t.on("get"+h,(function(e,i,a){d[e]||(d[e]="nextTick",o((function(){var o;"nextTick"===d[e]&&(delete d[e],t.delete(e),r.async&&(i=n(i)).push(u),o=t.memoized.apply(a,i),r.promise&&A(o)&&("function"==typeof o.done?o.done(u,u):o.then(u,u)))})))}))),t.on("clear"+h,(function(){i(f,(function(e){clearTimeout(e)})),f={},d&&(i(d,(function(e){"nextTick"!==e&&clearTimeout(e)})),d={})})))}},function(e,t,r){"use strict";var n=r(278),i=r(2023);e.exports=function(e){if((e=n(e))>i)throw new TypeError(e+" exceeds maximum possible timeout");return e}},function(e,t,r){"use strict";e.exports=2147483647},function(e,t,r){"use strict";var n=r(278),i=r(2025),o=r(279);o.max=function(e,t,r){var A,a,s;(e=n(e))&&(a=i(e),A=r.async&&o.async||r.promise&&o.promise?"async":"",t.on("set"+A,s=function(e){void 0!==(e=a.hit(e))&&t.delete(e)}),t.on("get"+A,s),t.on("delete"+A,a.delete),t.on("clear"+A,a.clear))}},function(e,t,r){"use strict";var n=r(278),i=Object.create,o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r=0,A=1,a=i(null),s=i(null),u=0;return e=n(e),{hit:function(n){var i=s[n],c=++u;if(a[c]=n,s[n]=c,!i){if(++r<=e)return;return n=a[A],t(n),n}if(delete a[i],A===i)for(;!o.call(a,++A););},delete:t=function(e){var t=s[e];if(t&&(delete a[t],delete s[e],--r,A===t)){if(!r)return u=0,void(A=1);for(;!o.call(a,++A););}},clear:function(){r=0,A=1,a=i(null),s=i(null),u=0}}}},function(e,t,r){"use strict";var n=r(280),i=r(279),o=Object.create,A=Object.defineProperties;i.refCounter=function(e,t,r){var a,s;a=o(null),s=r.async&&i.async||r.promise&&i.promise?"async":"",t.on("set"+s,(function(e,t){a[e]=t||1})),t.on("get"+s,(function(e){++a[e]})),t.on("delete"+s,(function(e){delete a[e]})),t.on("clear"+s,(function(){a={}})),A(t.memoized,{deleteRef:n((function(){var e=t.get(arguments);return null===e?null:a[e]?!--a[e]&&(t.delete(e),!0):null})),getRefCount:n((function(){var e=t.get(arguments);return null===e?0:a[e]?a[e]:0}))})}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionContext=t.START_ID=void 0;var i=r(418),o=r(359),A=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var s=o?Object.getOwnPropertyDescriptor(e,A):null;s&&(s.get||s.set)?Object.defineProperty(i,A,s):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(2028));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}t.START_ID="-1";var u=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.maxBackupStep=25,this.getCurrentId=function(){return t.undoStack.length>0?t.undoStack[t.undoStack.length-1].getId():"-1"},this.undoStack=[],this.redoStack=[],this.status=A.TransactionStatus.None,this.cachedRecorder=new A.default,this.createRecorder()}var t,r,n;return t=e,(r=[{key:"setMaxBackupStep",value:function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)}},{key:"createRecorder",value:function(){return this.activeRecorder=new A.default,this.activeRecorder}},{key:"record",value:function(e,t,r){this.status!==A.TransactionStatus.Rollback&&this.activeRecorder.record(e,t,r)}},{key:"getStatus",value:function(){return this.status}},{key:"openRecorder",value:function(){this.clearRedoStack(),this.status=A.TransactionStatus.Open,this.createRecorder()}},{key:"getMergedRecorder",value:function(){var e=new A.default;return this.useCachedRecorder&&this.cachedRecorder.mergeTo(e),this.undoStack.forEach((function(t){return t.mergeTo(e)})),e}},{key:"mergeRecorder",value:function(){!this.activeRecorder.isEmpty()&&this.undoStack.length>0&&this.activeRecorder.mergeTo(this.undoStack[this.undoStack.length-1]),this.createRecorder(),this.console("mergeTransaction")}},{key:"commitRecorder",value:function(e){var t=this;if(this.undoStack.length>=this.maxBackupStep){var r=this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep+1);this.useCachedRecorder&&r.forEach((function(e){return e.mergeTo(t.cachedRecorder)}))}e&&e.mergeTo(this.activeRecorder),this.activeRecorder.isEmpty()||this.undoStack.push(this.activeRecorder),this.openRecorder(),this.console("commitTransaction")}},{key:"isActiveRecorderEmpty",value:function(){return this.activeRecorder.isEmpty()}},{key:"revert",value:function(){this.status=A.TransactionStatus.Rollback,this.activeRecorder.recover(),this.status=A.TransactionStatus.None,this.createRecorder(),this.console("revert")}},{key:"undo",value:function(){if(0===this.undoStack.length)return!1;this.createRecorder(),this.status=A.TransactionStatus.Undo;var e=this.undoStack.pop();return e.recover(),this.status=A.TransactionStatus.None,this.activeRecorder.setId(e.getId()),this.redoStack.push(this.activeRecorder),this.createRecorder(),this.console("undo"),!0}},{key:"redo",value:function(){if(0===this.redoStack.length)return!1;this.createRecorder(),this.status=A.TransactionStatus.Redo;var e=this.redoStack.pop();return e.recover(),this.status=A.TransactionStatus.None,this.activeRecorder.setId(e.getId()),this.undoStack.push(this.activeRecorder),this.createRecorder(),this.console("redo"),!0}},{key:"console",value:function(e){(0,o.devLog)({type:e,undoStack:this.undoStack,redo:this.redoStack})}},{key:"clearRedoStack",value:function(){this.redoStack.length=0}},{key:"clear",value:function(){this.redoStack.length=0,this.undoStack.length=0,this.createRecorder()}},{key:"empty",value:function(){return 0===this.redoStack.length&&0===this.undoStack.length}},{key:"undoToRecorder",value:function(e){var t=0;if("-1"===e)t=this.undoStack.length;else{var r=this.undoStack.findIndex((function(t){return t.getId()===e}));r>-1&&(t=this.undoStack.length-r-1)}if(0===t)return!1;for(var n=0;n<t;n++)if(!this.undo())return i.LOGGER.logError(new Error("Transaction undoToRecorder error")),!1;return!0}},{key:"redoToRecorder",value:function(e){var t=0,r=this.redoStack.findIndex((function(t){return t.getId()===e}));if(r>-1&&(t=this.redoStack.length-r),0===t)return!1;for(var n=0;n<t;n++)if(!this.redo())return i.LOGGER.logError(new Error("Transaction redoToRecorder error ".concat(e))),!1;return!0}}])&&s(t.prototype,r),n&&s(t,n),e}();t.TransactionContext=u},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TransactionStatus=void 0;var i,o=(i=r(529))&&i.__esModule?i:{default:i},A=r(2029);function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=c(e);if(t){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var f,h=function(){function e(){l(this,e),this.records=new Map,this.updater={update:function(e,t,r){e[t]=r}}}var t,r,n;return t=e,(r=[{key:"record",value:function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)}},{key:"recover",value:function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){var i=t.update||e.updater.update;r.applyRecover&&!r.applyRecover()||i(r,n,t.preValue)}))}))}},{key:"isEmpty",value:function(){return 0===this.records.size}},{key:"mergeTo",value:function(e){this.records.forEach((function(t,r){t.forEach((function(t,n){e.record(r,n,t)}))}))}}])&&g(t.prototype,r),n&&g(t,n),e}();t.TransactionStatus=f,function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Undo=2]="Undo",e[e.Redo=3]="Redo",e[e.Rollback=4]="Rollback"}(f||(t.TransactionStatus=f={}));var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(r,e);var t=s(r);function r(){return l(this,r),t.apply(this,arguments)}return r}((0,o.default)(h,(0,A.numericId)()));t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numericId=function(){var e=1;return function(){return(e++).toString()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1101),i=r(1102),o=r(1103),A=r(2031),a=r(1104),s=r(1105),u=r(1106),c=r(1107),l=r(1108);t.BrepDataTranslators={EDGE_DATA:new n.EdgeDataTranslator,EDGE2_DATA:new i.Edge2DataTranslator,FACE_DATA:new o.FaceDataTranslator,HALF_EDGE_DATA:new a.HalfEdgeDataTranslator,LOOP_DATA:new s.LoopDataTranslator,META_DATA:new u.MetaDataTranslator,SHELL_DATA:new c.ShellDataTranslator,VERTEX_DATA:new l.VertexDataTranslator,GENERAL_DATA:new A.GeneralDataTranslator,GENERAL_DATA_LIST:new A.GeneralDataListTranslator}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),u=r(67),c=r(710),l=r(421),g=r(350),f=r(284),h=r(351),p=r(239),d=r(521),I=r(422),y=r(1101),C=r(1102),E=r(1103),B=r(1104),v=r(1105),m=r(1106),Q=r(1107),b=r(1108),_=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBGeneralData;if(e instanceof I.VertexData)t.vertexData=(new b.VertexDataTranslator).to(e);else if(e instanceof f.HalfEdgeData)t.halfEdgeData=(new B.HalfEdgeDataTranslator).to(e);else if(e instanceof l.Edge2Data)t.edge2Data=(new C.Edge2DataTranslator).to(e);else if(e instanceof h.LoopData)t.loopData=(new v.LoopDataTranslator).to(e);else if(e instanceof c.EdgeData)t.edgeData=(new y.EdgeDataTranslator).to(e);else if(e instanceof g.FaceData)t.faceData=(new E.FaceDataTranslator).to(e);else if(e instanceof d.ShellData)t.shellData=(new Q.ShellDataTranslator).to(e);else{if(!(e instanceof p.MetaData))throw"not supported";t.metaData=(new m.MetaDataTranslator).to(e)}return t}},{key:"realFrom",value:function(e){if(e.vertexData)return(new b.VertexDataTranslator).from(e.vertexData);if(e.halfEdgeData)return(new B.HalfEdgeDataTranslator).from(e.halfEdgeData);if(e.edge2Data)return(new C.Edge2DataTranslator).from(e.edge2Data);if(e.loopData)return(new v.LoopDataTranslator).from(e.loopData);if(e.edgeData)return(new y.EdgeDataTranslator).from(e.edgeData);if(e.faceData)return(new E.FaceDataTranslator).from(e.faceData);if(e.shellData)return(new Q.ShellDataTranslator).from(e.shellData);if(e.metaData)return(new m.MetaDataTranslator).from(e.metaData);throw"not supported"}}]),t}(s.Translator);t.GeneralDataTranslator=_;var S=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBGeneralDataList;return t.generalDatas=(new _).toList(e),t}},{key:"realFrom",value:function(e){return(new _).fromList(e.generalDatas)}}]),t}(s.Translator);t.GeneralDataListTranslator=S},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(710),o=r(421),A=r(350),a=r(284),s=r(351),u=r(239),c=r(521),l=r(422),g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"readMetaData",value:function(e){var t=new u.MetaData(void 0,void 0);return Object.assign(t,e),t}},{key:"readShellData",value:function(e){var t=new c.ShellData(void 0);return Object.assign(t,e),t}},{key:"readFaceData",value:function(e){var t=new A.FaceData(void 0);return Object.assign(t,e),t}},{key:"readLoopData",value:function(e){var t=new s.LoopData(void 0);return Object.assign(t,e),t}},{key:"readEdgeData",value:function(e){var t=new i.EdgeData(void 0);return Object.assign(t,e),t}},{key:"readEdge2Data",value:function(e){var t=new o.Edge2Data(void 0);return Object.assign(t,e),t}},{key:"readHalfEdgeData",value:function(e){var t=new a.HalfEdgeData(void 0);return Object.assign(t,e),t}},{key:"readVertexData",value:function(e){var t=new l.VertexData(void 0);return Object.assign(t,e),t}}]),e}();t.Json=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(239);function i(e){var t=e.metaData;return t?t.version:void 0}function o(e){var t=e.metaData;return t?t.toolVersion:void 0}function A(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];t.set(i.refId,i)}return t}t.migrateBrepData=function(e){return function(e){var t=i(e);if(t&&n.MetaData.versionCompare(t,"1.9.0")>=0)return e;for(var r=A(e.hedgeData),a=e.edge2Data,s=0,u=a.length;s<u;s++){var c=a[s],l=c.halfEdgeIds;if(!(l.length<=0)){for(var g=void 0,f=0,h=l.length;f<h&&!(g=r.get(l[f]));f++);if(g){c.vertexAId=g.vertexAId,c.vertexBId=g.vertexBId;for(var p=0,d=l.length;p<d;p++){var I=l[p];if(I!==g.refId){var y=r.get(I);y&&(y.vertexAId!==c.vertexAId?y.reversed=!0:y.reversed=!1)}}}}}for(var C=e.edgeData,E=0,B=C.length;E<B;E++){var v=C[E],m=v.halfEdge1Id,Q=v.halfEdge2Id,b=void 0;if(null!=m&&(b=r.get(m)),b||null==Q||(b=r.get(Q)),b&&(v.vertexAId=b.vertexAId,v.vertexBId=b.vertexBId,b.reversed=!1,null!=Q&&Q!==b.refId)){var _=r.get(Q);_.vertexAId!==v.vertexAId?_.reversed=!0:_.reversed=!1}}var S=o(e);return e.metaData=new n.MetaData("1.9.0",S),e}(function(e){var t=i(e);if(t&&n.MetaData.versionCompare(t,"1.8.9")>=0)return e;for(var r=A(e.faceData),a=A(e.loopData),s=A(e.hedgeData),u=e.originMetaData,c=o(e),l=new n.MetaData("1.8.9",c),g=e.shellData,f=e.vertexData,h=[],p=[],d=[],I=[],y=[],C=0,E=g.length;C<E;C++)for(var B=g[C].faceIds,v=0,m=B.length;v<m;v++){var Q=B[v],b=r.get(Q);b&&h.push(b)}for(var _=0,S=h.length;_<S;_++){var w=h[_],D=w.outerLoopId,R=a.get(D);if(R){p.push(R);var M=w.innerLoopIds;if(M)for(var x=0,P=M.length;x<P;x++){var T=M[x],F=a.get(T);F&&p.push(F)}}}for(var O=0,L=p.length;O<L;O++)for(var k=p[O].halfEdgeIds,N=0,G=k.length;N<G;N++){var U=k[N],j=s.get(U);j&&d.push(j)}for(var V=new Set,Y=0,H=d.length;Y<H;Y++){var K=d[Y];V.add(K.refId)}for(var q=new Map,J=0,W=e.edgeData.length;J<W;J++){var z=e.edgeData[J],X=z.halfEdge1Id;if(V.has(X)){var Z=q.get(X);Z&&Z!==z?z.halfEdge1Id=void 0:q.set(X,z)}else z.halfEdge1Id=void 0;var $=z.halfEdge2Id;if(V.has($)){var ee=q.get($);ee&&ee!==z?z.halfEdge2Id=void 0:q.set($,z)}else z.halfEdge2Id=void 0;(z.halfEdge1Id||z.halfEdge2Id)&&I.push(z)}for(var te=0,re=e.edge2Data.length;te<re;te++){for(var ne=e.edge2Data[te],ie=[],oe=ne.halfEdgeIds,Ae=0,ae=oe.length;Ae<ae;Ae++){var se=oe[Ae];if(V.has(se)){var ue=q.get(se);ue&&ue!==ne||(q.set(se,ne),ie.push(se))}}ie.length>0&&(ne.halfEdgeIds=ie,y.push(ne))}return{originMetaData:u,metaData:l,shellData:g,faceData:h,loopData:p,edgeData:I,edge2Data:y,hedgeData:d,vertexData:f}}(function(e){for(var t=e,r=void 0,n=void 0,i=[],o=[],A=[],a=[],s=[],u=[],c=[],l=0,g=t.length;l<g;l++){var f=t[l];switch(f.tp){case"M":r=f,n=f;break;case"S":i.push(f);break;case"F":o.push(f);break;case"L":A.push(f);break;case"E":a.push(f);break;case"E2":s.push(f);break;case"H":u.push(f);break;case"V":c.push(f)}}return{metaData:r,originMetaData:n,shellData:i,faceData:o,loopData:A,edgeData:a,edge2Data:s,hedgeData:u,vertexData:c}}(e)))},t.getMetaVersion=i,t.getMetaToolVersion=o,t.getOriginMetaVersion=function(e){var t=e.originMetaData;return t?t.version:void 0}},function(e,t,r){"use strict";var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(239),A=r(1109);function a(e){var t=e.getEdges(),r=!0,n=!1,o=void 0;try{for(var A,a=t[Symbol.iterator]();!(r=(A=a.next()).done);r=!0){var s=A.value;if(s.curve instanceof i.Circle3d){var u=s.curve,c=s.vertexA,l=s.vertexB,g=u.getParam(c.point),f=u.getParam(l.point);i.Num.isBigger(g,f)&&s.swapVertices()}}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}}function s(e){!function(e){for(var t=function(e){var t=e.getVertices(),r=new Map,i=[],o=!0,A=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=!1,g=!0,f=!1,h=void 0;try{for(var p,d=r[Symbol.iterator]();!(g=(p=d.next()).done);g=!0){var I=n(p.value,2),y=I[0],C=I[1];if(c.point.isEqual(y.point)){C.push(c),l=!0;break}}}catch(e){f=!0,h=e}finally{try{!g&&d.return&&d.return()}finally{if(f)throw h}}l||r.set(c,[c])}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}var E=!0,B=!1,v=void 0;try{for(var m,Q=r[Symbol.iterator]();!(E=(m=Q.next()).done);E=!0){var b=n(m.value,2);(C=b[1]).length>1&&i.push(C)}}catch(e){B=!0,v=e}finally{try{!E&&Q.return&&Q.return()}finally{if(B)throw v}}return i}(e),r=new Map,i=0,o=t.length;i<o;i++)for(var A=t[i],a=A[0],s=1,u=A.length;s<u;s++)r.set(A[s],a);if(r.size<=0)return;var c=e.getEdges(),l=!0,g=!1,f=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value,I=d.vertexA,y=d.vertexB;r.has(I)&&(d.vertexA=r.get(I)),r.has(y)&&(d.vertexB=r.get(y))}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}}(e);for(var t=function(e){for(var t=[],r=e.faces,n=0,i=r.length;n<i;n++)for(var o=r[n].getLoops(),A=0,a=o.length;A<a;A++)for(var s=o[A].halfEdges,u=0,c=s.length;u<c;u++){var l=s[u];l.vertexA===l.vertexB&&t.push(l)}return t}(e),r=0,i=t.length;r<i;r++){u(t[r])}}function u(e){var t=e.loop;t.removeHalfEdge(e),t.halfEdges.length<=0&&A.quickPurgeLoop(t);var r=e.edge;r.removeHalfEdge(e),r.halfEdges.length<=0&&r.dispose()}t.postMigrateShells=function(e,t){!function(e,t){if(t&&o.MetaData.versionCompare(t,"1.9.0")>=0)return;(function(e){for(var t=0,r=e.length;t<r;t++){a(e[t])}})(e),function(e){for(var t=0,r=e.length;t<r;t++){s(e[t])}}(e)}(e,t),function(e,t){if(t&&o.MetaData.versionCompare(t,"1.10.0")>=0)return;!function(e){for(var t=0,r=e.length;t<r;t++)for(var n=e[t].faces,o=0,A=n.length;o<A;o++){var a=n[o],s=a.surface,u=!0;s&&s instanceof i.CylindricalSurface&&a.outerLoop&&(u=a.outerLoop.isCCW(s)),a.setOuterLoop(a.outerLoop,u)}}(e)}(e,t)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.x=e,i.y=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r(241).MIxBaseGeom);t.MIxVector2d=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(67),i=r(2037),o=r(522),A=r(160),a=r(285),s=r(714),u=r(1117);function c(e){for(var t=[],r=[],n=0,i=e.length;n<i;n++){var o=e[n];if(o instanceof A.Shell){if(o.faces.length<=0)continue;r.push(a.MIxShell.create(o))}t.push(u.topoObjToMIxEntity(o))}return s.BrepValidatorManager.validateShellsTopo(r,!0),t}t.toPBBrep=function(e){var t=e.map((function(e){return e.rawObject()})),r=o.extractIndependentTopoObjs(t);return s.BrepValidatorManager.validateShellsTopo(r.shells.map((function(e){return a.MIxShell.create(e)})),!0),i.ProtoSerializer.toPBBrep(t)},t.toBytes=function(e){var t=this.toPBBrep(e);return n.brep.PBBrep.encode(t).finish()},t.shellsToPBBrep=function(e){return s.BrepValidatorManager.validateShellsTopo(e,!0),i.ProtoSerializer.shellsToPBBrep(e.map((function(e){return e.rawObject()})))},t.shellsToBytes=function(e){var t=this.shellsToPBBrep(e);return n.brep.PBBrep.encode(t).finish()},t.fromPBBrep=function(e){return c(i.ProtoSerializer.fromPBBrep(e))},t.fromBytes=function(e){return c(i.ProtoSerializer.fromBytes(e))},t.shellsFromPBBrep=function(e){var t=i.ProtoSerializer.shellsFromPBBrep(e).map((function(e){return a.MIxShell.create(e)}));return s.BrepValidatorManager.validateShellsTopo(t,!0),t},t.shellsFromBytes=function(e){var t=i.ProtoSerializer.shellsFromBytes(e).map((function(e){return a.MIxShell.create(e)}));return s.BrepValidatorManager.validateShellsTopo(t,!0),t}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=r(67),a=r(239),s=r(2038),u=r(2046),c=r(2047),l=r(160),g=r(2048),f=r(708),h=r(522),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"toPBBrep",value:function(e,t){t=t||new a.MetaData;var r=c.SerializeContext.buildContextByTopoObjs(e);return this._toPBBrepImpl(r,t)}},{key:"toBytes",value:function(e,t){var r=this.toPBBrep(e,t);return A.brep.PBBrep.encode(r).finish()}},{key:"shellsToPBBrep",value:function(e,t){t=t||new a.MetaData;var r=c.SerializeContext.buildContextByShells(e);return this._toPBBrepImpl(r,t)}},{key:"shellsToBytes",value:function(e,t){var r=this.shellsToPBBrep(e);return A.brep.PBBrep.encode(r).finish()}},{key:"fromPBBrep",value:function(e){var t=new u.DeserializeContext,r=this.getMetaData(e),n=g.ProtoMigrate.migratePBBrep(e);t.curves=o.ProtocolTranslators.CURVE3D.fromList(n.curves),t.surfaces=o.ProtocolTranslators.SURFACE.fromList(n.surfaces),t.vertices=s.BrepTranslators.VERTEX.fromList(n.vertices,t),t.edges=s.BrepTranslators.EDGE.fromList(n.edges,t),t.faces=s.BrepTranslators.FACE.fromList(n.faces,t),t.shells=s.BrepTranslators.SHELL.fromList(n.shells,t);var A={shells:t.shells,faces:t.faces,edges:t.edges,vertices:t.vertices,loops:[],halfEdges:[]},a=h.extractIndependentTopoObjs2(A);f.postProcessTopoObjects(a,r?r.version:void 0);var c=[];return c.push.apply(c,i(a.shells)),c.push.apply(c,i(a.faces)),c.push.apply(c,i(a.loops)),c.push.apply(c,i(a.halfEdges)),c.push.apply(c,i(a.edges)),c.push.apply(c,i(a.vertices)),c}},{key:"fromBytes",value:function(e){try{var t=A.brep.PBBrep.decode(e);return this.fromPBBrep(t)}catch(e){return[]}}},{key:"shellsFromPBBrep",value:function(e){for(var t=this.fromPBBrep(e),r=[],n=0,i=t.length;n<i;n++){var o=t[n];o instanceof l.Shell&&r.push(o)}return r}},{key:"shellsFromBytes",value:function(e){try{var t=A.brep.PBBrep.decode(e);return this.shellsFromPBBrep(t)}catch(e){return[]}}},{key:"getMetaData",value:function(e){var t=e.metaData;if(t)return s.BrepTranslators.META.from(t)}},{key:"_toPBBrepImpl",value:function(e,t){var r=new A.brep.PBBrep;return r.metaData=s.BrepTranslators.META.to(t),r.curves=o.ProtocolTranslators.CURVE3D.toList(e.curves),r.surfaces=o.ProtocolTranslators.SURFACE.toList(e.surfaces),r.vertices=s.BrepTranslators.VERTEX.toList(e.vertices,e),r.edges=s.BrepTranslators.EDGE.toList(e.edges,e),r.faces=s.BrepTranslators.FACE.toList(e.faces,e),r.shells=s.BrepTranslators.SHELL.toList(e.shells,e),r}}]),e}();t.ProtoSerializer=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2039),i=r(2040),o=r(2041),A=r(2042),a=r(2045);t.BrepTranslators={META:new n.MetaTranslator,VERTEX:new i.VertexTranslator,EDGE:new o.EdgeTranslator,FACE:new A.FaceTranslator,SHELL:new a.ShellTranslator}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(239),u=r(67),c=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBMeta;return e.version&&e.version.length>0&&(t.version=e.version),t.toolVersion=e.toolVersion,t}},{key:"realFrom",value:function(e){var t=new s.MetaData;return e.version&&e.version.length>0&&(t.version=e.version),e.toolVersion&&e.toolVersion.length>0&&(t.toolVersion=e.toolVersion),t}}]),t}(a.Translator);t.MetaTranslator=c},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(67),s=r(282),u=r(355),c=r(3),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e){var t=new a.brep.PBVertex;return t.base=u.toPBTopoObjBase(e),t.position=c.ProtocolTranslators.POINT3D.to(e.point),t}},{key:"realFrom",value:function(e){var t=new s.Vertex(null);return e.base&&u.fromPBTopoObjBase(e.base,t),e.position&&(t.point=c.ProtocolTranslators.POINT3D.from(e.position)),t}}]),t}(c.TranslatorWithContext);t.VertexTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(235),c=r(355),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBEdge;r.base=c.toPBTopoObjBase(e),r.crvIndex=t.getEdgeCurveIndex(e);var n=e.vertexA;n&&(r.vAIndex=t.getVertexIndex(n));var i=e.vertexB;return i&&(r.vBIndex=t.getVertexIndex(i)),r}},{key:"realFrom",value:function(e,t){var r=new u.Edge(null,null,null);if(e.base&&c.fromPBTopoObjBase(e.base,r),e.vAIndex){var n=t.getVertex(e.vAIndex);n&&(r.vertexA=n)}if(e.vBIndex){var i=t.getVertex(e.vBIndex);i&&(r.vertexB=i)}var o=t.getCurve3d(e.crvIndex||0);return o?r.curve=o:r.vertexA&&r.vertexB&&(r.curve=a.Line3d.fromSegment(r.vertexA.point,r.vertexB.point)),r}}]),t}(a.TranslatorWithContext);t.EdgeTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(237),c=r(2043),l=r(355),g=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,r){var n=new s.brep.PBFace;n.base=l.toPBTopoObjBase(e),n.srfIndex=r.getFaceSurfaceIndex(e),n.sameDir=e.sameDir,e.outerLoop&&(n.outerLoop=t._loopTranslator.to(e.outerLoop,r));var i=e.innerLoops;return i&&i.length>0&&(n.innerLoops=t._loopTranslator.toList(i,r)),n}},{key:"realFrom",value:function(e,r){var n=new u.Face(null);if(e.base&&l.fromPBTopoObjBase(e.base,n),e.srfIndex){var i=r.getSurface(e.srfIndex);i&&(n.surface=i)}var o=e.sameDir||!1;if(e.outerLoop){var A=t._loopTranslator.from(e.outerLoop,r);n.setOuterLoop(A,o)}if(e.innerLoops)for(var a=t._loopTranslator.fromList(e.innerLoops,r),s=0,c=a.length;s<c;s++)n.addInnerLoop(a[s]);return n}}]),t}(a.TranslatorWithContext);g._loopTranslator=new c.LoopTranslator,t.FaceTranslator=g},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(283),c=r(2044),l=r(355),g=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,r){var n=new s.brep.PBLoop;return n.base=l.toPBTopoObjBase(e),n.halfEdges=t._heTranslator.toList(e.halfEdges,r),n}},{key:"realFrom",value:function(e,r){var n=new u.Loop;if(e.base&&l.fromPBTopoObjBase(e.base,n),e.halfEdges){var i=t._heTranslator.fromList(e.halfEdges,r);n.buildLoop(i)}return n}}]),t}(a.TranslatorWithContext);g._heTranslator=new c.HalfEdgeTranslator,t.LoopTranslator=g},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(238),c=r(355),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBHalfEdge;r.base=c.toPBTopoObjBase(e);var n=e.edge;return n&&(r.edgeIndex=t.getEdgeIndex(n)),r.reversed=e.reversed,r}},{key:"realFrom",value:function(e,t){var r=new u.HalfEdge(null);if(e.base&&c.fromPBTopoObjBase(e.base,r),e.edgeIndex){var n=t.getEdge(e.edgeIndex);n&&n.addHalfEdge(r)}return e.reversed&&(r.reversed=e.reversed),r}}]),t}(a.TranslatorWithContext);t.HalfEdgeTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(160),c=r(355),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBShell;r.base=c.toPBTopoObjBase(e);for(var n=e.faces,i=new Array(n.length),o=0,A=n.length;o<A;o++)i[o]=t.getFaceIndex(n[o]);return r.faceIndices=i,r}},{key:"realFrom",value:function(e,t){var r=new u.Shell;e.base&&c.fromPBTopoObjBase(e.base,r);var n=e.faceIndices;if(n)for(var i=0,o=n.length;i<o;i++){var A=t.getFace(n[i]);A&&r.addFace(A)}return r}}]),t}(a.TranslatorWithContext);t.ShellTranslator=l},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._curves=[],this._surfaces=[],this._vertices=[],this._edges=[],this._faces=[],this._shells=[]}return n(e,[{key:"getCurve3d",value:function(e){if(!(e<=0))return this._curves.length>=e?this._curves[e-1]:void 0}},{key:"getSurface",value:function(e){if(!(e<=0))return this._surfaces.length>=e?this._surfaces[e-1]:void 0}},{key:"getVertex",value:function(e){if(!(e<=0))return this._vertices.length>=e?this._vertices[e-1]:void 0}},{key:"getEdge",value:function(e){if(!(e<=0))return this._edges.length>=e?this._edges[e-1]:void 0}},{key:"getFace",value:function(e){if(!(e<=0))return this._faces.length>=e?this._faces[e-1]:void 0}},{key:"getShell",value:function(e){if(!(e<=0))return this._shells.length>=e?this._shells[e-1]:void 0}},{key:"curves",get:function(){return this._curves},set:function(e){this._curves=e}},{key:"surfaces",get:function(){return this._surfaces},set:function(e){this._surfaces=e}},{key:"vertices",get:function(){return this._vertices},set:function(e){this._vertices=e}},{key:"edges",get:function(){return this._edges},set:function(e){this._edges=e}},{key:"faces",get:function(){return this._faces},set:function(e){this._faces=e}},{key:"shells",get:function(){return this._shells},set:function(e){this._shells=e}}]),e}();t.DeserializeContext=i},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(282),A=r(235),a=r(237),s=r(160),u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._curves=[],this._surfaces=[],this._vertices=[],this._edges=[],this._faces=[],this._shells=[]}return n(e,[{key:"getEdgeCurveIndex",value:function(t){return e.getCurveIndex(t)}},{key:"getFaceSurfaceIndex",value:function(t){return e.getSurfaceIndex(t)}},{key:"getVertexIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getEdgeIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getFaceIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getShellIndex",value:function(t){return e.getSelfIndex(t)}},{key:"addVertex",value:function(t){var r=e.getOrCreateTempMap(t);r[e.SELF_IDX]||(this._vertices.push(t),r[e.SELF_IDX]=this._vertices.length)}},{key:"addEdgeAndCurve",value:function(t){var r=e.getOrCreateTempMap(t);if(!r[e.SELF_IDX]){this._edges.push(t),r[e.SELF_IDX]=this._edges.length;var n=t.curve;!n||n instanceof i.Line3d||(this._curves.push(n),r[e.CRV_IDX]=this._curves.length)}}},{key:"addFaceAndSurface",value:function(t){var r=e.getOrCreateTempMap(t);if(!r[e.SELF_IDX]){this._faces.push(t),r[e.SELF_IDX]=this._faces.length;var n=t.surface;n&&(this._surfaces.push(n),r[e.SURF_IDX]=this._surfaces.length)}}},{key:"addShell",value:function(t){var r=e.getOrCreateTempMap(t);r[e.SURF_IDX]||(this._shells.push(t),r[e.SURF_IDX]=this._shells.length)}},{key:"curves",get:function(){return this._curves}},{key:"surfaces",get:function(){return this._surfaces}},{key:"vertices",get:function(){return this._vertices}},{key:"edges",get:function(){return this._edges}},{key:"faces",get:function(){return this._faces}},{key:"shells",get:function(){return this._shells}}],[{key:"buildContextByShells",value:function(t){for(var r=new e,n=0,i=t.length;n<i;n++){var o=t[n];this.clearTempMap(o);var A=o.faces;this.clearTempMaps(A);var a=o.getEdgesAndVertices(),s=a.edges;this.clearTempMaps(s);var u=a.vertices;this.clearTempMaps(u),r.addShell(o);for(var c=0,l=A.length;c<l;c++)r.addFaceAndSurface(A[c]);for(var g=0,f=s.length;g<f;g++)r.addEdgeAndCurve(s[g]);for(var h=0,p=u.length;h<p;h++)r.addVertex(u[h])}return r}},{key:"buildContextByTopoObjs",value:function(t){for(var r=[],n=[],i=[],u=[],c=0,l=t.length;c<l;c++){var g=t[c];if(g instanceof a.Face){n.push(g);var f=g.getEdges(),h=!0,p=!1,d=void 0;try{for(var I,y=f[Symbol.iterator]();!(h=(I=y.next()).done);h=!0){var C=I.value;i.push(C)}}catch(e){p=!0,d=e}finally{try{!h&&y.return&&y.return()}finally{if(p)throw d}}var E=g.getVertices(),B=!0,v=!1,m=void 0;try{for(var Q,b=E[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value;u.push(_)}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}}else if(g instanceof A.Edge)i.push(g),g.vertexA&&u.push(g.vertexA),g.vertexB&&u.push(g.vertexB);else if(g instanceof o.Vertex)u.push(g);else if(g instanceof s.Shell){r.push(g);for(var S=g.faces,w=0,D=S.length;w<D;w++)n.push(S[w]);for(var R=g.getEdgesAndVertices(),M=R.edges,x=R.vertices,P=0,T=M.length;P<T;P++)i.push(M[P]);for(var F=0,O=x.length;F<O;F++)u.push(x[F])}}this.clearTempMaps(r),this.clearTempMaps(n),this.clearTempMaps(i),this.clearTempMaps(u);for(var L=new e,k=0,N=r.length;k<N;k++)L.addShell(r[k]);for(var G=0,U=n.length;G<U;G++)L.addFaceAndSurface(n[G]);for(var j=0,V=i.length;j<V;j++)L.addEdgeAndCurve(i[j]);for(var Y=0,H=u.length;Y<H;Y++)L.addVertex(u[Y]);return L}},{key:"getOrCreateTempMap",value:function(e){var t=e.temp;return t||(t=new Object,e.temp=t),t}},{key:"clearTempMaps",value:function(e){for(var t=0,r=e.length;t<r;t++)this.clearTempMap(e[t])}},{key:"clearTempMap",value:function(e){var t=e.temp;t&&(delete t[this.SELF_IDX],delete t[this.CRV_IDX],delete t[this.SURF_IDX])}},{key:"getSelfIndex",value:function(e){var t=e.temp;return t&&t[this.SELF_IDX]||0}},{key:"getCurveIndex",value:function(e){var t=e.temp;return t&&t[this.CRV_IDX]||0}},{key:"getSurfaceIndex",value:function(e){var t=e.temp;return t&&t[this.SURF_IDX]||0}}]),e}();u.SELF_IDX="$PB_SELF_IDX",u.CRV_IDX="$PB_CRV_IDX",u.SURF_IDX="$PB_SURF_IDX",t.SerializeContext=u},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"migratePBBrep",value:function(e){return e}}]),e}();t.ProtoMigrate=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function A(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),u=r(350),c=r(284),l=r(351),g=r(709),f=r(238),h=r(283),p=r(423),d=r(1109),I=function(){function e(){a(this,e),this.errors=[]}return i(e,[{key:"hasError",value:function(){return this.errors.length>0}},{key:"errorMessage",value:function(){for(var e="",t=0,r=this.errors.length;t<r;t++){var n=this.errors[t];e+="Error:{desc:"+n.message()+"; context:"+n.context()+"}\n"}return e}},{key:"tryToFix",value:function(){for(var e=0,t=this.errors.length;e<t;e++){var r=this.errors[e];r.isAmendable?r.amend():r.operation()}}},{key:"validateShell",value:function(e){for(var t=e.faces,r=0,n=t.length;r<n;r++){var i=t[r];i.shell!==e&&this.addError(new C(i,e)),this.validateFace(i)}var o=e.getVertices(),A=!0,a=!1,s=void 0;try{for(var u,c=o[Symbol.iterator]();!(A=(u=c.next()).done);A=!0)for(var l=u.value.getLeadOutHalfEdges(),g=0,f=l.length;g<f;g++){var h=l[g];h.isAdopted()||this.addError(new M(h))}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}}},{key:"validateFace",value:function(e){e!==e.outerLoop.face&&this.addError(new v(e.outerLoop,e)),this.validateLoop(e.outerLoop);for(var t=e.innerLoops,r=0,n=t.length;r<n;r++){var i=t[r];e!==i.face&&this.addError(new v(i,e))}this.validateInnerLoops(t,e)}},{key:"validateLoop",value:function(e){var t=e.halfEdges,r=t.length;if(0!==r)for(var n=0;n<r;n++){var i=(n+1)%r,o=t[n],A=t[i];if(o.loop!==e&&this.addError(new m(e,o)),!s.Num.isEqual(o.getBoundedCurve().length,0)||o.edge&&o.edge.degenerated||this.addError(new x(o)),o.vertexB!==A.vertexA&&this.addError(new E(e,o,A)),o.next!==A&&this.addError(new Q(o,A)),A.prev!==o&&this.addError(new b(A,o)),o.edge&&-1!==o.edge.halfEdges.indexOf(o))for(var a=o.siblings(),u=0,c=a.length;u<c;u++){var l=a[u];null!==l&&(o.edge!==l.edge&&this.addError(new D(o,l)),l.vertexB!==o.vertexA&&l.vertexB!==o.vertexB&&this.addError(new S(o,l)),l.vertexA!==o.vertexA&&l.vertexA!==o.vertexB&&this.addError(new _(o,l)))}else this.addError(new w(o))}else this.addError(new B(e))}},{key:"validateInnerLoops",value:function(e,t){for(var r=0,n=e.length;r<n;r++){var i=e[r];this.validateLoop(i)}if(t.surface instanceof s.Plane)for(var o=t.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))})),a=t.surface.faceToUV({contour:o,holes:A}),u=new s.GeomLoop2d(a.contour),c=0;c<a.holes.length;c++){var l=new s.GeomLoop2d(a.holes[c]);u.containsLoop(l,!0)||this.addError(new R(e[c],t))}}},{key:"addError",value:function(e){this.errors.push(e)}}],[{key:"validateToConsole",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new e;if(n.validateShell(t),0===n.errors.length)return p.consoleLogInDev("BREP is Valid."),!0;for(var i=n.errors,o=0,A=i.length;o<A;o++){var a=i[o];p.consoleLogInDev(a.message())}return r&&n.tryToFix(),!1}}]),e}();t.BREPValidator=I;var y=function(){function e(){a(this,e),this.isAmendable=!1}return i(e,[{key:"message",value:function(){throw"not implemented"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){throw"not implemented"}},{key:"context",value:function(){throw"not implemented"}}]),e}(),C=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.face=e,n.shell=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"face refers to a shell it doesn't belong to"}},{key:"amend",value:function(){this.face.shell=this.shell}},{key:"operation",value:function(){d.quickPurgeFace(this.face)}},{key:"context",value:function(){try{var e=new Map;u.FaceData.extractTopo(e,this.face);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),E=function(e){function t(e,r,n){a(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.isAmendable=!1,i.loop=e,i.halfEdge1=r,i.halfEdge2=n,i}return A(t,e),i(t,[{key:"message",value:function(){return"starting point of the following half edge should identically the same as ending of a half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),B=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.loop=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"loop has no half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),v=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.loop=e,n.face=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"loop refers to different face it belongs to"}},{key:"amend",value:function(){var e=this.face.outerLoop===this.loop,t=this.loop.face,r=!!t&&t.outerLoop===this.loop,n=!!t&&t.innerLoops.indexOf(this.loop)>=0;if(r||n){var i=this.loop.halfEdges.map((function(e){return new f.HalfEdge(e.edge,e.reversed)})),o=new h.Loop(i);e?this.face.setOuterLoop(o):(this.face.removeInnerLoop(this.loop),this.face.addInnerLoop(o));for(var A=0,a=i.length;A<a;A++)g.IdAssigner.assignToHalfEdge(i[A]);this.loop.face=t}else this.loop.face=this.face}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;u.FaceData.extractTopo(e,this.face),this.loop.face?u.FaceData.extractTopo(e,this.loop.face):l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),m=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.loop=e,n.halfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge refers to different loop it belongs to"}},{key:"amend",value:function(){this.halfEdge.loop=this.loop}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop),c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),Q=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.nextHalfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge's next pointer doesn't refer to real next half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.halfEdge.loop)}},{key:"context",value:function(){try{var e=new Map;this.halfEdge.loop?l.LoopData.extractTopo(e,this.halfEdge.loop):(c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.nextHalfEdge));var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),b=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.prevHalfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge's prev pointer doesn't refer to prior half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.halfEdge.loop)}},{key:"context",value:function(){try{var e=new Map;this.halfEdge.loop?l.LoopData.extractTopo(e,this.halfEdge.loop):(c.HalfEdgeData.extractTopo(e,this.prevHalfEdge),c.HalfEdgeData.extractTopo(e,this.halfEdge));var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),_=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"a sibling has incorrect start vertex"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),S=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"a sibling has incorrect end vertex"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),w=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge doesn't correctly refer to an edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),D=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"edge of sibling doesn't match to the half edge's edge"}},{key:"amend",value:function(){this.sibling.edge=this.halfEdge.edge}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),R=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.innerLoop=e,n.face=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"inner loop is outside of face's outer loop"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.innerLoop)}},{key:"context",value:function(){try{var e=new Map;this.innerLoop.face&&u.FaceData.extractTopo(e,this.innerLoop.face),l.LoopData.extractTopo(e,this.innerLoop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),M=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge doesn't refer to any loop"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),x=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge with zero length"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y)},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"changeErrorHandler",value:function(t){e.errorHandler=t}},{key:"changeModelDataHandler",value:function(t){e.dataHandler=t}},{key:"onErrorOccurred",value:function(t,r){if(e.errorHandler){var n="geom-modeling-kernel:";r&&r.trim().length>0&&(n=n+"("+r.trim()+")"),e.errorHandler(t,n)}}},{key:"uploadErrorModelData",value:function(t,r){e.dataHandler&&e.dataHandler(t,r)}}]),e}();t.ErrorManager=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2052),i=r(354),o=r(285),A=r(1116);t.polygonizeShell=function(e,t,r){var a=n.Polygonize.polygonizeShell(e.rawObject(),t,r),s=o.MIxShell.create(a.shell),u=new Map;a.faceMap.forEach((function(e,t){var r=i.MIxFace.create(t),n=[];e.forEach((function(e){n.push(i.MIxFace.create(e))})),u.set(r,n)}));var c=new Map;return a.edgeMap.forEach((function(e,t){var r=A.MIxEdge.create(t),n=[];e.forEach((function(e){n.push(A.MIxEdge.create(e))})),c.set(r,n)})),{shell:s,faceMap:u,edgeMap:c}},t.polygonizeFace=function(e,t,r){var o=n.Polygonize.polygonizeFace(e.rawObject(),t,r),a=[];o.faces.forEach((function(e){a.push(i.MIxFace.create(e))}));var s=new Map;return o.edgeMap.forEach((function(e,t){var r=A.MIxEdge.create(t),n=[];e.forEach((function(e){n.push(A.MIxEdge.create(e))})),s.set(r,n)})),{faces:a,edgeMap:s}}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(235),A=r(237),a=r(238),s=r(283),u=r(160),c=r(282),l=r(709),g=r(715),f=r(2053),h=r(2055),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"polygonizeShell",value:function(t,r,n){var o=r||e.defaultNormTol,A=n||i.Tolerance.Tolerance.global,a=[],s=[],c=!0,g=!1,f=void 0;try{for(var h,p=t.faces[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var d=h.value;a.push(d);var I=e.polygonMeshOnFace(d,!1,o,A);if(I.isEmpty())return{shell:new u.Shell,faceMap:new Map,edgeMap:new Map};s.push(I)}}catch(e){g=!0,f=e}finally{try{!c&&p.return&&p.return()}finally{if(g)throw f}}var y=e.getResultMapByShell(t,s);e.mergeCoplanarFaceOnFaceList(y,A),e.mergeCollinearEdgeOnFace(y,A);var C=e.getEdgesFromShell(t),E=e.reversedMapInfo({faces:a,edges:C},y),B=new u.Shell;return E.faceList.forEach((function(e){B.addFace(e)})),l.IdAssigner.assignToShell(B),{shell:B,faceMap:E.faceMap,edgeMap:E.edgeMap}}},{key:"polygonizeFace",value:function(t,r,n){var o=r||e.defaultNormTol,A=n||i.Tolerance.Tolerance.global,a=e.polygonMeshOnFace(t,!0,o,A);if(a.isEmpty())return{faces:[],edgeMap:new Map};var s=e.getResultMapByFace(t,a);e.mergeCoplanarFaceOnFaceList(s,A),e.mergeCollinearEdgeOnFace(s,A);var u=e.getEdgesFromFace(t),c=e.reversedMapInfo({faces:[t],edges:u},s);return{faces:c.faceList,edgeMap:c.edgeMap}}},{key:"polygonMeshOnFace",value:function(t,r,n,o){o=o||i.Tolerance.Tolerance.global;var A=n;i.Num.isInRange(n,0,1,!0,!0,o.numTol)||(A=e.defaultNormTol);var a=t.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),s=t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));if(null===t.surface)return new g.PolygonMesh;var u=[];return u.push(t.outerLoop.halfEdges.map((function(e){return e.edge.degenerated}))),u.push.apply(u,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.edge.degenerated}))})))),r?f.PolygonMeshOnSurface.polygonMeshOnSingleSurface3d(a,s,u,t.surface,t.sameDir,A,o):f.PolygonMeshOnSurface.polygonMeshOnSurface3d(a,s,u,t.surface,t.sameDir,A,o)}},{key:"getResultMapByFace",value:function(t,r){if(t.surface instanceof i.Plane)return e.makeFaceByPolygonMeshWithPlane(r);var n=new u.Shell;return n.addFace(t),this.getResultMapByShell(n,[r])}},{key:"getResultMapByShell",value:function(t,r){var n=e.buildVertexIndex(t),i=new Array,o=[],A=e.buildEdgeIndex(t,i,o),a=h.PolygonMeshUtil.mergePolygonMesh(r,i,n,A,o);return a.pgm.isEmpty()?{faceIndexMap:new Map,edgeIndexMap:new Map}:e.makeFacesByPolygonMesh(a)}},{key:"buildVertexIndex",value:function(e){var t=[],r=e.getVertices(),n=0,i=new Map,o=!0,A=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value;i.set(c,n++)}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}return e.faces.forEach((function(e){var r=e.getHalfEdges(),n=[];r.forEach((function(e){n.push(i.get(e.vertexA))})),t.push(n)})),t}},{key:"buildEdgeIndex",value:function(e,t,r){for(var n=Array.from(e.getEdges()),i=new Map,o=0,A=n.length;o<A;++o)i.set(n[o],o),t.push(n[o].getBoundedCurve());var a=e.faces,s=[];return a.forEach((function(e){var t=e.getHalfEdges(),n=[],o=[];t.forEach((function(e){var t=i.get(e.edge);n.push({index:t,isReversed:e.reversed}),o.push(e.reversed)})),s.push(n),r.push(o)})),s}},{key:"makeFaceByPolygonMeshWithPlane",value:function(t){if(!t.onPlane)return{faceIndexMap:new Map,edgeIndexMap:new Map};if(0===t.coords.length||1!==t.mSurfaces.length||1!==t.isSameDir.length||t.boundedIndices.length<1||t.boundedIndices.length!==t.boundedEdgePos.length)return{faceIndexMap:new Map,edgeIndexMap:new Map};var r=[];t.coords.forEach((function(e){r.push(new c.Vertex(e))})),e.setSoftTagWithVertex(t.boundedIndices,r);var n=new A.Face(t.mSurfaces[0]),i=t.coordIndices,o=e.makeLoopByVertexAndIndex(r,i[0]);n.setOuterLoop(o,t.isSameDir[0]);for(var a=1,s=i.length;a<s;++a){var u=e.makeLoopByVertexAndIndex(r,i[a]);if(null===u)return{faceIndexMap:new Map,edgeIndexMap:new Map};n.addInnerLoop(u)}var l=new Map;return l.set(n,0),{faceIndexMap:l,edgeIndexMap:e.setSoftTagWithEdge(t.boundedIndices,r)}}},{key:"makeFacesByPolygonMesh",value:function(t){var r=t.pgm.coords.length,n=t.pgm.coordIndices.length;if(0===r||0===n||t.pgm.markLoop.length!==n||t.pgm.isSameDir.length!==t.pgm.mSurfaces.length)return{faceIndexMap:new Map,edgeIndexMap:new Map};var i=[];t.pgm.coords.forEach((function(e){i.push(new c.Vertex(e))})),e.setSoftTagWithVertex(t.pgm.boundedIndices,i);for(var o=new Set,a=t.pgm.mSurfaces,s=t.pgm.coordIndices,u=new Map,l=0,g=0,f=0,h=s.length;f<h;f++){var p=t.pgm.markLoop[f];if(f>t.range[g]&&g++,-1!==p){var d=new A.Face(a[l]),I=e.makeLoopByVertexAndIndex(i,s[f]);for(d.setOuterLoop(I),f++;f<h&&1===t.pgm.markLoop[f];){var y=e.makeLoopByVertexAndIndex(i,s[f]);if(null===y)return{faceIndexMap:new Map,edgeIndexMap:new Map};d.addInnerLoop(y),f++}o.add(d),u.set(d,g),f--}else{var C=e.makeLoopByVertexAndIndex(i,s[f]);if(null!==C&&null!==a[l]){var E=new A.Face(a[l]);E.setOuterLoop(C),o.add(E),u.set(E,g)}}l++}return{faceIndexMap:u,edgeIndexMap:e.setSoftTagWithEdge(t.pgm.boundedIndices,i)}}},{key:"setSoftTagWithVertex",value:function(e,t){var r=!0,n=!1,i=void 0;try{for(var o,A=e[Symbol.iterator]();!(r=(o=A.next()).done);r=!0)for(var a=o.value,s=1,u=a.length;s<u;++s)0!==s&&s!==u-1&&(t[a[s]].isSoft=!0)}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}}},{key:"setSoftTagWithEdge",value:function(t,r){var n=new Map,i=r.length,o=0,A=!0,a=!1,s=void 0;try{for(var u,c=t[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){for(var l=u.value,g=1,f=l.length;g<f;++g){var h=l[g],p=l[g-1];if(h<i&&h>=0&&p<i&&p>=0){var d=e.setSoftOnEdgeByVertex(r[l[g]],r[l[g-1]]);d&&n.set(d,{bcIndex:o,posIndex:g})}}o++}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}return n}},{key:"setSoftOnEdgeByVertex",value:function(e,t){var r=e.edges,n=!0,i=!1,o=void 0;try{for(var A,a=r[Symbol.iterator]();!(n=(A=a.next()).done);n=!0){var s=A.value;if(s.vertexA===e&&s.vertexB===t||s.vertexB===e&&s.vertexA===t)return s.isSoft=!1,s}}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}}},{key:"makeLoopByVertexAndIndex",value:function(t,r){var n=r.length;if(n<1)return null;for(var i=[],o=r[n-1],A=t[o],u=0,c=n;u<c;++u){var l=r[u],g=t[l],f=e.makeEdgeByVertex(A,g);A.point.isEqual(g.point)&&(f.degenerated=!0),i.push(new a.HalfEdge(f,f.vertexA!==A)),A=g,o=l}return new s.Loop(i)}},{key:"makeUniqueEdgeByVertex",value:function(e,t){var r=new o.Edge(i.Line3d.fromSegment(e.point,t.point),e,t);return r.isSoft=!0,r}},{key:"makeEdgeByVertex",value:function(t,r){var n=t.edges,i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value;if(u.vertexA===t&&u.vertexB===r||u.vertexB===t&&u.vertexA===r)return u}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}var c=r.edges,l=!0,g=!1,f=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value;if(d.vertexA===t&&d.vertexB===r||d.vertexB===t&&d.vertexA===r)return d}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}return e.makeUniqueEdgeByVertex(t,r)}},{key:"mergeCoplanarFaceOnFaceList",value:function(t,r){var n=new Set;t.faceIndexMap.forEach((function(e,t){t.getEdges().forEach((function(e){n.add(e)}))}));var i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value,c=u.halfEdges;if(u.isSoft&&2===c.length){var l=e.mergeFaceWithHalfEdge(c[0],c[1],r);if(null!==l){var g=c[0].loop.face,f=c[1].loop.face,h=t.faceIndexMap.get(g),p=t.faceIndexMap.get(f);void 0!==h&&void 0!==p&&(t.faceIndexMap.delete(g),t.faceIndexMap.delete(f),t.faceIndexMap.set(l,h),t.edgeIndexMap.delete(u))}}}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}}},{key:"mergeFaceWithHalfEdge",value:function(t,r,n){if(null===t.loop||null===t.loop.face||null===r.loop||null===r.loop.face)return null;var o=t.loop.face,a=r.loop.face;if(null===o||null===a)return null;var u=o.surface,c=a.surface;if(!(u instanceof i.Plane&&c instanceof i.Plane&&t.reversed!==r.reversed))return null;if(u.normal.isSameDirection(c.normal,n)){var l=o.outerLoop,g=a.outerLoop,f=e.findHalfEdgePosInLoop(l,t),h=e.findHalfEdgePosInLoop(g,r);if(-1===f||-1===h)return null;for(var p=l.halfEdges,d=g.halfEdges,I=p.length,y=d.length,C=[],E=f+1,B=f+I;E<B;++E)C.push(p[E%I]);for(var v=h+1,m=h+y;v<m;++v)C.push(d[v%y]);var Q=new A.Face(u);Q.setOuterLoop(new s.Loop(C),o.sameDir);var b=t.edge;return t.vertexA.removeEdge(b),r.vertexA.removeEdge(b),Q}return null}},{key:"findHalfEdgePosInLoop",value:function(e,t){for(var r=e.halfEdges,n=-1,i=0,o=r.length;i<o;++i)if(r[i]===t){n=i;break}return n}},{key:"mergeCollinearEdgeOnFace",value:function(t,r){var n=new Set;t.faceIndexMap.forEach((function(e,t){t.getVertices().forEach((function(e){n.add(e)}))})),n.forEach((function(n){e.judgeValidityForVertexByEdges(n,r)&&e.removeVertex(t,n)}))}},{key:"judgeValidityForVertexByEdges",value:function(e,t){var r=e.edges;if(2===r.length){var n=r[0],o=r[1],A=!0,a=!1,s=void 0;try{for(var u,c=n.halfEdges[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){if(0!==u.value.loop.face.innerLoops.length)return!1}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}var l=!0,g=!1,f=void 0;try{for(var h,p=o.halfEdges[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){if(0!==h.value.loop.face.innerLoops.length)return!1}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}if(n.isSoft===o.isSoft&&n.curve instanceof i.Line3d&&o.curve instanceof i.Line3d){var d=n.curve,I=o.curve;if(d.direction.isParallel(I.direction,t))return!0}}return!1}},{key:"removeVertex",value:function(t,r){var n=r.getLeadInHalfEdges(),i=r.getLeadOutHalfEdges();if(2===n.length||2===i.length){var o=i[0],A=i[1],s=n[0],u=n[1],c=o.edge,l=A.edge,g=o.vertexB,f=A.vertexB,h=e.makeEdgeByVertex(g,f);h.isSoft=c.isSoft;var p=new a.HalfEdge(h,!0);e.updateFaceWithHF(t.faceIndexMap,p,o,s,u),p=new a.HalfEdge(h,!1),e.updateFaceWithHF(t.faceIndexMap,p,A,s,u),r.removeEdge(c),r.removeEdge(l),g.removeEdge(c),f.removeEdge(l);var d=t.edgeIndexMap.get(c),I=t.edgeIndexMap.get(l);d&&I&&d.bcIndex===I.bcIndex&&(t.edgeIndexMap.delete(c),t.edgeIndexMap.delete(l),d.posIndex>I.posIndex?t.edgeIndexMap.set(h,I):t.edgeIndexMap.set(h,d))}}},{key:"updateFaceWithHF",value:function(e,t,r,n,i){var o=new Array;o.push(t);for(var a=r.next;null!==a&&a!==n&&a!==i;)o.push(a),a=a.next;var u=new s.Loop(o),c=r.loop.face,l=new A.Face(c.surface);l.setOuterLoop(u,c.sameDir);var g=e.get(c);void 0!==g&&(e.delete(c),e.set(l,g))}},{key:"getEdgesFromShell",value:function(e){return Array.from(e.getEdges())}},{key:"getEdgesFromFace",value:function(e){var t=[];return e.outerLoop.halfEdges.map((function(e){return t.push(e.edge)})),e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return t.push(e.edge)}))})),t}},{key:"reversedMapInfo",value:function(e,t){var r=new Map,n=e.edges,i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value;r.set(u,[])}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}t.edgeIndexMap.forEach((function(e,t){var i=n[e.bcIndex],o=r.get(i);o&&o.push({edge:t,order:e.posIndex})}));var c=new Map;r.forEach((function(e,t){e.sort((function(e,t){return e.order-t.order}));var r=[];e.forEach((function(e){r.push(e.edge)})),c.set(t,r)}));var l=[],g=new Map,f=e.faces;return f.forEach((function(e){g.set(e,new Array)})),t.faceIndexMap.forEach((function(e,t){var r=f[e],n=g.get(r);n&&n.push(t),l.push(t)})),{faceList:l,faceMap:g,edgeMap:c}}}]),e}();p.defaultNormTol=1-Math.cos(Math.PI/9),t.Polygonize=p},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function A(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(715),u=r(2054),c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"polygonMeshOnSingleSurface3d",value:function(t,r,n,i,o,A,s){var u=e.polygonMeshOnSurface3d(t,r,n,i,o,A,s);return null===u||i instanceof a.Plane||u.planarMesh(),u}},{key:"polygonMeshOnSurface3d",value:function(t,r,n,i,o,A,s){return i instanceof a.Plane?e.polygonMeshOnPlane(t,r,i,o,A):e.polygonMeshOnNonPlane(t,r,n,i,o,A,s)}},{key:"polygonMeshOnPlane",value:function(e,t,r,n,i){var o=[],A=[];return e.forEach((function(e){var t=u.PolygonOnUVFace.tessBoundedCurve3d(e,i);o.push(t)})),t.forEach((function(e){var t=[];e.forEach((function(e){var r=u.PolygonOnUVFace.tessBoundedCurve3d(e,i);t.push(r)})),A.push(t)})),s.PolygonMesh.makePolygonMeshByLoops(o,A,r,n)}},{key:"polygonMeshOnNonPlane",value:function(t,r,n,i,o,A,c){var l=e.getOrderUVBoundedCurve(i,t,r,c),g=void 0;g=i instanceof a.NurbsSurface?e.calculateUVOffset(i,l.uvContour,c):[0,0];var f=u.PolygonOnUVFace.tessUVDomain(i,l.uvContour,g[0],g[1],A),h=u.PolygonOnUVFace.getUVPolygons(l.uvContour,l.uvHole,g,f,c);if(0===h.length||0===h[0].length)return new s.PolygonMesh;var p=u.PolygonOnUVFace.getRectMesh(i,f),d=e.getEndpointOfUVBoundedCurve(l.uvContour,l.uvHole,g),I=e.getPointsByDegenerateEdge(n,t,r),y=[],C=[],E=e.getPolygonByRectMesh(h,p,i,o,d,C,y,I,c);return 0===E.length?new s.PolygonMesh:s.PolygonMesh.makePolygonMeshByPolygon(E,C,y,o)}},{key:"getOrderUVBoundedCurve",value:function(e,t,r,n){var i={contour:t,holes:r},o=e.faceToUV(i,n).mapping,A=[],a=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var g=c.value;A.push(o.get(g))}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}var f=[],h=!0,p=!1,d=void 0;try{for(var I,y=r[Symbol.iterator]();!(h=(I=y.next()).done);h=!0){var C=I.value,E=[],B=!0,v=!1,m=void 0;try{for(var Q,b=C[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value;E.push(o.get(_))}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}f.push(E)}}catch(e){p=!0,d=e}finally{try{!h&&y.return&&y.return()}finally{if(p)throw d}}return{uvContour:A,uvHole:f}}},{key:"getEndpointOfUVBoundedCurve",value:function(e,t,r){var n=[],i=[];i.push(e),null!==t&&i.push.apply(i,A(t));var o=!0,a=!1,s=void 0;try{for(var u,c=i[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=u.value,g=[],f=!0,h=!1,p=void 0;try{for(var d,I=l[Symbol.iterator]();!(f=(d=I.next()).done);f=!0){var y=d.value.startPoint;g.push({x:y.x+r[0],y:y.y+r[1]})}}catch(e){h=!0,p=e}finally{try{!f&&I.return&&I.return()}finally{if(h)throw p}}n.push(g)}}catch(e){a=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(a)throw s}}return n}},{key:"getPointsByDegenerateEdge",value:function(e,t,r){for(var n=[],i=0,o=e.length;i<o;++i)for(var A=e[i],a=0,s=A.length;a<s;++a)A[a]&&(0==i?n.push(t[a].startPoint):n.push(r[i-1][a].startPoint));return n}},{key:"calculateUVOffset",value:function(t,r,n){n=n||a.Tolerance.Tolerance.global;var i=t.isUPeriodic(n),o=t.isVPeriodic(n);if(!i&&!o||0===r.length)return[0,0];var A=0,s=0,u=!0,c=!1,l=void 0;try{for(var g,f=r[Symbol.iterator]();!(u=(g=f.next()).done);u=!0){var h=g.value;A+=h.startPoint.x,s+=h.startPoint.y}}catch(e){c=!0,l=e}finally{try{!u&&f.return&&f.return()}finally{if(c)throw l}}A/=r.length,s/=r.length;var p=t.domainU,d=t.domainV,I=p.end-p.start,y=d.end-d.start;return[e.calculateOffset(p.start,p.end,I,A)*I,e.calculateOffset(d.start,d.end,y,s)*y]}},{key:"calculateOffset",value:function(e,t,r,n){for(var i=0;n>t;)n-=r,i--;for(;n<e;)n+=r,i++;return i}},{key:"getPolygonByRectMesh",value:function(t,r,n,i,o,s,u,c,l){for(var g=[],f=[],h=new Map,p=new Map,d=a.simplifyPolygonsByHorizontal(t,!0),I=a.simplifyPolygonsByHorizontal(d,!1),y=0,C=r.length;y<C;++y){var E=r[y];a.addRect(I,E,g,f,h,p)}var B=[],v=e.dealWithInnerPolygons(g,B),m=e.dealWithIntersectPolygons(f,B,t),Q=[],b=new Map;e.mergeInnerPolygons(Q,s,v,b,n,i,B);var _=new Map,S=[];o.forEach((function(e){return S.push.apply(S,A(e))}));var w=Q.length,D=!0,R=!1,M=void 0;try{for(var x,P=m[Symbol.iterator]();!(D=(x=P.next()).done);D=!0){var T=x.value;e.mergeIntersectPolygons(Q,s,T,b,n,i,B[w],S,_,c,l),w++}}catch(e){R=!0,M=e}finally{try{!D&&P.return&&P.return()}finally{if(R)throw M}}if(_.size!==S.length)return[];var F=e.getBoundedEndpointOnPolygon(o,_);return 0===F.length?[]:(u.push.apply(u,A(F)),Q)}},{key:"getBoundedEndpointOnPolygon",value:function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var A,s=e[Symbol.iterator]();!(n=(A=s.next()).done);n=!0){var u=A.value;if(0===u.length)break;var c=u[0],l=t.get(c);if(!l)break;for(var g=1,f=u.length;g<f;++g){var h=u[g],p=t.get(h);if(!p)return[];a.Num.isEqual(c.x,h.x)&&a.Num.isEqual(c.y,h.y)||(r.push(l),r.push(p)),l=p,c=h}var d=u[0],I=t.get(d);if(!I)return[];a.Num.isEqual(c.x,d.x)&&a.Num.isEqual(c.y,d.y)||(r.push(l),r.push(I))}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}},{key:"dealWithInnerPolygons",value:function(t,r){var n=new Map,o=[],A=!0,a=!1,s=void 0;try{for(var u,c=function(){var t=u.value,i=e.makePlaneByRectMeshNode(t);if(null===i)return{v:[]};r.push(i);var A=[];t.corners.forEach((function(t){var r=e.getPolyPtBySurfPtMapPolyPt(n,t);A.push(r)})),o.push(A)},l=t[Symbol.iterator]();!(A=(u=l.next()).done);A=!0){var g=c();if("object"===(void 0===g?"undefined":i(g)))return g.v}}catch(e){a=!0,s=e}finally{try{!A&&l.return&&l.return()}finally{if(a)throw s}}return o}},{key:"dealWithIntersectPolygons",value:function(t,r,n){for(var o=[],A=function(i,A){var s=t[i],u=e.makePlaneByRectMeshNode(s);if(null===u)return{v:[]};r.push(u);var c=[];s.corners.forEach((function(e){c.push({x:e.uv[0],y:e.uv[1]})}));for(var l=a.simplifyPolygons(a.clipping(n,c)),g=0,f=l.length;g<f;++g){var h=l[g].length;if(h>0){var p=l[g][0],d=l[g][h-1];a.Num.isEqual(p.x,d.x)&&a.Num.isEqual(p.y,d.y)&&l[g].pop()}}for(var I=[],y=0;y<4;++y){var C=s.getAllCorners(y),E=!0,B=!1,v=void 0;try{for(var m,Q=function(){var e=m.value;s.corners.some((function(t){return t===e}))||I.push({x:e.uv[0],y:e.uv[1],id:e.id})},b=C[Symbol.iterator]();!(E=(m=b.next()).done);E=!0)Q()}catch(e){B=!0,v=e}finally{try{!E&&b.return&&b.return()}finally{if(B)throw v}}}var _=a.Tolerance.Tolerance.global;if(I.length){var S=!0,w=!1,D=void 0;try{for(var R,M=I[Symbol.iterator]();!(S=(R=M.next()).done);S=!0){var x=R.value,P=new a.Point2d(x.x,x.y),T=!0,F=!1,O=void 0;try{for(var L,k=l[Symbol.iterator]();!(T=(L=k.next()).done);T=!0)for(var N=L.value,G=0,U=N.length;G<U;++G){var j=new a.LineSeg2d(new a.Point2d(N[G].x,N[G].y),new a.Point2d(N[(G+1)%U].x,N[(G+1)%U].y));if((j.direction.isParallel(new a.Vector2d(1,0),_)||j.direction.isParallel(new a.Vector2d(0,1),_))&&j.isPointOnCurve(P,_)){N.splice(G+1,0,x);break}}}catch(e){F=!0,O=e}finally{try{!T&&k.return&&k.return()}finally{if(F)throw O}}}}catch(e){w=!0,D=e}finally{try{!S&&M.return&&M.return()}finally{if(w)throw D}}}o.push(l)},s=0,u=t.length;s<u;++s){var c=A(s);if("object"===(void 0===c?"undefined":i(c)))return c.v}return o}},{key:"mergeInnerPolygons",value:function(e,t,r,n,i,o,A){var s=0,u=!0,c=!1,l=void 0;try{for(var g,f=function(){var r=g.value,u=A[s++],c=[];r.forEach((function(e){var t=n.get(e);if(!t){var r=new a.UV(e.x,e.y);t=i.getPoint(r),n.set(e,t)}c.push(t)})),0!==c.length&&(o||c.reverse(),e.push(c),t.push(u))},h=r[Symbol.iterator]();!(u=(g=h.next()).done);u=!0)f()}catch(e){c=!0,l=e}finally{try{!u&&h.return&&h.return()}finally{if(c)throw l}}}},{key:"mergeIntersectPolygons",value:function(t,r,n,i,o,A,s,u,c,l,g){var f=!0,h=!1,p=void 0;try{for(var d,I=function(){var n=d.value,f=new Set;if(n.forEach((function(t){var r=e.findPointInMap(i,t);if(null===r){var n=new a.UV(t.x,t.y);r=o.getPoint(n),i.set(t,r)}var A=!0,s=!1,h=void 0;try{for(var p,d=l[Symbol.iterator]();!(A=(p=d.next()).done);A=!0){var I=p.value;I.isEqual(r,g.distTol)&&(r=I)}}catch(e){s=!0,h=e}finally{try{!A&&d.return&&d.return()}finally{if(s)throw h}}f.add(r),e.matchBoundedEndpoint(u,c,t,r)})),0!==f.size){var h=Array.from(f);A||h.reverse(),t.push(h),r.push(s)}},y=n[Symbol.iterator]();!(f=(d=y.next()).done);f=!0)I()}catch(e){h=!0,p=e}finally{try{!f&&y.return&&y.return()}finally{if(h)throw p}}}},{key:"matchBoundedEndpoint",value:function(e,t,r,n){var i=!0,o=!1,A=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(a.Num.isEqual(c.x,r.x)&&a.Num.isEqual(c.y,r.y)){t.set(c,n);break}}}catch(e){o=!0,A=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw A}}}},{key:"findPointInMap",value:function(e,t){var r=t.x,n=t.y,i=!0,o=!1,A=void 0;try{for(var s,u=e.entries()[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(a.Num.isEqual(r,c[0].x)&&a.Num.isEqual(n,c[0].y))return c[1]}}catch(e){o=!0,A=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw A}}return null}},{key:"makePlaneByRectMeshNode",value:function(e){if(e.corners.length<4)return null;var t=new a.Point3d(e.corners[0].point),r=new a.Point3d(e.corners[1].point),n=new a.Point3d(e.corners[2].point),i=void 0;return t.isEqual(r)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(t,n,i)):t.isEqual(n)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(r,n,i)):r.isEqual(n)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(t,r,i)):a.Plane.makePlaneByTreePoints(t,r,n)}},{key:"getPolyPtBySurfPtMapPolyPt",value:function(e,t){var r=e.get(t);return r||(r={x:t.uv[0],y:t.uv[1]},e.set(t,r)),r}}]),e}();t.PolygonMeshOnSurface=c},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"getUVPolygons",value:function(e,t,r,n,A){var a=this,s=this.makeCrosswordLine(n);if(0===s.length)return[];var u=[];u.push(e),null!==t&&u.push.apply(u,i(t));for(var c=[],l=function(e,t){var n=[];u[e].forEach((function(e){var t=a.boundedCurveIntersectIsoLine(e,s,A);t.splice(t.length-1,1),n.push.apply(n,i(t))})),o.LoopCCW.isPolygonCCW2D(n)!==(0===e)&&n.reverse();var l=new Array;n.forEach((function(e){l.push({x:e.x+r[0],y:e.y+r[1]})})),c.push(l)},g=0,f=u.length;g<f;g++)l(g);return c}},{key:"makeCrosswordLine",value:function(e){if(2!==e.length)return[];for(var t=e[0],r=e[1],n=[],i=1,A=t.length;i<A-1;i++)n.push(new o.Line2d(new o.Point2d(t[i],0),o.Vector2d.yAxis));for(var a=[],s=1,u=r.length;s<u-1;s++)a.push(new o.Line2d(new o.Point2d(0,r[s]),o.Vector2d.xAxis));return[n,a]}},{key:"boundedCurveIntersectIsoLine",value:function(e,t,r){var n=new Array,A=e.getBounding(),a=A.min,s=A.max;t[0].forEach((function(t){var A=t.p0.x;if(o.Num.isInRange(A,a.x,s.x,!0,!0,r.distTol)){var u=e.intersectCurve(t);n.push.apply(n,i(u))}})),t[1].forEach((function(t){var A=t.p0.y;if(o.Num.isInRange(A,a.y,s.y,!0,!0,r.distTol)){var u=e.intersectCurve(t);n.push.apply(n,i(u))}})),n.push({point:e.startPoint,param1:e.domain.start,param2:0,isOverlap:!1}),n.push({point:e.endPoint,param1:e.domain.end,param2:0,isOverlap:!1}),n.sort((function(e,t){return e.param1<t.param1?-1:e.param1>t.param1?1:0})),this.filterRepeatData(n,r);var u=[];return n.forEach((function(e){u.push(e.point)})),u}},{key:"tessUVDomain",value:function(e,t,r,n,i){var A=i,a=this.getUVBox(t,r,n),s=void 0;if(e instanceof o.ConicalSurface||e instanceof o.CylindricalSurface)s=this.adaptiveDomainOfCylinderCone(e,a[0],a[1],A);else if(e instanceof o.SurfaceOfLinearExtrusion)s=this.adaptiveDomainOfLinearExtrusion(e,a[1],A);else if(e instanceof o.RevolveSurface)s=this.adaptiveDomainOfRevolve(e,a[0],a[1],A);else if(e instanceof o.ToroidalSurface)s=this.adaptiveDomainOfToroidal(a[0],a[1],A);else{if(!(e instanceof o.NurbsSurface))throw"not implement";s=this.adaptiveDomainOfNurbs(e,a[0],a[1],A)}return s}},{key:"adaptiveDomainOfCylinderCone",value:function(t,r,n,i){var A=void 0;if(A=(o.ConicalSurface,t.radius),o.Num.isEqual(A,0))return[];var a=new o.Arc3d(new o.Circle3d(t.ccs,A),r.start,r.end).tessCurveAdaptiveByNormalTol(r.start,r.end,i),s=a.length,u=new Array,c=!0,l=!1,g=void 0;try{for(var f,h=a[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var p=f.value;u.push(p.t)}}catch(e){l=!0,g=e}finally{try{!c&&h.return&&h.return()}finally{if(l)throw g}}var d=r.length*A,I=n.length,y=Math.floor(I/d*s);return y=Math.min(y>0?y:1,e.maxDiscreteSeg),[u,this.splitDomain(n,n.length/y)]}},{key:"adaptiveDomainOfLinearExtrusion",value:function(t,r,n){for(var i=t.baseCurve,o=i.getApproximatePtInfosByNormalTol(n),A=o.length,a=new Array,s=0;s<A;++s)a.push(o[s].t);var u=i.length,c=t.height,l=Math.floor(c/u*A);return l=l>0?l:1,l=Math.min(l>0?l:1,e.maxDiscreteSeg),[a,this.splitDomain(r,r.length/l)]}},{key:"adaptiveDomainOfRevolve",value:function(t,r,n,i){var A=t.baseCurve,a=A.domain.middle,s=new o.LineSeg2d(new o.Point2d(r.start,a),new o.Point2d(r.end,a)),u=t.uvCurveTo3d(s),c=u.tessCurveAdaptiveByNormalTol(r.start,r.end,i).length,l=this.splitDomain(r,r.length/c),g=A.tessCurveAdaptiveByNormalTol(n.start,n.end,i),f=[],h=g.length,p=Math.floor(A.length/u.length*c)+1;if(p=Math.min(p,e.maxDiscreteSeg),h<c/2&&h<p)f=this.splitDomain(n,n.length/p);else for(var d=0;d<h;++d)f.push(g[d].t);return[l,f]}},{key:"adaptiveDomainOfToroidal",value:function(e,t,r){var n=new o.Circle3d(new o.CCS3d,1),i=new o.Arc3d(n,e.start,e.end).tessCurveAdaptiveByNormalTol(e.start,e.end,r).length,A=this.splitDomain(e,e.length/i),a=new o.Arc3d(n,t.start,t.end).tessCurveAdaptiveByNormalTol(t.start,t.end,r).length;return[A,this.splitDomain(t,t.length/a)]}},{key:"splitDomain",value:function(e,t){for(var r=e.start,n=e.end,i=e.length,o=Math.ceil(i/t),A=i/o,a=new Array,s=0;s<o;++s)a.push(r+s*A);return a.push(n),a}},{key:"adaptiveDomainOfNurbs",value:function(e,t,r,n){var i=t.end,o=t.start,A=r.end,a=r.start,s=[];e.degreeU>1&&e.isoCurve((A+a)/2,!0).tessCurveAdaptiveByNormalTol(o,i,n).forEach((function(e){s.push(e.t)}));var u=e.controlPoints.length*e.degreeU;if(s.length<u){s.splice(0,s.length);for(var c=(i-o)/(u-1),l=0;l<u;l++)s.push(o+c*l)}var g=[];e.degreeV>1&&e.isoCurve((i+o)/2,!1).tessCurveAdaptiveByNormalTol(a,A,n).forEach((function(e){g.push(e.t)}));var f=e.controlPoints[0].length*e.degreeV;if(g.length<f){g.splice(0,g.length);for(var h=(A-a)/(f-1),p=0;p<f;p++)g.push(a+h*p)}return[s,g]}},{key:"getRectMesh",value:function(e,t){for(var r=t[0].length-1,n=t[1].length-1,i=new Array(r*n),A=[],a=0;a<n+1;a++){for(var s=new Array,u=0;u<r+1;u++){var c=t[0][u],l=t[1][a],g=new o.UV(c,l),f=e.tangentUWithLen(g),h=e.tangentVWithLen(g),p=e.getPoint(g),d=f.cross(h).normalized();s.push(new o.SurfacePoint([p.x,p.y,p.z],[d.x,d.y,d.z],[g.u,g.v],-1,o.Num.isZero(d.length)))}A.push(s)}for(var I=0;I<n;I++)for(var y=0;y<r;y++){var C=[A[n-I-1][y],A[n-I-1][y+1],A[n-I][y+1],A[n-I][y]];i[I*r+y]=new o.RectMeshNode(e,C)}return i}},{key:"getUVBox",value:function(e,t,r){var n=new o.BBox2d,i=!0,A=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;n.merge(c.getBounding())}}catch(e){A=!0,a=e}finally{try{!i&&u.return&&u.return()}finally{if(A)throw a}}var l=n.min,g=n.max,f=l.x+t,h=l.y+r,p=g.x+t,d=g.y+r;return[new o.Interval(f,p),new o.Interval(h,d)]}},{key:"filterRepeatData",value:function(e,t){if(!(e.length<2))for(var r=e[0].param1,n=0,i=1,A=e.length;i<A-n;i++)o.Num.isEqual(e[i].param1,r,t.distTol)?(e.splice(i,1),n++,i--):r=e[i].param1}},{key:"tessBoundedCurve3d",value:function(e,t){var r=e.domain,n=e.tessCurveAdaptiveByNormalTol(r.start,r.end,t);if(n.length<2)return[e.startPoint,e.endPoint];var i=[];return n.forEach((function(e){i.push(e.point)})),i}}]),e}();A.maxDiscreteSeg=100,t.PolygonOnUVFace=A},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=r(715),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"mergePolygonMesh",value:function(t,r,n,i,o){if(!e.validPolygonMeshList(t,n,i))return{pgm:new A.PolygonMesh,range:[]};e.buildCommonPtPosLst(n).forEach((function(r){e.mergeCommonPointForPolygonMeshes(t,r)}));for(var a=e.buildCommonEdgePosList(i),s=0,u=a.length;s<u;s++)a[s].length<2||e.mergeCommonEdgeByPolygonMesh(t,a[s],r[s],o);return e.mergePolygonMeshWithComInfo(t,a)}},{key:"mergeCommonPointForPolygonMeshes",value:function(t,r){if(!(r.length<2)){var n=[];r.forEach((function(e){var r=e[0],i=e[1];if(!(r<0||r>=t.length)){var o=t[r];if(!(null===o||i<0||i>=o.boundedEdgePos.length)){var A=o.boundedEdgePos[i];if(null!==A&&0!==A.length){var a=A[0].x;if(!(a<0||a>=o.mSurfaces.length))if(null!==o.mSurfaces[a]){var s=o.boundedIndices[i][0];n.push([r,s])}}}}})),e.updateCommonPtPos(t,n)}}},{key:"updateCommonPtPos",value:function(e,t){for(var r=t[0],n=e[r[0]].coords[r[1]],i=1,o=t.length;i<o;i++){var A=t[i];e[A[0]].coords.splice(A[1],1,n)}}},{key:"buildCommonPtPosLst",value:function(e){for(var t=e.length,r=new Map,n=0;n<t;++n)for(var o=e[n],A=0,a=o.length;A<a;++A){var s=o[A],u=r.get(s),c=[n,A];if(u){var l=[];l.push.apply(l,i(u)),l.push(c),r.set(s,l)}else r.set(s,[c])}var g=[];return r.forEach((function(e,t){g.push(e)})),g}},{key:"buildCommonEdgePosList",value:function(e){for(var t=new Map,r=0,n=e.length;r<n;++r)for(var i=e[r],o=0,A=i.length;o<A;++o){var a=i[o],s=t.get(a.index);if(s)s.push({faceI:r,edgeI:o,isReversed:i[o].isReversed});else{var u=[];u.push({faceI:r,edgeI:o,isReversed:i[o].isReversed}),t.set(a.index,u)}}var c=[];return t.forEach((function(e,t){c.push(e)})),c}},{key:"mergeCommonEdgeByPolygonMesh",value:function(t,r,n,o){var A=r.length;if(e.validCommonEdgeData(t,r,o)){for(var a=[],s=[],u=0;u<A;++u){var c=r[u],l=t[c.faceI],g=[].concat(i(l.boundedIndices[c.edgeI])),f=[].concat(i(l.boundedEdgePos[c.edgeI]));o[c.faceI][c.edgeI]&&(g.reverse(),f.reverse());for(var h=g.length,p=[],d=1;d<h-1;d++){var I=l.coords[g[d]],y=n.getParam(I);p.push(y),s.push(y)}a.push(p)}s=s.sort((function(e,t){return e-t}));e.uniqueDataForList(s,.001);var C=[];s.forEach((function(e){C.push({p:e,pt:n.getPoint(e)})}));var E=0,B=!0,v=!1,m=void 0;try{for(var Q,b=a[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value,S=e.splitParamPtListByParams(C,_,.001),w=r[E];t[w.faceI].insertPtsByPtsList(w.edgeI,S,o[w.faceI][w.edgeI]),E++}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}}}},{key:"splitParamPtListByParams",value:function(e,t,r){var n=[],i=e.length,A=0,a=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0)for(var g=c.value,f=[],h=A;h<i;++h)if(f.push(e[h].pt),o.Num.isBiggerOrEqual(e[h].p,g,r)){n.push(f),A=h+1;break}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}for(var p=[],d=A;d<i;++d)p.push(e[d].pt);return n.push(p),n}},{key:"uniqueDataForList",value:function(e,t){if(!(e.length<2))for(var r=e[0],n=0,i=1,A=e.length;i<A-n;i++)o.Num.isEqual(e[i],r,t)?(e.splice(i,1),n++,i--):r=e[i]}},{key:"validCommonEdgeData",value:function(e,t,r){if(t.length<2)return!1;var n=null,i=null,o=!0,A=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=c.faceI,g=c.edgeI;if(l<0||l>=e.length)return!1;if(g<0||g>=e[l].boundedIndices.length)return!1;var f=e[c.faceI],h=f.boundedIndices[g],p=f.boundedEdgePos[g],d=h.length;if(d<2||d!==p.length+1)return!1;var I=f.coords[h[0]],y=f.coords[h[d-1]];if(null===n)r[l][g]?(n=y,i=I):(n=I,i=y);else if(r[l][g]){if(n!==y||i!==I)return!1}else if(n!==I||i!==y)return!1}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}return!0}},{key:"validPolygonMeshList",value:function(e,t,r){if(t.length!==e.length)return!1;for(var n=0,i=e.length;n<i;++n){var o=e[n];if(r[n].length!==o.boundedIndices.length)return!1}return!0}},{key:"mergePolygonMeshWithComInfo",value:function(e,t){for(var r=new A.PolygonMesh,n=[],o=new Map,a=new Map,s=0,u=t.length;s<u;++s)for(var c=1,l=t[s].length;c<l;++c){var g=a.get(t[s][c].faceI);if(g)g.add(t[s][c].edgeI);else{var f=new Set;f.add(t[s][c].edgeI),a.set(t[s][c].faceI,f)}}var h=0,p=0,d=!0,I=!1,y=void 0;try{for(var C,E=e[Symbol.iterator]();!(d=(C=E.next()).done);d=!0){var B,v,m,Q=C.value;Q.postTreatment();var b=new Map,_=Q.coords,S=0,w=!0,D=!1,R=void 0;try{for(var M,x=_[Symbol.iterator]();!(w=(M=x.next()).done);w=!0){var P=M.value,T=o.get(P);if(void 0===T)b.set(S++,h),void 0===o.get(P)&&o.set(P,h++),r.coords.push(P);else b.set(S++,T)}}catch(e){D=!0,R=e}finally{try{!w&&x.return&&x.return()}finally{if(D)throw R}}var F=Q.coordIndices,O=!0,L=!1,k=void 0;try{for(var N,G=F[Symbol.iterator]();!(O=(N=G.next()).done);O=!0){var U=N.value,j=[],V=!0,Y=!1,H=void 0;try{for(var K,q=U[Symbol.iterator]();!(V=(K=q.next()).done);V=!0){var J=K.value;j.push(b.get(J))}}catch(e){Y=!0,H=e}finally{try{!V&&q.return&&q.return()}finally{if(Y)throw H}}r.coordIndices.push(j)}}catch(e){L=!0,k=e}finally{try{!O&&G.return&&G.return()}finally{if(L)throw k}}(B=r.mSurfaces).push.apply(B,i(Q.mSurfaces)),(v=r.isSameDir).push.apply(v,i(Q.isSameDir)),(m=r.markLoop).push.apply(m,i(Q.markLoop)),n.push(r.coordIndices.length-1);for(var W=a.get(p),z=0,X=Q.boundedIndices.length;z<X;++z)if(!W||!W.has(z)){var Z=[],$=!0,ee=!1,te=void 0;try{for(var re,ne=Q.boundedIndices[z][Symbol.iterator]();!($=(re=ne.next()).done);$=!0){var ie=re.value;Z.push(b.get(ie))}}catch(e){ee=!0,te=e}finally{try{!$&&ne.return&&ne.return()}finally{if(ee)throw te}}r.boundedIndices.push(Z)}p++}}catch(e){I=!0,y=e}finally{try{!d&&E.return&&E.return()}finally{if(I)throw y}}return{pgm:r,range:n}}}]),e}();t.PolygonMeshUtil=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(2057),o=r(2058),A=r(2059),a=r(2062);t.triangulate=function(e,t){if(e.surface instanceof n.Plane)return A.triangulateOnPlane(e,e.surface,t);if(e.surface instanceof n.CylindricalSurface||e.surface instanceof n.ConicalSurface||e.surface instanceof n.SurfaceOfLinearExtrusion)return i.triangulateOnCylinderCone(e,e.surface,t);if(e.surface instanceof n.NurbsSurface)return o.triangulateOnNurbsSurface(e,e.surface,t);if(e.surface instanceof n.ToroidalSurface)return a.triangulateOnRevolveSurface(e,e.surface,t);if(e.surface instanceof n.RevolveSurface)return a.triangulateOnRevolveSurface(e,e.surface,t);throw"unsupported"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(527);t.triangulateOnCylinderCone=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateDevelopable.triangulateOnDevelopable3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(527);t.triangulateOnNurbsSurface=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateNurbs.triangulateOnNurbsSurface3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(2060),A=r(527),a=r(2061);function s(e,t,r){var o=e.getApproximatePoints(t);if(!e.edge.isSoft||!r)return{points:o};var A=c(e.edge);if(!A)return{points:o};for(var a=l(e.vertexA),s=l(e.vertexB),g=new Map,f=[].concat(n(A),n(a),n(s)),h=0,p=f.length;h<p;h++){var d=f[h];if(!g.has(d)){var I=d.surface;if(I instanceof i.Plane){var y=d.sameDir?I.ccs.dz:I.ccs.dz.reversed();g.set(d,y)}}}for(var C=new Array(o.length),E=0,B=o.length;E<B;E++){var v=o[E];0===E&&a.length>0?C[E]=u(a,v,g):E===B-1&&s.length>0?C[E]=u(s,v,g):C[E]=u(A,v,g)}return{points:o,normals:C}}function u(e,t,r){for(var n=void 0,i=0,o=e.length;i<o;i++){var A=e[i],a=r.get(A);a||(a=A.sameDir?A.surface.getNormalOfPoint(t):A.surface.getNormalOfPoint(t).reversed()),n=n?n.added(a):a}return n?n.normalized():void 0}function c(e){for(var t=[],r=e.halfEdges,n=0,i=r.length;n<i;n++){var o=r[n],A=o.loop?o.loop.face:void 0;A&&t.push(A)}if(2===t.length)return t}function l(e){for(var t=new Set,r=e.edges,n=0,i=r.length;n<i;n++){var o=r[n];if(!o.isSoft)return[];var A=c(o);if(!A)return[];for(var a=0,s=A.length;a<s;a++)t.add(A[a])}return Array.from(t)}t.triangulateOnPlane=function(e,t,r){var n=new A.Mesh,i=[],u=0;r=r||{};for(var l=e.sameDir?t.normal:t.normal.reversed(),g=e.getLoops(),f=0,h=g.length;f<h;f++){var p=[],d=g[f].halfEdges,I=0,y=d[0].edge,C=d[d.length-1].edge;y.isSoft&&c(y)||!C.isSoft||!c(C)||(I=d.length-1);for(var E=!1,B=0,v=d.length;B<v;B++){for(var m=s(d[(B+I)%v],r.crvRatioTol,r.needNormal),Q=m.points,b=m.normals,_=E?1:0,S=b&&B!==v-1?Q.length:Q.length-1;_<S;_++){var w=Q[_];p.push(new o.LibtessVertex(w,u++)),o.addVertexNormalUVBy3d(w,n,t,e.sameDir,r.needUV,r.needNormal,void 0,b?b[_]:l)}E=!!b}i.push(p)}for(var D=a.gluTessTriangulate(i,o.toData(e.sameDir?t.normal.toPoint3d():t.normal.reversed().toPoint3d())),R=0;R<D.length;R+=3){var M=o.getOrCreateVertexIndexBy3d(D[R],n,t,e.sameDir,r.needUV,r.needNormal),x=o.getOrCreateVertexIndexBy3d(D[R+1],n,t,e.sameDir,r.needUV,r.needNormal),P=o.getOrCreateVertexIndexBy3d(D[R+2],n,t,e.sameDir,r.needUV,r.needNormal);n.addTriangle([M,x,P])}return r.needUV&&(n.uvIndices=n.triangleIndices),r.needNormal&&(n.normalIndices=n.triangleIndices),n}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.push(e.x),i.push(e.y),i.push(e.z?e.z:0),i.index=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Array),t}();function A(e){return[e.x,e.y,e.z]}t.LibtessVertex=o,t.toData=A,t.getOrCreateVertexIndex=function(e,t,r,n,o,a){if(e.hasOwnProperty("index"))return e.index;var s=new i.UV(e[0],e[1]),u=A(r.getPoint(s));if(t.addVertex(u),o&&t.addUv([s.u,s.v]),a){var c=n?r.getNormal(s):r.getNormal(s).reversed();t.addNormal([c.x,c.y,c.z])}return t.vertices.length-1},t.getOrCreateVertexIndexBy3d=function(e,t,r,n,o,A){if(e.hasOwnProperty("index"))return e.index;t.addVertex(e);var a=void 0;if(o&&(a=r.getParam(new i.Point3d(e[0],e[1],e[2])),t.addUv([a.u,a.v])),A){a||(a=r.getParam(new i.Point3d(e[0],e[1],e[2])));var s=n?r.getNormal(a):r.getNormal(a).reversed();t.addNormal([s.x,s.y,s.z])}return t.vertices.length-1},t.addVertexNormalUV=function(e,t,r,n,i,o,a,s){var u=a||r.getPoint(e);if(t.addVertex(A(u)),i&&t.addUv([e.u,e.v]),o){var c=s;c||(c=n?r.getNormal(e):r.getNormal(e).reversed()),t.addNormal([c.x,c.y,c.z])}},t.addVertexNormalUVBy3d=function(e,t,r,n,i,o,a,s){t.addVertex(A(e));var u=a;if(i&&(u=u||r.getParam(e),t.addUv([u.u,u.v])),o){var c=s;if(!c){var l=r.getNormal(u||r.getParam(e));c=n?l:l.reversed()}t.addNormal([c.x,c.y,c.z])}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(423),i=r(589);function o(e){e!==i.primitiveType.GL_TRIANGLES&&n.consoleLogInDev("expected TRIANGLES but got type: "+e)}function A(e){n.consoleLogInDev("error callback"),n.consoleLogInDev("error number: "+e)}t.gluTessTriangulate=function(e,t){var r=function(){var e=new i.GluTesselator;return e.gluTessCallback(i.gluEnum.GLU_TESS_VERTEX_DATA,(function(e,t){t.push(e)})),e.gluTessCallback(i.gluEnum.GLU_TESS_BEGIN,o),e.gluTessCallback(i.gluEnum.GLU_TESS_ERROR,A),e.gluTessCallback(i.gluEnum.GLU_TESS_COMBINE,(function(e,t,r){return[e[0],e[1],e[2]]})),e.gluTessCallback(i.gluEnum.GLU_TESS_EDGE_FLAG,(function(e){})),e}();r.gluTessNormal(t[0],t[1],t[2]);var n=[];r.gluTessBeginPolygon(n);var a=!0,s=!1,u=void 0;try{for(var c,l=e[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var g=c.value;r.gluTessBeginContour();var f=!0,h=!1,p=void 0;try{for(var d,I=g[Symbol.iterator]();!(f=(d=I.next()).done);f=!0){var y=d.value;r.gluTessVertex(y,y)}}catch(e){h=!0,p=e}finally{try{!f&&I.return&&I.return()}finally{if(h)throw p}}r.gluTessEndContour()}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}return r.gluTessEndPolygon(),n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(527);t.triangulateOnRevolveSurface=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateRevSurface.triangulateOnRevolveSurface3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2064);t.diffMIxShells=function(e,t){return n.diffShells(e.map((function(e){return e.rawObject()})),t.map((function(e){return e.rawObject()})))},t.diffMIxShell=function(e,t){return n.diffShell(e.rawObject(),t.rawObject())},t.diffMIxFace=function(e,t){return n.diffFace(e.rawObject(),t.rawObject())},t.diffMIxLoop=function(e,t){return n.diffLoop(e.rawObject(),t.rawObject())},t.diffMIxHalfEdge=function(e,t){return n.diffHalfEdge(e.rawObject(),t.rawObject())},t.diffMIxEdge=function(e,t){return n.diffEdge(e.rawObject(),t.rawObject())},t.diffMIxVertex=function(e,t){return n.diffVertex(e.rawObject(),t.rawObject())}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(3);function A(e,t){if(e.faces.length!==t.faces.length)return console.error("Different in faces num "+e.faces.length+" : "+t.faces.length),!1;var r=!0,n=!1,o=void 0;try{for(var A,s=function(){var e=A.value;return t.faces.some((function(t){return a(e,t)}))?"continue":(console.error("Different in face."),{v:!1})},u=e.faces[Symbol.iterator]();!(r=(A=u.next()).done);r=!0){var c=s();switch(c){case"continue":continue;default:if("object"===(void 0===c?"undefined":i(c)))return c.v}}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}return e.getEdges().size===t.getEdges().size||(console.error("Different in shell's edge number."),!1)}function a(e,t){if(e.getLoops().length!==t.getLoops().length)return!1;if(!s(e.outerLoop,t.outerLoop))return!1;if(e.innerLoops.length!==t.innerLoops.length)return!1;var r=!0,n=!1,o=void 0;try{for(var A,a=function(){var e=A.value;return t.innerLoops.some((function(t){return s(e,t)}))?"continue":{v:!1}},u=e.innerLoops[Symbol.iterator]();!(r=(A=u.next()).done);r=!0){var c=a();switch(c){case"continue":continue;default:if("object"===(void 0===c?"undefined":i(c)))return c.v}}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}return!0}function s(e,t){if(e.halfEdges.length!==t.halfEdges.length)return!1;var r=0,n=0,i=-1;for(r=0;r<e.halfEdges.length;r++){var A=e.halfEdges[r].getBoundedCurve();if(A){if(-1===i)for(n=0;n<t.halfEdges.length;n++){var a=t.halfEdges[n].getBoundedCurve();if(a&&(o.CurveOverlap.areCurvesTotallyOverlap(A,a)&&A.startPoint.isEqual(a.startPoint))){i=n;break}}if(-1===i)return!1;var s=t.halfEdges[(i+r)%t.halfEdges.length].getBoundedCurve();if(!A.isEqual(s)&&!o.CurveOverlap.areCurvesTotallyOverlap(A,s))return console.error("Different in loop."),!1}}return!0}t.diffShells=function(e,t){if(e.length!==t.length)return console.error("Shells num not equals "+e.length+" : "+t.length),!1;for(var r=new Set,n=0,i=e.length;n<i;n++){for(var o=e[n],a=!1,s=0,u=t.length;s<u;s++){if(!r.has(s))if(A(o,t[s])){r.add(s),a=!0;break}}if(!a)return!1}return!0},t.diffShell=A,t.diffFace=a,t.diffLoop=s,t.diffHalfEdge=function(e,t){var r=e.getBoundedCurve(),n=t.getBoundedCurve();return!(!o.CurveOverlap.areCurvesTotallyOverlap(r,n)||!r.startPoint.isEqual(n.startPoint))||(console.error("Different in half edge."),!1)},t.diffEdge=function(e,t){var r=e.getBoundedCurve(),n=t.getBoundedCurve();return!!o.CurveOverlap.areCurvesTotallyOverlap(r,n)||(console.error("Different in edge."),!1)},t.diffVertex=function(e,t){var r=e.point,n=t.point;return!!r.isEqual(n)||(console.error("Different in vertex"),!1)}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(2066),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,[{key:"toKey",value:function(){return i.idToKey(this.id)}},{key:"equals",value:function(e){return this.id.equals(e.id)}}],[{key:"fromKey",value:function(t){var r=new e;return r.id=i.idFromKey(t),r}},{key:"extractShellKey",value:function(e){return i.extractShellKey(e)}}]),e}();t.MIxName=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(236);t.idToKey=function(e){if(e.type===n.TopoObjectType.kShell)return e.uuid;if(e.type===n.TopoObjectType.kFace){var t=e;return t.shellId.uuid+":"+t.index}if(e.type===n.TopoObjectType.kEdge){var r=e,i="",o="",A=!0,a=!1,s=void 0;try{for(var u,c=r.halfEdgeIds[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){var l=u.value;null!=l.faceId?(i=l.faceId.shellId.uuid+":",o=o+"("+l.faceId.index+":"+l.index+")"):o=o+"(-1:"+l.index+")"}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}return i+o}if(e.type===n.TopoObjectType.kHalfEdge){var g=e;return g.faceId.shellId.uuid+":"+g.faceId.index+":"+g.index}return""},t.idFromKey=function(e){var t=void 0,r=e.split(":");if(e.endsWith(")")){var i=r[0],o=new n.ShellId(i),A=e.split("("),a=[],s=!0,u=!1,c=void 0;try{for(var l,g=A[Symbol.iterator]();!(s=(l=g.next()).done);s=!0){var f=l.value.replace(")","").split(":");if(""!==f[1]){var h=new n.FaceId(o,parseInt(f[0],void 0)),p=new n.HalfEdgeId(h,parseInt(f[1],void 0));a.push(p)}}}catch(e){u=!0,c=e}finally{try{!s&&g.return&&g.return()}finally{if(u)throw c}}t=new n.EdgeId(a)}else if(1===r.length)t=new n.ShellId(r[0]);else if(2===r.length){var d=parseInt(r[1],void 0);t=new n.FaceId(new n.ShellId(r[0]),d)}else{var I=parseInt(r[1],void 0),y=parseInt(r[2],void 0);t=new n.HalfEdgeId(new n.FaceId(new n.ShellId(r[0]),I),y)}return t},t.extractShellKey=function(e){var t=e.split(":");if(t.length>0)return t[0]}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={interceptors:!0,RequestClient:!0,parseCDN:!0,RequestClientParam:!0};Object.defineProperty(t,"RequestClient",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"parseCDN",{enumerable:!0,get:function(){return s.parseCDN}}),Object.defineProperty(t,"RequestClientParam",{enumerable:!0,get:function(){return u.RequestClientParam}}),t.interceptors=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(r,o,A):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r(31));t.interceptors=o;var A,a=(A=r(2069))&&A.__esModule?A:{default:A},s=r(1119),u=r(1120),c=r(2070);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(2072);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=i,t.default=function(e,t){if(t){var r=e[t];return void(r&&(e[t]=i(r)))}return function(t,r){var o,A,a;(0,n.isBoolean)(e)?(A=t[r],o=e):e.axios?(A=e.axios,o=e.isOss,a=e.isCoohom):A=e,A&&(t[r]=i(A,o,a))}};var n=r(2);function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.defaults.retry=!0,e.defaults.retryTimes=t?5:1,e.defaults.retryDelay=1e3,e.defaults.__retryCount=0,e.interceptors.request.use((function(e){return e.retry&&e.__retryCount&&(e.headers["x-retry"]=e.__retryCount),e})),e.interceptors.response.use(void 0,(function(t){var n=t.config;return n&&n.retry?(n.__retryCount=n.__retryCount||0,n.retryTimes=n.retryTimes||0,n.__retryCount>=n.retryTimes?Promise.reject(t):(n.__retryCount+=1,r&&n.url&&n.url.startsWith("/gateway")&&(n.url=n.url.replace("/gateway","")),new Promise((function(e){setTimeout((function(){e()}),n.retryDelay||0)})).then((function(){return e(n)})))):Promise.reject(t)})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(1)),i=o(r(661));function o(e){return e&&e.__esModule?e:{default:e}}function A(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){s=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(s)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},c=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e;return(e=t.client).request.apply(e,arguments)},this.get=function(){var e;return(e=t.client).get.apply(e,arguments)},this.delete=function(){var e;return(e=t.client).delete.apply(e,arguments)},this.post=function(){var e;return(e=t.client).post.apply(e,arguments)},this.put=function(){var e;return(e=t.client).put.apply(e,arguments)},this.encryptedRequest=function(){var e;return(e=t.encryptedClient).request.apply(e,arguments)},this.encryptedGet=function(){var e;return(e=t.encryptedClient).get.apply(e,arguments)},this.encryptedDelete=function(){var e;return(e=t.encryptedClient).delete.apply(e,arguments)},this.encryptedPost=function(){var e;return(e=t.encryptedClient).post.apply(e,arguments)},this.encryptedPut=function(){var e;return(e=t.encryptedClient).put.apply(e,arguments)},this.gzipRequest=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).request.apply(e,arguments):(r=t.encryptedClient).request.apply(r,arguments)},this.gzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).get.apply(e,arguments):(r=t.encryptedClient).get.apply(r,arguments)},this.ossGzipGet=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return u(t,void 0,void 0,n.default.mark((function e(){var t,o,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=function(){return u(this,void 0,void 0,n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.default.wasmLoaded||!(o<20)){e.next=7;break}return t=new Promise((function(e){setTimeout((function(){e()}),1e3)})),o++,e.next=5,t;case 5:return e.next=7,A();case 7:case"end":return e.stop()}}),e)})))},o=0,e.next=4,A();case 4:return e.abrupt("return",(t=this.ossGzippedEncryptClient).get.apply(t,r));case 5:case"end":return e.stop()}}),e,this)})))},this.ossDegradedGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.ossDegradedGzippedEncryptClient).get.apply(e,arguments):(r=t.ossDegradedEncryptedClient).get.apply(r,arguments)},this.pbGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).get.apply(e,arguments):(r=t.pbEncryptedClient).get.apply(r,arguments)},this.gzipDelete=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).delete.apply(e,arguments):(r=t.encryptedClient).delete.apply(r,arguments)},this.gzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).post.apply(e,arguments):(r=t.encryptedClient).post.apply(r,arguments)},this.pbGzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).post.apply(e,arguments):(r=t.pbEncryptedClient).post.apply(r,arguments)},this.gzipPut=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).put.apply(e,arguments):(r=t.encryptedClient).put.apply(r,arguments)}}var t,r,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){var t,r=A(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.request&&(this.client.interceptors.request.use(n.request.beforeSend),this.encryptedClient.interceptors.request.use(n.request.beforeSend),this.gzippedEncryptClient.interceptors.request.use(n.request.beforeSend)),n.response&&(this.client.interceptors.response.use(n.response.afterReceive),this.encryptedClient.interceptors.response.use(n.response.afterReceive),this.gzippedEncryptClient.interceptors.response.use(n.response.afterReceive))}}catch(e){r.e(e)}finally{r.f()}}}])&&s(t.prototype,r),o&&s(t,o),e}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"doTaskPolling",{enumerable:!0,get:function(){return n.doTaskPolling}});var n=r(2071)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doTaskPolling=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2?arguments[2]:void 0;return new Promise((function(n,A){var a=r;(function(e){return o(this,void 0,void 0,i.default.mark((function t(){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.taskPromise,o=e.createStatusOptions,t.abrupt("return",r.then((function(e){return o(e,{resolve:n,reject:A})})));case 2:case"end":return t.stop()}}),t)})))})(e).then((function(e){void 0!==e&&function e(t){return o(this,void 0,void 0,i.default.mark((function r(){var o,s,u,c,l,g,f;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:f=function(){setTimeout((function(){return e(t)}),l)},o=t.url,s=t.params,u=void 0===s?{}:s,c=t.interval,l=void 0===c?3e3:c,g=t.handlePolling,a(o,{params:u}).then((function(e){return g(e.data,{resolve:n,reject:A,next:f})}));case 3:case"end":return r.stop()}}),r)})))}(e)})).catch((function(e){return A(e)})),setTimeout((function(){return A("Time out")}),t)}))};var n,i=(n=r(1))&&n.__esModule?n:{default:n};var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseCode=void 0,t.ResponseCode=n,function(e){e.success="0",e.error="-1"}(n||(t.ResponseCode=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachedService=void 0;var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(47),A=r(356),a=r(2074),s=r(2075),u=r(2079),c=r(2081);function l(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=new A.ServiceConfig,this._resourceService=new s.ResourceDataService(this._config),this._paramModelGetAttachedService=new a.ParamModelGetAttachedService(this._config,this._resourceService),this._paramModelUpdateAttachedService=new c.ParamModelUpdateAttachedService(this._config,this._paramModelGetAttachedService),this._paramModelAssemblyUpdateAttachedService=new u.ParamModelAssemblyUpdateAttachedService(this._config,this._paramModelUpdateAttachedService),this._config[A.__INTERNAL__setHelper]({modelHandler:this._paramModelUpdateAttachedService.modelHandler,getAttachedsByData:this._paramModelGetAttachedService.getAttachedsByData,getRequestClient:this._config[A.__INTERNAL__getRequestClient]})}var t,r,n;return t=e,(r=[{key:"updateAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){var n,A,a,s;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.beforeAttached(),n=new Set,A=new Set,e.forEach((function(e){e instanceof o.CoreParamModel?n.add(e.getRootOrAccessory()):e instanceof o.CoreParamModelAssembly&&A.add(e)})),a=[],n.size&&a.push(this._paramModelUpdateAttachedService.updateModelAttacheds(l(n),t)),A.size&&a.push(this._paramModelAssemblyUpdateAttachedService.updateAssemblyAttacheds(l(A),t)),r.next=9,Promise.all(a);case 9:return s=r.sent,this.afterAttached(),r.abrupt("return",s);case 12:case"end":return r.stop()}}),r,this)})))}},{key:"beforeAttached",value:function(){}},{key:"afterAttached",value:function(){}},{key:"updateModelAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"updateAssemblyAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"config",get:function(){return this._config}},{key:"paramModelGetAttachedService",get:function(){return this._paramModelGetAttachedService}},{key:"paramModelUpdateAttachedService",get:function(){return this._paramModelUpdateAttachedService}}])&&f(t.prototype,r),n&&f(t,n),e}();t.AttachedService=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelGetAttachedService=void 0;var n=h(r(1)),i=h(r(700)),o=h(r(208)),A=r(1121),a=r(956),s=r(2),u=h(r(125)),c=r(717),l=r(716),g=r(1122),f=r(356);function h(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};function E(e,t){if(e.length<=0)return[];var r=e.map((function(e){return{model:e,nodeNumber:B(e)}})).sort((function(e,t){return e.nodeNumber-t.nodeNumber}));if(r[0].nodeNumber>=t)return r.map((function(e){return[e.model]}));for(var n=[],i=[],o=0,A=0,a=r.length;A<a;A++){var s=r[A];o+s.nodeNumber<=t?(o+=s.nodeNumber,i.push(s.model)):(n.push(i),i=[s.model],o=s.nodeNumber)}return i.length>0&&n.push(i),n}function B(e){return e.children.reduce((function(e,t){return e+B(t)}),1)}function v(e){var t=[],r=[];return e.forEach((function(e){t.push.apply(t,I(e.rebuildModels)),r.push.apply(r,I(e.failedModels))})),{rebuildModels:t,failedModels:r}}var m=function(){function e(t,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.resourceService=r,this.getAttachedsByModel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.map((function(e){var t=e.serialize(void 0,!0,!0);return{id:e.getId(),data:t,matrix:e.getConcatenatedMatrix()}}));return i.getAttachedsByData(r.map((function(e){return e.data})),t).then((function(e){return Object.assign(Object.assign({},e),{requestModels:r})}))},this.getAttachedsByData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C(i,void 0,void 0,n.default.mark((function r(){var i,A,a,s,u,c,l,g,f,h,p,d,y,B=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getAttachSwitch();case 2:return i=r.sent,A=i.isNew,a=i.nodeLimit,s=new o.default,A?(c=E(e,a),u=c.map((function(e){return B.requestAttacheds({paramModelDatas:e,context:s,params:t})}))):u=e.map((function(e){return B.requestAttacheds({paramModelDatas:[e],context:s,params:t})})),r.next=8,u.reduce((function(e,t){return C(B,void 0,void 0,n.default.mark((function r(){var i,o,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return i=r.sent,r.next=5,e;case 5:return(o=r.sent).attachedModels.push(i.attachedModels),i.paramModelTasks.length>0&&(A=o.paramModelTasks).push.apply(A,I(i.paramModelTasks)),r.abrupt("return",o);case 9:case"end":return r.stop()}}),r)})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 8:return l=r.sent,g=l.attachedModels,f=l.paramModelTasks,r.next=13,this.processParamModelTasks(f,s);case 13:return h=r.sent,p=h.result,d=h.errorParamModelIds,y=d.reduce((function(t,r){var n=e.find((function(e){return e.id===r}));return n&&t.push(n),t}),[]),r.abrupt("return",Object.assign(Object.assign({},v([].concat(I(g),I(p),[{rebuildModels:[],failedModels:y}]))),{requestModels:e,context:s}));case 18:case"end":return r.stop()}}),r,this)})))},this.rawRequestAttacheds=function(e){return C(i,void 0,void 0,n.default.mark((function t(){var r,i,o,A,a,u,g,h,p,d,y,C,E=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.paramModelDatas,i=e.context,o=e.params,A=e.isRetry,a=void 0!==A&&A,t.next=3,this.config[f.__INTERNAL__getParamModelBackEndParam](r,o);case 3:if(u=t.sent,g=r.map((function(e){return Object.assign({id:e.id,paramModelData:e,retryCount:a?1:void 0,calWireFrames:!0,needCustomFaceData:!1,needResourceData:!1},u)})),t.prev=5,!l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_ENABLE){t.next=12;break}return t.next=9,this.requestAttachedV4NonPb(g);case 9:h=t.sent,t.next=15;break;case 12:return t.next=14,this.originalRequestAttacheds(g);case 14:h=t.sent;case 15:return p=(0,s.map)(h.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})),t.next=18,this.applyAttachedResource(h,i);case 18:if(d=t.sent,y=(d.errorMessages||[]).reduce((function(e,t){if(t.errCode===c.PARAM_MODEL_TOO_BIG_ERROR)return e;var n=r.find((function(e){return e.id===t.paramModelId}));return n&&e.push(n),e}),[]),a||!(y.length>0)){t.next=23;break}return C={attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:[]},paramModelTasks:[]},t.abrupt("return",Promise.all([C].concat(I(y.map((function(e){return E.retryRequestAttacheds({paramModelDatas:[e],context:i,params:o,isRetry:!0})}))))).then((function(e){return{attachedModels:v((0,s.map)(e,"attachedModels")),paramModelTasks:[]}})));case 23:return t.abrupt("return",{attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:y},paramModelTasks:p});case 26:return t.prev=26,t.t0=t.catch(5),t.abrupt("return",{attachedModels:{rebuildModels:[],failedModels:r},paramModelTasks:[]});case 29:case"end":return t.stop()}}),t,this,[[5,26]])})))},this.requestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.retryRequestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.getAttachSwitch=(0,u.default)((function(){return i.config[f.__INTERNAL__getRequestClient]().get("/dcs-model/api/attach/switch").then((function(e){return e.data}),(function(){return{nodeLimit:1,isNew:!1}}))}),Object.assign({promise:!0},c.memoizeValues))}var t,r,h;return t=e,(r=[{key:"processParamModelTasks",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i,o,A,a,u;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=function(e){return C(this,void 0,void 0,n.default.mark((function r(){var c,g,f,h,p,d=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=(0,s.chunk)(e,l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_CHUNK_SIZE),r.next=3,c.reduce((function(e,r){return C(d,void 0,void 0,n.default.mark((function i(){var A,u,c,l;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,a.requestAttachedTasksNonPb(r);case 3:return u=n.sent,n.next=6,a.applyAttachedResource(u,t);case 6:return c=n.sent,n.next=9,e;case 9:l=n.sent,(A=l.paramModelTasks).push.apply(A,I((0,s.map)(u.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})))),l.attachedModels.push({rebuildModels:(0,s.uniqBy)(c.models,"id")||[],failedModels:[]}),n.next=18;break;case 14:return n.prev=14,n.t0=n.catch(0),o.push.apply(o,I((0,s.map)(r,"paramModelId"))),n.abrupt("return",e);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),i,null,[[0,14]])})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 3:if(g=r.sent,f=g.attachedModels,h=g.paramModelTasks,i.push.apply(i,I(f)),!(A<l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_COUNT&&h.length>0)){r.next=16;break}return A++,p=new Promise((function(e){setTimeout((function(){e()}),l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_DELAY||0)})),r.next=12,p;case 12:return r.next=14,u(h);case 14:r.next=17;break;case 16:o.push.apply(o,I((0,s.map)(h,"paramModelId")));case 17:case"end":return r.stop()}}),r)})))},i=[],o=[],A=0,a=this,r.next=7,u(e);case 7:return r.abrupt("return",{result:i,errorParamModelIds:o});case 8:case"end":return r.stop()}}),r,this)})))}},{key:"originalRequestAttacheds",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodel",e);case 2:return r=t.sent,t.abrupt("return",r.data);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedV4NonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model/api/c/parammodel/v4/plain",{requestData:e},{extra:{isRequestBodyJson:!0}});case 2:return r=t.sent,i=r.data,o=A.dcs_model_attach.PBParamModelResponseDataV3.decode(i).toJSON(),(0,g.removeKeys)(o,["FULL_NAME"]),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedTasksNonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model-task/api/site/parammodel/result/plain",A.dcs_model_attach.PBParamModelTaskQueryRequests.create({requests:e}));case 2:return r=t.sent,i=A.dcs_model_attach.PBParamModelResponseDataV3.decode(r.data).toJSON(),(0,g.removeKeys)(i,["FULL_NAME"]),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"applyAttachedResource",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.resourceService.updateParamModelDataWithResource(e);case 2:return i=r.sent,t.addCustomResources(i),r.abrupt("return",i);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"createParams",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var o,A,a;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e.getRootOrAccessory(),A=o.serialize(void 0,!0,!0),a={paramModelData:A,variableParams:[t]},r.next=6,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodeldata/param/update",a).then((function(e){for(var r=e.data,n=function(e){var n=r.children.find((function(r){return r.id===t.paramModelPath[e]}));if(!n)return{v:void 0};r=n},o=1;o<t.paramModelPath.length;o++){var A=n(o);if("object"===p(A))return A.v}var a=(r.params||[]).find((function(e){var r;return e.name===(null===(r=t.paramOperates[0])||void 0===r?void 0:r.param.name)}));if(a)return new i.default(a)}));case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(0),r.abrupt("return",void 0);case 12:case"end":return r.stop()}}),r,this,[[0,9]])})))}}])&&d(t.prototype,r),h&&d(t,h),e}();t.ParamModelGetAttachedService=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceDataService=void 0;var n=A(r(1)),i=A(r(2076)),o=r(356);function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g,f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};!function(e){e.Array="Array",e.Object="Object"}(g||(g={}));var h=new i.default({maxAge:36e5,max:200}),p=function(e,t,r){var n,i=u(e.keys());try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.split("_")[0]===t)if(o.split("_")[1].split(",").includes(r.toString())&&e.get(o))return o}}catch(e){i.e(e)}finally{i.f()}return""},d=function(e,t){return function(r,i,o){return f(void 0,void 0,void 0,n.default.mark((function A(){var a,s,c,l,f,d;return n.default.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:a=o===g.Array?[]:{},c=r.sort(),l=u(c),A.prev=3,d=n.default.mark((function r(){var o,A,u,l,g;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=f.value,A=p(h,i,o),u=void 0,A?(s=A,u=h.get(s)):(s="".concat(i,"_").concat(c.toString()),u=e(c),h.set(s,u)),r.prev=4,r.next=7,u;case 7:l=r.sent,Array.isArray(a)&&t?(g=l.find((function(e){return e[t.dataItemFilterField]===o})))&&a.push(g):l[o]&&(a[o]=l[o]),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(4),h.del(s);case 14:case"end":return r.stop()}}),r,null,[[4,11]])})),l.s();case 6:if((f=l.n()).done){A.next=10;break}return A.delegateYield(d(),"t0",8);case 8:A.next=6;break;case 10:A.next=15;break;case 12:A.prev=12,A.t1=A.catch(3),l.e(A.t1);case 15:return A.prev=15,l.f(),A.finish(15);case 18:return A.abrupt("return",a);case 19:case"end":return A.stop()}}),A,null,[[3,12,15,18]])})))}},I=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSpecificProductData=function(e){return function(t){return f(r,void 0,void 0,n.default.mark((function r(){var i,A=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.length){r.next=2;break}return r.abrupt("return",[]);case 2:return r.next=4,d((function(t){return f(A,void 0,void 0,n.default.mark((function r(){var i,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 3:return i=r.sent,A=i.data,r.abrupt("return",null==A?void 0:A.d[e]);case 8:return r.prev=8,r.t0=r.catch(0),r.abrupt("return",[]);case 11:case"end":return r.stop()}}),r,this,[[0,8]])})))}),{dataItemFilterField:"brandGoodId"})(t,e,g.Array);case 4:return i=r.sent,r.abrupt("return",i);case 6:case"end":return r.stop()}}),r)})))}},this.resourceObtainList=[{targetField:"hardwares",idField:"hardwareBgIds",handler:this.getSpecificProductData("hardwares"),dataType:g.Array},{targetField:"textures",idField:"textureBgIds",handler:this.getSpecificProductData("textures"),dataType:g.Array},{targetField:"virtualModels",idField:"virtualModelBgIds",handler:this.getSpecificProductData("virtualModels"),dataType:g.Array},{targetField:"paramModelProducts",idField:"paramModelBgIds",handler:this.getSpecificProductData("paramModelProducts"),dataType:g.Array},{targetField:"moldings",idField:"moldingBgIds",handler:this.getSpecificProductData("moldings"),dataType:g.Array},{targetField:"paramPackages",idField:"obsParamPackageIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/parampackage",{obsParamPackageIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"id"}),dataType:g.Array},{targetField:"displayInfoMap",idField:"hardwareBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displayinfo",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"displayInfoMap",idField:"textureBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displaymaterial",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"fitRules",idField:"obsRuleIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/fitrule",{obsRuleIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"obsRuleId"}),dataType:g.Array}]}var t,r,i;return t=e,(r=[{key:"updateParamModelDataWithResource",value:function(e){return f(this,void 0,void 0,n.default.mark((function t(){var r,i=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.assign({},e),t.next=3,Promise.all(this.resourceObtainList.map((function(e){return f(i,void 0,void 0,n.default.mark((function t(){var i,o,A,s,u,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.targetField,o=e.idField,A=e.handler,s=e.dataType,!(u=r[o]||[]).length){t.next=7;break}return t.next=5,A(u,i,s);case 5:c=t.sent,s===g.Array?r[i]=r[i]?[].concat(a(r[i]),a(c)):c:r[i]=r[i]?Object.assign(Object.assign({},r[i]),c):c;case 7:case"end":return t.stop()}}),t)})))})));case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t,this)})))}}])&&s(t.prototype,r),i&&s(t,i),e}();t.ResourceDataService=I},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(2077),A=Symbol("max"),a=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),g=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=function(){return 1},I=function(){function e(t){if(n(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[A]=t.max||1/0;var r=t.length||d;if(this[s]="function"!=typeof r?d:r,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0,this[l]=t.dispose,this[g]=t.noDisposeOnSet||!1,this[p]=t.updateAgeOnGet||!1,this.reset()}var t,r,I;return t=e,(r=[{key:"max",get:function(){return this[A]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[A]=e||1/0,E(this)}},{key:"allowStale",get:function(){return this[u]},set:function(e){this[u]=!!e}},{key:"maxAge",get:function(){return this[c]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,E(this)}},{key:"lengthCalculator",get:function(){return this[s]},set:function(e){var t=this;"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[a]=0,this[f].forEach((function(e){e.length=t[s](e.value,e.key),t[a]+=e.length}))),E(this)}},{key:"length",get:function(){return this[a]}},{key:"itemCount",get:function(){return this[f].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var r=this[f].tail;null!==r;){var n=r.prev;m(this,e,r,t),r=n}}},{key:"forEach",value:function(e,t){t=t||this;for(var r=this[f].head;null!==r;){var n=r.next;m(this,e,r,t),r=n}}},{key:"keys",value:function(){return this[f].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[f].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[l]&&this[f]&&this[f].length&&this[f].forEach((function(t){return e[l](t.key,t.value)})),this[h]=new Map,this[f]=new o,this[a]=0}},{key:"dump",value:function(){var e=this;return this[f].map((function(t){return!C(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[f]}},{key:"set",value:function(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");var n=r?Date.now():0,i=this[s](t,e);if(this[h].has(e)){if(i>this[A])return B(this,this[h].get(e)),!1;var o=this[h].get(e).value;return this[l]&&(this[g]||this[l](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[a]+=i-o.length,o.length=i,this.get(e),E(this),!0}var u=new v(e,t,i,n,r);return u.length>this[A]?(this[l]&&this[l](e,t),!1):(this[a]+=u.length,this[f].unshift(u),this[h].set(e,this[f].head),E(this),!0)}},{key:"has",value:function(e){if(!this[h].has(e))return!1;var t=this[h].get(e).value;return!C(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[f].tail;return e?(B(this,e),e.value):null}},{key:"del",value:function(e){B(this,this[h].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{var o=i-t;o>0&&this.set(n.k,n.v,o)}}}},{key:"prune",value:function(){var e=this;this[h].forEach((function(t,r){return y(e,r,!1)}))}}])&&i(t.prototype,r),I&&i(t,I),e}(),y=function(e,t,r){var n=e[h].get(t);if(n){var i=n.value;if(C(e,i)){if(B(e,n),!e[u])return}else r&&(e[p]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return i.value}},C=function(e,t){if(!t||!t.maxAge&&!e[c])return!1;var r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},E=function(e){if(e[a]>e[A])for(var t=e[f].tail;e[a]>e[A]&&null!==t;){var r=t.prev;B(e,t),t=r}},B=function(e,t){if(t){var r=t.value;e[l]&&e[l](r.key,r.value),e[a]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}},v=function e(t,r,i,o,A){n(this,e),this.key=t,this.value=r,this.length=i,this.now=o,this.maxAge=A||0},m=function(e,t,r,n){var i=r.value;C(e,i)&&(B(e,r),e[u]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=I},function(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function A(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)A(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,n=this.head;null!==n&&r<e;r++)n=n.next;var o=[];for(r=0;n&&r<t;r++)o.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(r=0;r<(arguments.length<=2?0:arguments.length-2);r++)n=i(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(2078)(n)}catch(e){}},function(e,t,r){"use strict";r.r(t),function(e){var t=r(1),n=r.n(t);e.exports=function(e){e.prototype[Symbol.iterator]=n.a.mark((function e(){var t;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}}.call(this,r(840)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyUpdateAttachedService=void 0;var n,i=(n=r(208))&&n.__esModule?n:{default:n},o=r(243),A=r(2),a=r(356),s=r(2080);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.paramModelService=r}var t,r,n;return t=e,(r=[{key:"updateAssemblyAttacheds",value:function(e,t){var r=this,n=Object.assign(Object.assign({},this.config[a.__INTERNAL__getDefaultParams]()),t),i=this.config[a.__INTERNAL__chunkParamAssemblyModels](e,n).map((function(e){return r.updateAssemblyAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(i)}},{key:"updateAssemblyAttachedsInternal",value:function(e,t){var r=[],n=[];e.forEach((function(e){e.isTemplateAssembly()?r.push(e):n.push(e)}));var i=[];return n.length>0&&i.push(this.updateInstanceAttacheds(n,t)),r.length>0&&i.push(this.updateTemplateAttacheds(r,t)),Promise.all(i)}},{key:"updateInstanceAttacheds",value:function(e,t){var r=(0,A.flatMap)(e,(function(e){return e.getParamModels()}));return this.paramModelService.updateModelAttacheds(r,t)}},{key:"updateTemplateAttacheds",value:function(e,t){var r=this,n=t.excludeAccessories,i=e.map((function(e){return r.updateTemplateAttached(e,t)}));if(!n){var a=(0,A.flatMap)(e,(function(e){return o.ParamModelUtils.collectAccessories(e.getParamModels())}));a.length>0&&i.push(this.paramModelService.updateModelAttacheds(a,t))}return Promise.all(i)}},{key:"updateTemplateAttached",value:function(e,t){var r=t.applyTransform,n=e.serialize(void 0,!1,{includeAccessory:!1,isRootWorldMatrix:!0});return(0,s.getTemplateAttachedByData)(n,t,this.config).then((function(t){var n=new i.default;n.addCustomResources(t);var o=e.getPosition().clone(),A=e.getRotation().clone(),a=t.assemblyDatas[0];if(a)e.parse(a,n,{isRootWorldMatrix:!0});else{e.applyResource(n,!0);var s,c=e.getMatrix4(),l=u(e.getParamModels());try{for(l.s();!(s=l.n()).done;){var g=s.value;g.setMatrix4(c.clone().multiply(g.getMatrix4()))}}catch(e){l.e(e)}finally{l.f()}}("function"==typeof r?r(e.getId()):r)||e.updateTransform(o,A),e.setHasAttached(!0),e.getParamModels().forEach((function(e){return e.setHasAttached(!0)}))}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyUpdateAttachedService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateAttachedByData=function(e,t,r){return A(this,void 0,void 0,i.default.mark((function n(){var A,a,s;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r[o.__INTERNAL__getParamModelAssemblyBackEndParam]([e],t);case 2:return A=n.sent,a=[Object.assign({id:e.id,assemblyData:e,calWireFrames:!0},A)],n.next=6,r[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/assemblymodel",a);case 6:return s=n.sent,n.abrupt("return",s.data);case 8:case"end":return n.stop()}}),n)})))};var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(356);var A=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelUpdateAttachedService=void 0;var n=r(243),i=r(356),o=r(2082);function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAttached=r,this.modelHandler=function(e,t){var r=t.applyTransform;return n.getAttached.getAttachedsByModel(e,t).then((function(t){return n.applyAttached(e,t,r)}))},this.applyAttached=function(e,t,r){var n=t.rebuildModels,i=t.failedModels,A=t.context,a=t.requestModels;e.forEach((function(e){if(e.setHasAttached(!0),i.find((function(t){return t.id===e.id})))e.setLegal(!1);else{var t=e.getMatrix4(),s=e.getPosition().clone(),u=e.getRotation().clone(),c=n.find((function(t){return t.id===e.id}));c?e.parse(c,A):e.applyResource(A,!0);var l=a?a.find((function(t){return t.id===e.id})).matrix:void 0,g=e.getMatrix4();(0,o.handleTransform)(e,{applyTransform:r,position:s,rotation:u,matrix:t,requestMatrix:l,responseMatrix:g})}}))}}var t,r,a;return t=e,(r=[{key:"updateModelAttacheds",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},this.config[i.__INTERNAL__getDefaultParams]()),r),o=this.config[i.__INTERNAL__chunkParamModels](e,n),A=o.map((function(e){return t.updateAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(A)}},{key:"updateAttachedsInternal",value:function(e,t){return t.excludeAccessories||(e=n.ParamModelUtils.flattenModels(e)),this.modelHandlerWrapper(e,t)}},{key:"modelHandlerWrapper",value:function(e,t){var r=this,n=new Map,o=this.config[i.__INTERNAL__getParamModelHandlers]();e.forEach((function(e){var t=o.find((function(t){return t.filter(e)})),i=t?t.attachHandler:r.modelHandler,A=n.get(i);void 0===A&&(A=[],n.set(i,A)),A.push(e)}));var A=[];return n.forEach((function(e,r){return A.push(r(e,t))})),Promise.all(A)}}])&&A(t.prototype,r),a&&A(t,a),e}();t.ParamModelUpdateAttachedService=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleTransform=function(e,t){var r=t.applyTransform,o=t.position,A=t.rotation,a=t.matrix,s=t.requestMatrix,u=t.responseMatrix;if("function"==typeof r?r(e.getId()):r){if(!a||!s||!u)return;if(!n.default.equals(s,a)){var c=(new i.default).getInverse(s).premultiply(a);e.setMatrix4(u.clone().premultiply(c))}}else{if(!o||!A)return;e.setPosition(o),e.setRotation(A)}};var n=o(r(114)),i=o(r(44));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2084);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2089);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelDataService=void 0;var n=p(r(1)),i=r(47),o=r(10),A=r(1121),a=p(r(5)),s=p(r(125)),u=r(2085),c=r(1123),l=r(717),g=r(716),f=r(1122),h=r(108);function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},y=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.noCacheGetParamModelDataByBrandGoodId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return I(r,void 0,void 0,n.default.mark((function r(){var i,o,a,s;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!g.COMMON_ENV.PARAM_MODEL_DATA_PB_ENABLE){r.next=18;break}return i=u.util.toJSONOptions.defaults||!0,u.util.toJSONOptions.defaults=!0,r.prev=3,r.next=6,this.config.requestClient.pbGzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"/v2?cache=").concat(t));case 6:return o=r.sent,a=A.dcs_model.PBParamModelViewData.decode(o.data).toJSON(),(0,f.removeKeys)(a,["FULL_NAME"]),r.abrupt("return",a);case 12:return r.prev=12,r.t0=r.catch(3),r.abrupt("return",Promise.reject(r.t0));case 15:return r.prev=15,u.util.toJSONOptions.defaults=i,r.finish(15);case 18:return r.next=20,this.config.requestClient.gzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"?cache=").concat(t));case 20:return s=r.sent,r.abrupt("return",s.data);case 22:case"end":return r.stop()}}),r,this,[[3,12,15,18]])})))},this.getParamModelDataByBrandGoodId=(0,s.default)((function(e){return r.noCacheGetParamModelDataByBrandGoodId(e,!0)}),Object.assign({promise:!0},l.memoizeValues))}var t,r,p;return t=e,(r=[{key:"getParamModelByProduct",value:function(e){return I(this,void 0,void 0,n.default.mark((function t(){var r,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getParamModelDataByBrandGoodId(e.brandGoodId);case 2:return r=t.sent,o=(new this.config.paramModelConstructor).parse(r.paramModelData,(new i.CoreCustomContext).addProduct(e)),(0,h.attach)(o,(0,h.toAttachedMap)(r)),o.setSize(this.calcSizeByProduct(o,e)),o.assignUniqueId(),(0,c.updatePositionByOffGround)(o,0),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"calcSizeByProduct",value:function(e,t){var r=t.size;return new a.default(r&&r.x||e.getParsedValue(o.ParamName.WIDTH),r&&r.y||e.getParsedValue(o.ParamName.DEPTH),r&&r.z||e.getParsedValue(o.ParamName.HEIGHT))}}])&&d(t.prototype,r),p&&d(t,p),e}();t.ParamModelDataService=y},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeInferBoundingBox=u,t.computeInferBoxHeight=function(e){var t=u(e).boundingBox;return Math.abs(t.max.z-t.min.z)};var n=s(r(417)),i=s(r(141)),o=s(r(98)),A=s(r(44)),a=s(r(5));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.getPosition().clone(),r=e.getRotation().clone(),s=e.getBox3(),u=n.default.reorderToBackend(r).z,c=(new A.default).compose(t.clone().negate(),(new o.default).setFromVector3(new a.default(0,0,-u))),l=s.getPoints().map((function(e){return e.clone().applyMatrix4(c)}));return{boundingBox:(new i.default).setFromPoints(l),position:t,rotationZ:u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isModelTop=function(e){return!(e instanceof n.CoreParamModel)||e.isRoot()&&!e.getAssembly()};var n=r(47)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTransform=function(e,t){var r=t.position,n=t.rotation,a=t.scale;if(e instanceof i.CoreParamModel)r&&e.setPosition(r),n&&e.setRotation(n),a&&e.setScale(a);else{var s=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getPosition(),"x","y","z")),r)),u=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getRotation(),"x","y","z")),n)),c=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getScale(),"x","y","z")),a));e.updateTransform(s,u,c)}};var n,i=r(47),o=(n=r(5))&&n.__esModule?n:{default:n},A=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyDataService=void 0;var n,i=r(47),o=r(1089),A=r(518),a=(n=r(125))&&n.__esModule?n:{default:n},s=r(1123),u=r(717),c=r(108);function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAssemblyDataByBrandGoodId=(0,a.default)((function(e,t){return r.config.requestClient.gzipGet("/dcs-model/api/c/assemblydata",{params:{bgid:e,assemblycollectiondataid:t}}).then((function(e){return e.data}))}),Object.assign({promise:!0},u.memoizeValues))}var t,r,n;return t=e,(r=[{key:"getAssemblyByProduct",value:function(e,t){return this.getAssemblyDataByBrandGoodId(t.brandGoodId,t.assemblyCollectionDataId).then((function(r){var n,a=r.assemblyData;(0,A.isAssemblyCollectionProduct)(t)?(a.collectBrandGoodId||(a=Object.assign(Object.assign({},a),{collectBrandGoodId:t.brandGoodId})),n=t.assembly):n=!0;var u=(0,o.parseAssembly)(a,new i.CoreCustomContext,n,e.paramModelAssemblyConstructor);return(0,c.attach)(u,(0,c.toAttachedMap)(r)),(0,s.updatePositionByOffGround)(u,0),u.assignUniqueId()}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyDataService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={response:{afterReceive:function(e){if(e.headers&&e.headers.hasOwnProperty("x-qunhe-bizcode")){var t={errorCodeData:e.data,response:e};return Promise.reject(t)}return e}}};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.point=e,this.offset=t};t.default=n},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.lengths=e,this.intersections=[]}return e.prototype.addIntersection=function(e){this.intersections.push(e)},e.prototype.getPoints=function(){return this.intersections.map((function(e){return e.point}))},e.prototype.getPointsInside=function(e){var t,r,i=[];try{for(var o=n(this.intersections),A=o.next();!A.done;A=o.next()){var a=A.value;a.offset.x>-e&&a.offset.x<this.lengths.x+e&&a.offset.y>-e&&a.offset.y<this.lengths.y+e&&i.push(a.point)}}catch(e){t={error:e}}finally{try{A&&!A.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i},e}();t.default=i},function(e,t,r){},function(e,t,r){"use strict";r.r(t),r.d(t,"FittingDesignService",(function(){return Dv})),r.d(t,"IntersectedService",(function(){return sm})),r.d(t,"CustomModelService",(function(){return ym})),r.d(t,"FittingHintService",(function(){return _m})),r.d(t,"FittingModelService",(function(){return km})),r.d(t,"ECameraMode",(function(){return Om})),r.d(t,"ECameraMoveDirection",(function(){return Lm})),r.d(t,"ModelCameraService",(function(){return Km})),r.d(t,"ModelHintService",(function(){return eQ})),r.d(t,"ModelService",(function(){return hQ})),r.d(t,"ESelectedType",(function(){return vQ})),r.d(t,"ESetSelectType",(function(){return mQ})),r.d(t,"ModelViewerSelectionService",(function(){return _Q})),r.d(t,"ModelViewerSelectionV2Service",(function(){return OQ})),r.d(t,"ModelViewerService",(function(){return KQ})),r.d(t,"PlankPathService",(function(){return hb})),r.d(t,"ModelValidateService",(function(){return mb})),r.d(t,"SceneService",(function(){return Mb})),r.d(t,"Application",(function(){return __})),r.d(t,"EIntersectedCreatedType",(function(){return f})),r.d(t,"EIntersectedType",(function(){return l})),r.d(t,"EFittingType",(function(){return c})),r.d(t,"EIntersectedInfoType",(function(){return g})),r.d(t,"ELanguage",(function(){return ve})),r.d(t,"FITTING_PARAM_GEOMETRY_COLOR_KEY",(function(){return Se})),r.d(t,"FITTING_PARAM_GEOMETRY_OPACITY_KEY",(function(){return we})),r.d(t,"CUSTOM_MODEL_CATEGORY_FILTER",(function(){return De})),r.d(t,"EPointType",(function(){return w})),r.d(t,"ELineType",(function(){return D})),r.d(t,"EDesignMode",(function(){return Qe})),r.d(t,"ETriggerType",(function(){return be})),r.d(t,"EModelType",(function(){return _e})),r.d(t,"KEYBOARD_KEY",(function(){return xe})),r.d(t,"EIntersectModelType",(function(){return I})),r.d(t,"EProductDirection",(function(){return y})),r.d(t,"EPlankPathType",(function(){return Re})),r.d(t,"EElementType",(function(){return Me})),r.d(t,"EToolType",(function(){return Cg}));r(733),r(1346);var n,i,o,A,a=r(1),s=r.n(a),u=r(3);!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL",e.ORDER_AUDIT="ORDER_AUDIT",e.FOP_ORDER="FOP_ORDER",e.DOOR_COVERING_HARDWARE="DOOR_COVERING_HARDWARE"}(n||(n={})),function(e){e.TRUE="true",e.FALSE="false"}(i||(i={})),function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(o||(o={})),function(e){e.Intersect="intersect",e.Validity="validity",e.Rule="rule"}(A||(A={}));var c,l,g,f,h,p,d,I,y,C,E,B,v,m,Q,b,_,S,w,D,R,M,x,P="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),F=new Array(36);function O(e,t,r){return void 0===r&&(r="-"),[t,e].map((function(e){return e.replace(new RegExp("^"+r+"+|"+r+"+$","g"),"")})).filter((function(e){return!!e.trim()})).join(r)}!function(e){e[e.GROOVE=1]="GROOVE",e[e.HOLE=2]="HOLE",e[e.HARDWARE=3]="HARDWARE",e[e.HARDWARE_GROOVE=4]="HARDWARE_GROOVE",e.INTERSECTED="intersected"}(c||(c={})),function(e){e.SHELL="1",e.FACE="2",e.THROUGH_SHELL="3"}(l||(l={})),function(e){e.SHELL="1",e.THROUGH_SHELL="3"}(g||(g={})),function(e){e[e.BOTH_PLANK=0]="BOTH_PLANK",e[e.PLANK_FURNITURE=1]="PLANK_FURNITURE"}(f||(f={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.LOCK=1]="LOCK",e[e.UNLOCK=2]="UNLOCK",e[e.RAW=3]="RAW"}(h||(h={})),function(e){e.Space="spaceDivision"}(p||(p={})),function(e){e[e.CAD=7]="CAD",e[e.JPG=2]="JPG",e[e.PDF=3]="PDF"}(d||(d={})),function(e){e[e.PLANK=0]="PLANK",e[e.HARDWARE=1]="HARDWARE",e[e.PRODUCT=2]="PRODUCT"}(I||(I={})),function(e){e[e.XY=0]="XY",e[e.YZ=1]="YZ",e[e.XZ=2]="XZ"}(y||(y={})),function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(C||(C={})),function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=6]="TEMPLATE_ASSEMBLY"}(E||(E={})),function(e){e.MINIAPP_APPEND="$$miniappAppend"}(B||(B={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE",e[e.BZ_STORE=2]="BZ_STORE"}(v||(v={})),function(e){e.NAME="name",e.REMARK="remark",e.POSITION="position",e.ROTATION="rotation",e.TOOL_TYPE="toolType",e.POSITION_FORMULA="positionFormula",e.ROTATION_FORMULA="rotationFormula"}(m||(m={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(Q||(Q={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(b||(b={})),function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(_||(_={})),function(e){e.number="number",e.string="string",e.boolean="boolean"}(S||(S={})),function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE",e[e.ELLIPSE=4]="ELLIPSE"}(w||(w={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(D||(D={})),function(e){e.Wardrobe="Wardrobe",e.WardrobeCopy="WardrobeCopy",e.Cabinet="Cabinet",e.CabinetCopy="CabinetCopy",e.DoorWindow="DoorWindow",e.DoorWindowCopy="DoorWindowCopy",e.CustomGroup="CustomGroup"}(R||(R={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(M||(M={})),function(e){e.Design="Design",e.Audit="Audit",e.Production="Production"}(x||(x={}));var L,k,N,G,U,j,V,Y=[[M.Cabinet,0],[M.Wardrobe,1],[M.DoorWindow,2],[M.CabinetCopy,4],[M.WardrobeCopy,5],[M.DoorWindowCopy,6]],H=[[x.Design,0],[x.Audit,1],[x.Production,2]],K=new Map(Y),q=(new Map(H),new Map(Y.map((function(e){return e.reverse()}))),new Map(H.map((function(e){return e.reverse()}))),[[M.Cabinet,R.Cabinet],[M.Wardrobe,R.Wardrobe],[M.DoorWindow,R.DoorWindow],[M.CabinetCopy,R.CabinetCopy],[M.WardrobeCopy,R.WardrobeCopy],[M.DoorWindowCopy,R.DoorWindowCopy]]),J=new Map(q);new Map(q.map((function(e){return e.reverse()})));function W(e,t){return void 0===t&&(t=!1),t?R.CustomGroup:J.get(e)}!function(e){e.waiting="waiting",e.assigned="assigned",e.running="running",e.finished="finished",e.abnormal="abnormal",e.failed="failed"}(L||(L={})),function(e){e.BODY="BODY",e.BACK="BACK",e.DOOR="DOOR"}(k||(k={})),function(e){e.LineSeg="LineSeg",e.Arc="Arc"}(N||(N={})),function(e){e.PLANK="PLANK",e.FITTING="FITTING",e.AUXILIARY="AUXILIARY"}(G||(G={})),function(e){e.PLANK="PLANK",e.FITTING="FITTING",e.AUXILIARY="AUXILIARY",e.LAMELLO="LAMELLO",e.LOCK="LOCK"}(U||(U={})),function(e){e.SQUARE="SQUARE",e.ROUND_CORNER="ROUND_CORNER",e.PATH="PATH",e.SPECIAL_SHAPED="SPECIAL_SHAPED"}(j||(j={})),function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(V||(V={}));
67
67
  /*! *****************************************************************************
68
68
  Copyright (c) Microsoft Corporation.
69
69
 
@@ -78,12 +78,12 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
78
78
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
79
79
  PERFORMANCE OF THIS SOFTWARE.
80
80
  ***************************************************************************** */
81
- var z=function(){return(z=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function X(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}function Z(e,t){var r,n,i,o,A={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;A;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return A.label++,{value:o[1],done:!1};case 5:A.label++,n=o[1],o=[0];continue;case 7:o=A.ops.pop(),A.trys.pop();continue;default:if(!(i=A.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){A=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){A.label=o[1];break}if(6===o[0]&&A.label<i[1]){A.label=i[1],i=o;break}if(i&&A.label<i[2]){A.label=i[2],A.ops.push(o);break}i[2]&&A.ops.pop(),A.trys.pop();continue}o=t.call(e,A)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function $(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function ee(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($(arguments[t]));return e}var te=function(){function e(){this.namespace=""}return e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getValue=function(){return function(e,t){if(null!=e){if(t===S.boolean)return Boolean(parseFloat(e));if(t===S.number)return parseFloat(e)}return e}(this.value,this.type)},e.prototype.getNamespace=function(){return this.namespace},e.prototype.setValue=function(e){var t;if(!this.readonly&&this.ref){var r=null!==(t=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==t?t:1024,n=function(e,t){if(t===S.boolean)return e?"1":"0";return e.toString()}(e,this.type);if(function(e){for(var t=e.length,r=e.length-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:v.BZ_STORE,attr:O(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},e.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:v.BZ_STORE,attr:O(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},e.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},e}();function re(e,t,r){void 0===r&&(r=["W","D","H"]);var n=t.getParent();if(!(null==n?void 0:n.productId))throw new Error("model not support set formula");if(-1===n.getChild().findIndex((function(e){return e.id===t.id})))throw new Error("only child support set formula");for(var i=/#([a-zA-z$_][a-zA-Z$_\d]*)/g,o=null;o=i.exec(e);)if(!r.includes(o[1])&&!n.hasParam(o[1]))throw new Error(o[0]+" not available!")}var ne=function(){function e(){this.data={name:"",displayName:"",type:_.FIT,value:""}}return e.prototype.getValue=function(){return this.data.value},e.prototype.setValue=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:v.STORE,attr:this.data.name},this.getValue(),e),this.data.value=e,this.data.formula=void 0)},e.prototype.getFormula=function(){return this.data.formula},e.prototype.setFormula=function(e){this.getEditable()&&this.ref&&"function"==typeof this.ref.__trackUpdateField&&(re(e,this.ref),this.ref.__trackUpdateField({type:v.STORE,attr:this.data.name},this.getFormula(),e),this.data.formula=e)},e.prototype.toJSON=function(){return this.data},e.prototype.getMin=function(){return this.data.min},e.prototype.getEditable=function(){return!0===this.data.editable},e.prototype.getMax=function(){return this.data.max},e.prototype.getOptionValues=function(){return this.data.optionValues||[]},e.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},e.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},e.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},e.prototype.setPrimitiveOverride=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:v.STORE,attr:this.data.name},this.data.primitiveOverride,e),this.data.primitiveOverride=e)},e.prototype.getStep=function(){return this.data.step},e.prototype.getType=function(){return this.data.type},e.prototype.getParsedValue=function(){return this.getValue()},e.prototype.setParsedValue=function(e){return this.setValue(e)},e}();function ie(e){var t=new ne;return t.data=e,t}var oe,Ae,ae,se,ue,ce=function(){function e(e){this.option=e,this._changeMap={}}return Object.defineProperty(e.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),e.prototype.getRoot=function(e){var t=this.isRoot?this:this.root;if(e)for(var r;r=null==t?void 0:t.getParent();)t=r.getRoot()||t;return t},e.prototype.clone=function(){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&this.type===E.PARAM_PRIMITIVE)throw new Error("Primitive model don't support to clone!");var r=this.toJSON(),n=e.deserialize(JSON.stringify(r));return n._changeMap.cloned=!0,n._changeMap.forceUpdate=void 0,n._changeMap.originId||(n._changeMap.originId=n.id),n.id=function(){for(var e=0,t=0;t<36;t++)if(8===t||13===t||18===t||23===t)F[t]="-";else if(14===t)F[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,F[t]=P[19===t?3&r|8:r]}return F.join("")}(),n},e.prototype.getName=function(){return this.name},e.prototype.setName=function(e){this.__trackUpdateField({type:v.ATTRIBUTE,attr:"name"},this.name,e),this.name=e},e.prototype.getRemark=function(){return this.remark},e.prototype.setRemark=function(e){this.__trackUpdateField({type:v.ATTRIBUTE,attr:m.REMARK},this.remark,e),this.remark=e},e.prototype.setRotate=function(e){this.setRotation(e)},e.prototype.getRotate=function(){return this.getRotation()},e.prototype.setRotation=function(e){var t,r,n=this;if(null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate){var i=this.getRoot(!0).type,o=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(e){return e===n}));if((i===E.PARAM_ASSEMBLY||i===E.TEMPLATE_ASSEMBLY)&&o)throw new Error("Accessory under Assembly don't support to set rotation!")}this.__trackUpdateField({type:v.ATTRIBUTE,attr:m.ROTATION,mutexAttr:m.ROTATION_FORMULA},this.rotation,e);var A=e.x,a=e.y,s=e.z;this.rotation={x:A,y:a,z:s}},e.prototype.getRotation=function(){return this.rotation},e.prototype.getRotationFormula=function(){return this.rotationFormula},e.prototype.setRotationFormula=function(e){var t=e.x,r=e.y,n=e.z;re(t,this),re(r,this),re(n,this),this.__trackUpdateField({type:v.ATTRIBUTE,attr:m.ROTATION_FORMULA,mutexAttr:m.ROTATION},this.rotationFormula,e),this.rotationFormula={x:t,y:r,z:n}},e.prototype.setPosition=function(e){var t,r,n=this;if(null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate){var i=this.getRoot(!0).type,o=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(e){return e===n}));if((i===E.PARAM_ASSEMBLY||i===E.TEMPLATE_ASSEMBLY)&&o)throw new Error("Accessory under Assembly don't support to set position!")}this.__trackUpdateField({type:v.ATTRIBUTE,attr:m.POSITION,mutexAttr:m.POSITION_FORMULA},this.position,e);var A=e.x,a=e.y,s=e.z;this.position={x:A,y:a,z:s}},e.prototype.getPosition=function(){return this.position},e.prototype.getPositionFormula=function(){return this.positionFormula},e.prototype.setPositionFormula=function(e){var t=e.x,r=e.y,n=e.z;re(t,this),re(r,this),re(n,this),this.__trackUpdateField({type:v.ATTRIBUTE,attr:m.POSITION_FORMULA,mutexAttr:m.POSITION},this.positionFormula,e),this.positionFormula={x:t,y:r,z:n}},e.prototype.getToolType=function(){return this.toolType},e.prototype.setToolType=function(e){var t=K.get(e),r=(this.option||{}).allowToolTypes;if(this._origin===C.BRANDGOOD&&void 0!==t&&r){if(!r.includes(t))throw new Error("the custom model not support "+e+" tool");return this.__trackUpdateField({type:v.ATTRIBUTE,attr:m.TOOL_TYPE},this.toolType,e),void(this.toolType=e)}throw new Error("the custom model not support set tool type!")},e.prototype.dispose=function(){if(this.getRoot()._origin!==C.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&le(this,e,!1),!this.children.some((function(t){return t.id===e.id}))){e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:Q.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&le(this,e,!0),!this.accessories.some((function(t){return t.id===e.id}))){e.root=void 0,e._parent=this,this.accessories.push(e);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:Q.ACCESSORY,linkId:e.id})}},e.prototype.getParam=function(e){var t=this.params.get(e);return t&&!t.ref&&(t.ref=this),t},e.prototype.hasParam=function(e){return this.params.has(e)},e.prototype.getBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=O(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:""),o=this.bzProperties.get(i);return o&&!o.ref&&(o.ref=this),o},e.prototype.hasBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=O(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(i)},e.prototype.removeBzProperty=function(e,t){return!!this.hasBzProperty(e,t)&&(this.getBzProperty(e,t).remove(),!0)},e.prototype.toJSON=function(e,t){void 0===t&&(t=!0);var r=t&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,rotationFormula:r.rotationFormula,positionFormula:r.positionFormula,size:r.size,option:r.option,params:Array.from(r.params).map((function(e){var t=$(e,2);return[t[0],t[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(e){var t=$(e,2);return[t[0],t[1].toJSON()]})),productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(e){return e.toJSON(void 0,!1)})),accessories:r.accessories.map((function(e){return e.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin,legal:r.legal};return t&&r!==this&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(t){var r=this,n=JSON.parse(t);return function e(t,r,n,i){void 0===r&&(r=new Map);void 0===i&&(i=function(e,t){return new ce(e.option)});var o=i(t,n);o.id=t.id,o.type=t.type,o.name=t.name,o.remark=t.remark,o.position=t.position,o.rotation=t.rotation||t.rotate,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],ie(e[1])]}))),o.bzProperties=new Map((t.bzProperties||[]).map((function(e){return[e[0],(t=e[1],r=new te,Object.assign(r,t),r)];var t,r}))),o.positionFormula=t.positionFormula,o.rotationFormula=t.rotationFormula,o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o.toolType=t.toolType,o._origin=t._origin,o._changeMap=t._changeMap,o.legal=t.legal,!t.isRoot&&n&&(o.root=n);r.set(o.id,o);var A=o.isRoot?o:n;if(o.children=t.children.map((function(t){return e(t,r,A||o,i)})),o.accessories=t.accessories.map((function(t){return e(t,r,A||o,i)})),ee(o.children,o.accessories).forEach((function(e){return e._parent=o})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(n,void 0,void 0,(function(t,i){return void 0!==n._currentId||i?n._currentId===t.id?r:new e(t.option):(r.option=n.option,r)}))},e.serialize=function(e){return e.serialize()},e.deserialize=function(t){var r=new e;return r.deserialize(t),r},e.prototype.__trackUpdateField=function(e,t,r){var n=this._changeMap.update;n||(n=[]),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&(n.push(e),void 0!==e.mutexAttr&&(n=n.filter((function(t){return t.attr!=e.mutexAttr}))),this._changeMap.update=n)},e.prototype.getParent=function(){var e=this;if(this._parent)return this._parent;var t=function(t){return t.id===e.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var i=n.getChild(),o=n.getAccessory();if(i.some(t)||o.some(t))return this._parent=n,n;r.push.apply(r,ee(i)),r.push.apply(r,ee(o))}},e.prototype.forceUpdate=function(e){if(void 0===e&&(e=!0),!this.productId)throw new Error("Can't force-update model without productId");if(this._origin!==C.SENSE||!this.isRoot)throw new Error("only the root param models in design support force update!");this._changeMap.forceUpdate=e},e.prototype.getElementId=function(){var e=this.id,t=this.toolType,r=this.modelType;return r===b.ASSEMBLY||r===b.TEMPLATE_ASSEMBLY?{id:e,type:R.CustomGroup}:t?{id:e,type:W(t)}:void 0},e}();function le(e,t,r){var n=r?"accessory":"child";if([E.PARAM_ASSEMBLY,E.TEMPLATE_ASSEMBLY,E.PARAM_FURNITURE,E.PARAM_PRIMITIVE].includes(e.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model don't support to append "+n+"!");if(t.type===E.TEMPLATE_ASSEMBLY||t.type===E.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(t._origin===C.SENSE||t._origin===C.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(!t.isRoot)throw new Error("Only root model can be append as "+n+"!")}!function(e){e.ORDER="order-mini-app",e.QUOTATION="report-miniapp"}(oe||(oe={})),function(e){e[e.CONFIRMED=0]="CONFIRMED",e[e.ORDERED=1]="ORDERED",e[e.CLAIMED=2]="CLAIMED",e[e.PAY_PENDING=3]="PAY_PENDING",e[e.PAYED=4]="PAYED",e[e.PRODUCTION_SCHEDULING=5]="PRODUCTION_SCHEDULING",e[e.REVIEWED=6]="REVIEWED",e[e.SPLIT_ORDER=7]="SPLIT_ORDER",e[e.RETURNED=8]="RETURNED",e[e.CANCELLED=9]="CANCELLED",e[e.BATCHED=10]="BATCHED",e[e.OPENED_MATERIAL=11]="OPENED_MATERIAL",e[e.EDGE_SEALED=12]="EDGE_SEALED",e[e.HOLES_ARRANGED=13]="HOLES_ARRANGED",e[e.PACKED=14]="PACKED",e[e.WAREHOUSED=15]="WAREHOUSED",e[e.SHIPPED=16]="SHIPPED",e[e.REVIEW_PENDING=17]="REVIEW_PENDING",e[e.CONFIRM_PENDING=18]="CONFIRM_PENDING",e[e.PAY_COLLECT_PENDING=19]="PAY_COLLECT_PENDING",e[e.PAY_COLLECTED=20]="PAY_COLLECTED",e[e.SPLIT_ORDER_PENDING=21]="SPLIT_ORDER_PENDING",e[e.COMPLETED=24]="COMPLETED"}(Ae||(Ae={})),function(e){e[e.OTHER=0]="OTHER",e[e.NATURAL=1]="NATURAL",e[e.MODEL_ROOM=2]="MODEL_ROOM",e[e.NEW_MEDIA=3]="NEW_MEDIA",e[e.LIVE=4]="LIVE",e[e.CROSS_COOP=5]="CROSS_COOP",e[e.TELEMARKETING=6]="TELEMARKETING",e[e.OLD_INTRODUCE=7]="OLD_INTRODUCE",e[e.REPURCHASE=8]="REPURCHASE"}(ae||(ae={})),function(e){e[e.FORWARD=0]="FORWARD",e[e.REVERSE=1]="REVERSE"}(se||(se={})),function(e){e.AUDIT_PASS="audit_pass",e.AUDIT_REJECT="audit_reject",e.RESUBMIT="resubmit"}(ue||(ue={}));var ge,fe,he,pe,de,Ie,ye;new Map([[ue.AUDIT_PASS,"pass"],[ue.AUDIT_REJECT,"reject"],[ue.RESUBMIT,"resubmit"]]);!function(e){e[e.AUDIT=2]="AUDIT"}(ge||(ge={})),function(e){e[e.AUDIT=0]="AUDIT"}(fe||(fe={})),function(e){e.PASS="pass",e.REJECT="reject",e.RESUBMIT="resubmit",e.CREATE="create",e.ARRAIGNED="arraigned",e.CLAIM="claim",e.SEND_BACK="sendBack",e.CANCEL="cancel",e.PAY_REGISTER="payRegister",e.PAY_COLLECT_CONFIRM="payCollectConfirm",e.SPLIT_ORDER_CONFIRM="splitOrderConfirm",e.GEN_BATCH="genBatch",e.PREPARE_MATERIAL_CONFIRM="prepareMaterialConfirm",e.OPEN_MATERIAL_CONFIRM="openMaterialConfirm",e.EDGE_SEALED_CONFIRM="edgeSealedConfirm",e.HOLES_ARRANGED_CONFIRM="holesArrangedConfirm",e.PICK_CONFIRM="pickConfirm",e.PACKED_CONFIRM="packedConfirm",e.WAREHOUSED_CONFIRM="warehousedConfirm",e.SHIPPED_CONFIRM="shippedConfirm",e.COMPLETED_CONFIRM="COMPLETED_CONFIRM",e.REVOKE="revoke",e.DESIGN_SUBMIT="designSubmit",e.EDIT="orderEdit"}(he||(he={})),function(e){e[e.CUSTOMER_NAME=1]="CUSTOMER_NAME",e[e.CUSTOMER_PHONE=2]="CUSTOMER_PHONE",e[e.CUSTOMER_ADDR=3]="CUSTOMER_ADDR"}(pe||(pe={})),function(e){e[e.MYSELF=1]="MYSELF",e[e.ALL=2]="ALL"}(de||(de={})),function(e){e[e.STR=0]="STR",e[e.INT=1]="INT",e[e.FLOAT=2]="FLOAT",e[e.BOOL=3]="BOOL"}(Ie||(Ie={})),function(e){e.API_CALL="API_CALL"}(ye||(ye={}));var Ce,Ee,Be,ve,me=function(){function e(){}return e.getEvent=function(){return e._event},e.setEvent=function(t){e._event=t},e.emitApiCalledEvent=function(t){var r=e.getEvent();r&&r.emit(t)},e.collectSyncApiData=function(e,t,r){return function(n){var i={apiName:e.name,status:!0,args:r};try{var o=performance.now(),A=e.apply(t,r),a=performance.now();return i.return=A,i.duration=Math.floor(a-o),A}catch(e){throw i.status=!1,i.errMsg=e,e}finally{n(i)}}},e.collectAsyncApiData=function(e,t,r){return function(n){return X(void 0,void 0,void 0,(function(){var i,o,A,a,s;return Z(this,(function(u){switch(u.label){case 0:i={apiName:e.name,status:!0,args:r},u.label=1;case 1:return u.trys.push([1,3,4,5]),o=performance.now(),[4,e.apply(t,r)];case 2:return A=u.sent(),a=performance.now(),i.return=A,i.duration=Math.floor(a-o),[2,A];case 3:throw s=u.sent(),i.status=!1,i.errMsg=s,s;case 4:return n(i),[7];case 5:return[2]}}))}))}},e.observeAsyncApiDeco=function(t){return function(r,n,i){var o=i.value,A=function(r){e.emitApiCalledEvent(z(z(z({},r),{apiName:r.apiName||n}),t))};return i.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return X(this,void 0,void 0,(function(){var r;return Z(this,(function(n){switch(n.label){case 0:return r=this,[4,e.collectAsyncApiData(o,r,t)(A)];case 1:return[2,n.sent()]}}))}))},i}},e.observeSyncApiDeco=function(t){return function(r,n,i){var o=i.value;r.constructor.name;var A=function(r){e.emitApiCalledEvent(z(z(z({},r),{apiName:r.apiName||n}),t))};return i.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this,i=e.collectSyncApiData(o,n,t)(A);return i},i}},e.observeSyncApiWrap=function(t){return function(r,n){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return e.collectSyncApiData(r,n||this,i)((function(r){e.emitApiCalledEvent(z(z({},r),t))}))}}},e.observeAsyncApiWrap=function(t){return function(r,n){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return X(this,void 0,void 0,(function(){return Z(this,(function(o){return[2,e.collectAsyncApiData(r,n||this,i)((function(r){e.emitApiCalledEvent(z(z({},r),t))}))]}))}))}}},e}();!function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW",e[e.CABINET_COPY=4]="CABINET_COPY",e[e.WARDROBE_COPY=5]="WARDROBE_COPY",e[e.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(Ce||(Ce={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(Ee||(Ee={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(Be||(Be={})),function(e){e.ZH_CN="zh_CN",e.EN_US="en_US",e.DE_DE="de_DE",e.FR_FR="fr_FR",e.JA_JP="ja_JP",e.ZH_TW="zh_TW",e.RU_RU="ru_RU",e.KO_KR="ko_KR",e.ES_ES="es_ES",e.AR_EG="ar_EG",e.EN_CN="en_CN",e.VI="vi"}(ve||(ve={}));var Qe,be,_e,Se="$$geometry_color",we="$$geometry_opacity",De=[596,2048,2049];!function(e){e.CUSTOM="custom",e.TOP_MODEL="top_model",e.ACCESSORY="accessory",e.PRODUCT="product"}(Qe||(Qe={})),function(e){e.CLICK="click",e.DB_CLICK="double_click"}(be||(be={})),function(e){e.PARAM_MODEL="param_model",e.PARAM_MODEL_ASSEMBLY="param_model_assembly",e.FITTING_MODEL="fitting_model"}(_e||(_e={}));var Re,Me,xe=["0","1","2","3","4","5","6","7","8","9","ctrl","alt","shift","up","right","down","left","tab","enter","capslock","esc","backspace","space","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","~","!","@","#","$","%","^","&","*","(",")","_","+",":",'"',"<",">","?",",","`","-","=","[","]","\\",";","'",",",".","/"];!function(e){e.INNER="inner",e.OUTER="outer"}(Re||(Re={})),function(e){e.PARAM_MODEL="paramModel",e.PARAM_MODEL_ASSEMBLY="paramModelAssembly",e.HOLE="hole",e.GROOVE="groove",e.HARDWARE="hardware",e.HARDWARE_GROOVE="hardwareGroove"}(Me||(Me={}));var Pe=r(68),Te=r.n(Pe),Fe=r(98),Oe=r.n(Fe),Le=r(44),ke=r.n(Le),Ne=r(288),Ge=r.n(Ne),Ue=r(5),je=r.n(Ue),Ve=r(47);function Ye(e){return(Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ke(e,t){return(Ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=We(e);if(t){var i=We(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Je(this,r)}}function Je(e,t){return!t||"object"!==Ye(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function We(e){return(We=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ze=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ke(e,t)}(r,e);var t=qe(r);function r(){return He(this,r),t.apply(this,arguments)}return r}(Ve.CoreCustom),Xe=r(362),Ze=r(99),$e=r.n(Ze),et=r(1127);function tt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rt(e,t,r){return(rt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=At(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function nt(e,t){return(nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function it(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=At(e);if(t){var i=At(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ot(this,r)}}function ot(e,t){return!t||"object"!==at(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function At(e){return(At=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function at(e){return(at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var st,ut=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":at(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ct=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":at(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},lt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nt(e,t)}(o,e);var t,r,n,i=it(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).doc=new Xe.CDoc,e.versionStore=new et.VersionStore,e.setCustom(new ze),e.setContextProvider(e.doc.getElementContext),e}return t=o,(r=[{key:"compareVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;return rt(At(o.prototype),"compareVersion",this).call(this,e)&&this.custom.compareVersion(e)}},{key:"exportVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;e.clear(),rt(At(o.prototype),"exportVersion",this).call(this,e),this.custom.exportVersion(e)}},{key:"getDoc",value:function(){return this.doc}},{key:"getCustom",value:function(){return this.custom}},{key:"setCustom",value:function(e){return this.custom&&this.custom.setContextProvider(),this.custom=e.setContextProvider(this.provideContext()),this}}])&&tt(t.prototype,r),n&&tt(t,n),o}($e.a);ut([Object(Ze.property)(),ct("design:type","function"==typeof(st=void 0!==ze&&ze)?st:Object)],lt.prototype,"custom",void 0);var gt=r(107),ft=r.n(gt);function ht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dt(e,t){return(dt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function It(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ct(e);if(t){var i=Ct(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yt(this,r)}}function yt(e,t){return!t||"object"!==Et(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Et(e){return(Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Bt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Et(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},vt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Et(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},mt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dt(e,t)}(o,e);var t,r,n,i=It(o);function o(){var e;return ht(this,o),(e=i.apply(this,arguments)).linkedIds=[],e}return t=o,(r=[{key:"getCustom",value:function(){return this.custom}},{key:"setIsAppendHardware",value:function(e){this.isAppendHardware=e}},{key:"setLinkedIds",value:function(e){this.linkedIds=e}},{key:"setHardwareData",value:function(e){this.hardwareData=e}}])&&pt(t.prototype,r),n&&pt(t,n),o}(ft.a);function Qt(e){return(Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function St(e,t){return(St=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Rt(e);if(t){var i=Rt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Dt(this,r)}}function Dt(e,t){return!t||"object"!==Qt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Rt(e){return(Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Bt([Object(Ze.property)(),vt("design:type",Boolean)],mt.prototype,"isAppendHardware",void 0);var Mt,xt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&St(e,t)}(o,e);var t,r,n,i=wt(o);function o(){return bt(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"paramModelConstructor",get:function(){return mt}}])&&_t(t.prototype,r),n&&_t(t,n),o}(Ve.CoreParamModelAssembly),Pt=r(97),Tt=new Pt.EventEmitter;!function(e){e.FITTING_MODEL_CHANGE="fittingModelChange",e.SELECTION_SERVICE_MODEL_CHANGE="selectionServiceModelChange",e.SELECTION_SERVICE_V2_MODEL_CHANGE="selectionServiceV2ModelChange",e.PLANK_FACE_CLICK="plankFaceClick",e.PLANK_FACE_HOVER="plankFaceHover",e.API_CALLED="apiCalled"}(Mt||(Mt={}));var Ft=r(34),Ot=r(2),Lt=r(528),kt=Object(Lt.createKElementBaseClass)(),Nt=Ft.advanced.reportObserved,Gt=Ft.advanced.reportChanged;function Ut(e){return function(e){if(Array.isArray(e))return jt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return jt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yt(e,t){return(Yt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qt(e);if(t){var i=qt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Kt(this,r)}}function Kt(e,t){return!t||"object"!==Jt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qt(e){return(qt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jt(e){return(Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}kt.onGet=function(e){Nt(e)},kt.addSetHook((function(e){Gt(e)}));var Wt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Jt(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},zt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Jt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function Xt(e,t,r){var n=r.value;r.value=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=n.apply(this,t);return Tt.emit(Mt.FITTING_MODEL_CHANGE),i}}var Zt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yt(e,t)}(o,e);var t,r,n,i=Ht(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).setFittings([]),e.setIntersects([]),e.setGrooveFittings([]),e.setPlankFaceHintModels([]),e.setFittingHintModels([]),e.setPlankOutlineHintModels([]),e}return t=o,(r=[{key:"getFittings",value:function(e){if(e){if("ids"in e)return this.fittings.filter((function(t){return e.ids.includes(t.id)}));if("types"in e)return this.fittings.filter((function(t){return e.types.includes(t.type)}))}return this.fittings}},{key:"setFittings",value:function(e){this.fittings=e}},{key:"addFittings",value:function(e){this.fittings=[].concat(Ut(e),Ut(this.fittings))}},{key:"removeFittings",value:function(e){var t=Object(Ot.difference)(this.fittings,this.getFittings(e));this.setFittings(t)}},{key:"setIntersects",value:function(e){this.intersects=e}},{key:"getIntersects",value:function(){return this.intersects}},{key:"setGrooveFittings",value:function(e){this.grooveFittings=e}},{key:"addGrooveFittings",value:function(e){this.grooveFittings=[].concat(Ut(this.grooveFittings),Ut(e))}},{key:"getGrooveFittings",value:function(){return this.grooveFittings}},{key:"setPlankFaceHintModels",value:function(e){this.plankFaceHintModels=e}},{key:"getPlankFaceHintModels",value:function(){return this.plankFaceHintModels}},{key:"setFittingHintModels",value:function(e){this.fittingHintModels=e}},{key:"getFittingHintModels",value:function(){return this.fittingHintModels}},{key:"setPlankOutlineHintModels",value:function(e){this.plankOutlineHintModels=e}},{key:"getPlankOutlineHintModels",value:function(){return this.plankOutlineHintModels}}])&&Vt(t.prototype,r),n&&Vt(t,n),o}(kt);Wt([Ft.observable,zt("design:type",Array)],Zt.prototype,"fittings",void 0),Wt([Ft.observable,zt("design:type",Array)],Zt.prototype,"intersects",void 0),Wt([Ft.observable,zt("design:type",Array)],Zt.prototype,"grooveFittings",void 0),Wt([Ft.observable,zt("design:type",Array)],Zt.prototype,"plankFaceHintModels",void 0),Wt([Ft.observable,zt("design:type",Array)],Zt.prototype,"fittingHintModels",void 0),Wt([Ft.observable,zt("design:type",Array)],Zt.prototype,"plankOutlineHintModels",void 0),Wt([Xt,zt("design:type",Function),zt("design:paramtypes",[Array]),zt("design:returntype",void 0)],Zt.prototype,"setFittings",null),Wt([Xt,zt("design:type",Function),zt("design:paramtypes",[Array]),zt("design:returntype",void 0)],Zt.prototype,"addFittings",null),Wt([Xt,zt("design:type",Function),zt("design:paramtypes",[Object]),zt("design:returntype",void 0)],Zt.prototype,"removeFittings",null),Wt([Xt,zt("design:type",Function),zt("design:paramtypes",[Array]),zt("design:returntype",void 0)],Zt.prototype,"setGrooveFittings",null),Wt([Xt,zt("design:type",Function),zt("design:paramtypes",[Array]),zt("design:returntype",void 0)],Zt.prototype,"addGrooveFittings",null);var $t=r(30),er=r.n($t),tr=r(100),rr=r.n(tr);function nr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ir(e,t){return(ir=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function or(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ar(e);if(t){var i=ar(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ar(this,r)}}function Ar(e,t){return!t||"object"!==sr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ar(e){return(ar=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function sr(e){return(sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ur=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":sr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},cr=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":sr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},lr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ir(e,t)}(o,e);var t,r,n,i=or(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).id=rr()(),t.linkModel=e.linkModel,t.hintOutline=e.hintOutline,t.visible=e.linkModel instanceof ft.a?!e.linkModel.getInvisible():e.linkModel.visible,t}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}}])&&nr(t.prototype,r),n&&nr(t,n),o}(kt);function gr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fr(e,t){return(fr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=dr(e);if(t){var i=dr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return pr(this,r)}}function pr(e,t){return!t||"object"!==Ir(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dr(e){return(dr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ir(e){return(Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}ur([er.a,cr("design:type",String)],lr.prototype,"id",void 0),ur([er.a,cr("design:type",Object)],lr.prototype,"linkModel",void 0),ur([er.a,cr("design:type","function"!=typeof!1&&Object)],lr.prototype,"hintOutline",void 0),ur([er.a,cr("design:type",Boolean)],lr.prototype,"visible",void 0);var yr,Cr,Er,Br,vr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ir(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},mr=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ir(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Qr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fr(e,t)}(o,e);var t,r,n,i=hr(o);function o(e,t,r,n){var A;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(A=i.call(this)).fittingData=n,A.visible=!1,A.viewColor=0,A.opacity=1;var a=r.position,s=r.size,u=r.rotate,l=r.height,g=r.boundingBox;return A.id=e||rr()(),A.position=a instanceof je.a?a:new je.a(a),A.size=s instanceof je.a?s:new je.a(s),A.rotate=u instanceof je.a?u:new je.a(s),A.height=l,A.type="fittingType"in n?n.fittingType:c.INTERSECTED,A.visible=A.type!==c.INTERSECTED,A.linkParamModelId=t,A.boundingBox=g,A}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}}])&&gr(t.prototype,r),n&&gr(t,n),o}(kt);vr([er.a,mr("design:type",String)],Qr.prototype,"id",void 0),vr([er.a,mr("design:type","function"==typeof(yr=void 0!==je.a&&je.a)?yr:Object)],Qr.prototype,"position",void 0),vr([er.a,mr("design:type","function"==typeof(Cr=void 0!==je.a&&je.a)?Cr:Object)],Qr.prototype,"size",void 0),vr([er.a,mr("design:type",Number)],Qr.prototype,"height",void 0),vr([er.a,mr("design:type","function"==typeof(Er=void 0!==c&&c)?Er:Object)],Qr.prototype,"type",void 0),vr([er.a,mr("design:type","function"==typeof(Br=void 0!==je.a&&je.a)?Br:Object)],Qr.prototype,"rotate",void 0),vr([er.a,mr("design:type",Number)],Qr.prototype,"radius",void 0),vr([er.a,mr("design:type",Object)],Qr.prototype,"visible",void 0),vr([er.a,mr("design:type",Object)],Qr.prototype,"viewColor",void 0),vr([er.a,mr("design:type",Object)],Qr.prototype,"opacity",void 0);var br=r(16),_r=r.n(br);function Sr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return wr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Dr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Rr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.length=0,this.clockwise=t.clockwise,this.type=t.type,this.radius=t.radius,this.minorArc=t.minorArc,this.majorRadius=t.majorRadius,this.minorRadius=t.minorRadius,this.ellipseCenter=t.ellipseCenter,this.path=r,this.id=rr()()}var t,r,n;return t=e,(r=[{key:"getType",value:function(){return this.type}},{key:"getVector",value:function(){var e=this.start,t=this.end;return e&&t?function(e,t){return new u.Vector2d(t.x-e.x,t.y-e.y)}(e.getPosition(),t.getPosition()):new u.Vector2d}},{key:"getRealLine",value:function(){var e=Sr(this.start.getPointsForRender(),2)[1],t=Sr(this.end.getPointsForRender(),1)[0];return this.getType()===D.SEGMENT?new u.LineSeg2d(e,t):this.getType()===D.ELLIPSE_ARC?this.getEllipseLine():this.getCurveLine()}},{key:"getEllipseLine",value:function(){var e=new u.CCS2d(new u.Point2d(this.ellipseCenter.x,this.ellipseCenter.y),new u.Vector2d(1,0)),t=new u.Ellipse2d(e,this.majorRadius,this.minorRadius);return u.EllipticalArc2d.makeByStartEndPoints(t,this.start.getPosition(),this.end.getPosition(),!this.clockwise)}},{key:"getCurveLine",value:function(){var e=this.start,t=this.end;if(this.getType()!==D.CIRCLE_ARC)return new u.LineSeg2d(e.getPosition(),t.getPosition());var r,n,i,o,A,a,s,c,l,g,f,h=this.getVector().length/2;return this.radius<h&&(this.radius=h),r=this.radius,n=e.getPosition(),i=t.getPosition(),o=this.minorArc,A=this.clockwise,a=new u.LineSeg2d(n,i),s=a.length/2,c=a.getPoint(s),l=Math.sqrt(r*r-s*s),g=(A?o?a.rightNormal:a.leftNormal:o?a.leftNormal:a.rightNormal).multiplied(l/a.leftNormal.length),f=c.added(g),u.Arc2d.makeArcByStartEndPoints(f,n,i,!A)}},{key:"getLineLength",value:function(){var e=this.getRealLine();return e?new u.LineSeg2d(e.startPoint,e.endPoint).length:0}},{key:"getNormalLineLength",value:function(){return this.start&&this.end?this.start.getPosition().distanceTo(this.end.getPosition()):0}},{key:"getRenderPoints",value:function(){return[Sr(this.start.getPointsForRender(),2)[1],Sr(this.end.getPointsForRender(),1)[0]]}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(e){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,e),this.hint=e}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&Dr(t.prototype,r),n&&Dr(t,n),e}();function Mr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return xr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Tr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clockwise=!!t.clockwise,this.type=t.type,this.position=new u.Point2d(t.position),this.radius=t.radius,this.cornerCutDistance=t.cornerCutDistance,this.path=r,this.majorRadius=t.majorRadius,this.minorRadius=t.minorRadius,this.offset=new u.Vector2d(t.offset||{x:0,y:0}),this.id=rr()()}var t,r,n;return t=e,(r=[{key:"getPosition",value:function(){return this.position}},{key:"getType",value:function(){return this.type}},{key:"getLineLength",value:function(){if(this.getType()===w.NONE)return 0;var e=this.getCurveLineAndPoints().curveLine;return new u.LineSeg2d(e.startPoint,e.endPoint).length}},{key:"getCurveLineAndPoints",value:function(){var e=this.clockwise,t=this.prevLine,r=this.nextLine,n=this.offset,i=this.getType(),o=this.getPosition(),A=this.getPointsForRender(),a=Mr(A,2),s=a[0],c=a[1];if(i===w.CIRCLE||i===w.CUT_CIRCLE){if(i===w.CIRCLE){var l=t.getVector().getPerpVector(),g=r.getVector().getPerpVector();if(l.isParallel(g))return{curveLine:u.Arc2d.makeArcByStartEndPoints(s,s,c,!0),renderPoints:A};var f=new u.Line2d(s,l),h=new u.Line2d(c,g),p=Mr(f.intersectCurve(h),1)[0];if(!p)return{curveLine:new u.LineSeg2d(s,c),renderPoints:A};var d=u.Arc2d.makeArcByStartEndPoints(p.point,s,c,!1);return this.radius=void 0===this.radius?d.radius:this.radius,Math.abs(d.arcAngle)>Math.PI&&(d=u.Arc2d.makeArcByStartEndPoints(p.point,s,c,!0)),{curveLine:d,renderPoints:A}}return{curveLine:u.Arc2d.makeArcByStartEndPoints(o.added(n),s,c,!e),renderPoints:A}}if(i===w.ELLIPSE){var I=o.added(n),y=new u.CCS2d(new u.Point2d(I.x,I.y),new u.Vector2d(1,0)),C=new u.Ellipse2d(y,this.majorRadius,this.minorRadius);return{curveLine:u.EllipticalArc2d.makeByStartEndPoints(C,s,c,!e),renderPoints:A}}return{curveLine:new u.LineSeg2d(s,c),renderPoints:A}}},{key:"getPointsForRender",value:function(){var e=this.radius,t=this.prevLine,r=this.nextLine,n=this.cornerCutDistance,i=void 0===n?[0,0]:n,o=this.offset,A=this.getType(),a=this.getPosition();if(A===w.NONE)return[a,a];if(!t||!r)return[a,a];var s=new u.Ray2d(t.end.getPosition(),t.getVector().reversed()),c=new u.Ray2d(r.start.getPosition(),r.getVector());if(A===w.LINE)return[s.getPoint(i[0]),c.getPoint(i[1])];if(A===w.CIRCLE){if(void 0!==e){var l=s.direction,g=c.direction,f=l.angleTo(g),h=Math.abs(e/Math.tan(f/2));return[s.getPoint(h),c.getPoint(h)]}if(i)return[s.getPoint(i[0]),c.getPoint(i[0])]}if(A===w.CUT_CIRCLE){var p=a.added(o),d=new u.Circle2d(p,e),I=d.intersectCurve(s),y=d.intersectCurve(c);if(I.length&&y.length)return[I[0].point,y[0].point]}if(A===w.ELLIPSE){var C=a.added(o),E=new u.CCS2d(new u.Point2d(C.x,C.y),new u.Vector2d(1,0)),B=new u.Ellipse2d(E,this.majorRadius,this.minorRadius),v=B.intersectCurve(s),m=B.intersectCurve(c);if(v.length&&m.length)return[v[0].point,m[0].point]}return[a,a]}},{key:"getRenderPoints",value:function(){return this.getPointsForRender()}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(e){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,e),this.hint=e}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&Pr(t.prototype,r),n&&Pr(t,n),e}();function Fr(e){return function(e){if(Array.isArray(e))return kr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Lr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Or(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Lr(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Lr(e,t){if(e){if("string"==typeof e)return kr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kr(e,t):void 0}}function kr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Nr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Gr=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._points=[],this._lines=[],this.getAllPolygonPoints=function(){return r.getPoints().reduce((function(e,t,r){t.getType()===w.NONE&&(e=e.concat(t.getPosition())),t.getType()===w.LINE&&(e=e.concat(t.getPointsForRender())),t.getType()!==w.CIRCLE&&t.getType()!==w.CUT_CIRCLE||(e=e.concat(t.getCurveLineAndPoints().curveLine.getApproximatePoints()));var n=t.nextLine;if(!n)return e;if(n.getType()===D.CIRCLE_ARC){var i=n.getCurveLine().getApproximatePoints();e=e.concat(i.slice(1,i.length-1))}return e}),[])},this.getEdges=function(){var e,t=r.getPoints(),n=r.getLines(),i=[],o=Or(t);try{for(o.s();!(e=o.n()).done;){var A=e.value;A.getType()!==w.NONE&&i.push(A.getCurveLineAndPoints().curveLine)}}catch(e){o.e(e)}finally{o.f()}var a,s=Or(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;i.push(u.getRealLine())}}catch(e){s.e(e)}finally{s.f()}return i},this.getGlobalTopPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new u.Point3d(e.x,e.y,0).appliedMatrix4(r.matrix4)}))},this.getGlobalBottomPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new u.Point3d(e.x,e.y,-r.depth).appliedMatrix4(r.matrix4)}))};var n=t.type,i=t.points,o=void 0===i?[]:i,A=t.lines,a=void 0===A?[]:A,s=t.forceCCW,c=void 0===s||s,l=t.depth,g=t.matrix4,f=t.offset;if(this.id=rr()(),this.type=n,this.depth=l,this.matrix4=g,this.offset=f,this.setPoints(o),this.setLines(a),this.linkPointsAndLines(),c){var h=u.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));h.isSelfIntersect()||h.isCCW()||this.turnover()}this.forceCCW=c,this.adjustClockwise()}var t,r,n;return t=e,(r=[{key:"points",get:function(){return this._points},set:function(e){this.setPoints(e)}},{key:"getPoints",value:function(){return this._points}},{key:"setPoints",value:function(e){var t=this;this._points=e,e.forEach((function(e){e.path=t})),this.adjustClockwise()}},{key:"lines",get:function(){return this.getLines()},set:function(e){this.setLines(e)}},{key:"getLines",value:function(){return this._lines}},{key:"setLines",value:function(e){var t=this;this._lines=e,e.forEach((function(e){e.path=t})),this.adjustClockwise()}},{key:"turnover",value:function(){if(!this.forceCCW||!this.isClosedPath()){if(this.isClosedPath()){this.setPoints(this.getPoints().slice().reverse().map((function(e){return e.clockwise=!e.clockwise,e})));var e=this.getLines().slice().reverse().map((function(e){return e.clockwise=!e.clockwise,e}));this.setLines(e.slice(1).concat(e[0]))}else this.setPoints(this.getPoints().slice().reverse()),this.setLines(this.getLines().slice().reverse());this.linkPointsAndLines()}}},{key:"isClosedPath",value:function(){return this.getLines().length===this.getPoints().length}},{key:"linkPointsAndLines",value:function(){var e=this,t=this.getLines(),r=this.getPoints();r.forEach((function(e){e.prevLine=void 0,e.nextLine=void 0})),t.forEach((function(n,i){n.start=void 0,n.end=void 0;var o,A=r[i];o=i===t.length-1&&e.isClosedPath()?r[0]:r[i+1],n.path=e,A.path=e,o.path=e,A.nextLine=n,o.prevLine=n,n.start=A,n.end=o}))}},{key:"getAllRenderPoints",value:function(){var e=[];return this.getPoints().forEach((function(t){t.getType()!==w.NONE?e.push.apply(e,Fr(t.getPointsForRender())):e.push(t.getPosition())})),e}},{key:"getAllRealPathCurves",value:function(){var e=[];return this.getLines().forEach((function(t){var r,n;if((null===(r=t.start)||void 0===r?void 0:r.getType())!==w.NONE){var i=null===(n=t.start)||void 0===n?void 0:n.getCurveLineAndPoints().curveLine;i&&e.push(i)}var o=t.getRealLine();e.push(o)})),e}},{key:"transformPathToFace2D",value:function(){var e={loops:[]};return e.loops.push(this.getAllRealPathCurves()),e}},{key:"transformPathToGeomLoop2d",value:function(){return new u.GeomLoop2d(this.getAllRealPathCurves())}},{key:"computeBoundingBox",value:function(){var e=new u.BBox2d;return this.getPoints().forEach((function(t){t.getType()!==w.NONE&&e.merge(t.getCurveLineAndPoints().curveLine.getBounding())})),this.getLines().forEach((function(t){e.merge(t.getRealLine().getBounding())})),e}},{key:"adjustClockwise",value:function(){if(this.forceCCW&&this.isClosedPath()){var e=u.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));if(!e.isSelfIntersect()&&!e.isCCW()){this.setPoints(this.getPoints().slice().reverse());var t=this.getLines().slice().reverse();this.setLines(t.slice(1).concat(t[0]).map((function(e){return e.type===D.CIRCLE_ARC&&(e.clockwise=!e.clockwise),e}))),this.linkPointsAndLines()}}}},{key:"getAllCurves",value:function(){var e=this.getPoints(),t=this.getLines(),r=function(e){return{curve:e.getRealLine(),source:e}};return e.reduce((function(e,n,i){var o;n.getType()!==w.NONE&&(o={curve:n.getCurveLineAndPoints().curveLine,source:n});var A=o?[o]:[];return e.concat(t[i]?[].concat(A,[r(t[i])]):[].concat(A))}),[]).concat(t.slice(e.length).map(r))}},{key:"getRedundantPoints",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getPoints().length;if(n<=3)return[];var i=this.getPoints().indexOf(e);if(-1===i)return[];var o=[];return(r?[1]:[1,-1]).forEach((function(r){var A=(i+r+n)%n,a=t.getPoints()[A];e.getPosition().isEqual(a.getPosition(),1)&&(a.nextLine.getType()!==D.SEGMENT?o.push(e):o.push(a))})),o}},{key:"getRenderPoints",value:function(){var e=[];return this.points.forEach((function(t){t.getType()===w.NONE?e.push(t.getPosition()):e.push.apply(e,Fr(t.getRenderPoints()))})),e}}])&&Nr(t.prototype,r),n&&Nr(t,n),e}();function Ur(e,t){var r=t.paramPoints.map((function(e){return new Tr(e)})),n=t.paramPathLines.map((function(e){return new Rr(e)}));return new Gr({type:e,offset:t.offset,points:r,lines:n,forceCCW:!1})}function jr(e){return function(e){if(Array.isArray(e))return Vr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Vr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vr(e,t)}(e)||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 Vr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Yr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Hr(e,t){return(Hr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Jr(e);if(t){var i=Jr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return qr(this,r)}}function qr(e,t){return!t||"object"!==Wr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jr(e){return(Jr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Wr(e){return(Wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var zr,Xr,Zr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Wr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},$r=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Wr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},en=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hr(e,t)}(o,e);var t,r,n,i=Kr(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).viewColor=0,t.visible=!1;var r=e.data,n=e.path,A=e.model;return t.id=r.id,t.type=c.HARDWARE_GROOVE,t.path=n,t.depth=r.depth,t.model=A,t.linkParamModelId=A.id,t.fittingData=r,t}return t=o,(r=[{key:"getTopRenderPoints",value:function(){var e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(t){return new u.Point3d(t.x,t.y,0).appliedMatrix4(e)}))}},{key:"getBottomRenderPoints",value:function(){var e=this,t=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(r){return new u.Point3d(r.x,r.y,-e.depth).appliedMatrix4(t)}))}},{key:"pointToGlobalMatrix",value:function(){var e=new u.Matrix4,t=this.model.getSize();return e.fromArray(jr(this.model.getConcatenatedMatrix().multiply((new ke.a).makeTranslation(new je.a(-t.x/2,t.y/2,-t.z/2))).elements.values())),e.multiplied(this.path.matrix4)}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}},{key:"setVisible",value:function(e){this.visible=e}}])&&Yr(t.prototype,r),n&&Yr(t,n),o}(kt);Zr([er.a,$r("design:type",String)],en.prototype,"id",void 0),Zr([er.a,$r("design:type",Object)],en.prototype,"viewColor",void 0),Zr([er.a,$r("design:type",Object)],en.prototype,"visible",void 0),Zr([er.a,$r("design:type","function"==typeof(zr=void 0!==c&&c)?zr:Object)],en.prototype,"type",void 0),Zr([er.a,$r("design:type","function"==typeof(Xr=void 0!==Gr&&Gr)?Xr:Object)],en.prototype,"path",void 0),Zr([er.a,$r("design:type",Number)],en.prototype,"depth",void 0),Zr([er.a,$r("design:type",Number)],en.prototype,"opacity",void 0);var tn=r(142),rn=r.n(tn);function nn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function on(e,t){return(on=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function An(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sn(e);if(t){var i=sn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return an(this,r)}}function an(e,t){return!t||"object"!==un(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sn(e){return(sn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function un(e){return(un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var cn,ln,gn,fn,hn,pn=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":un(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},dn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":un(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},In=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&on(e,t)}(o,e);var t,r,n,i=An(o);function o(e,t,r,n,A,a,s){var u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(u=i.call(this)).viewColor=0,u.id=e||rr()(),u.position=r instanceof je.a?r:new je.a(r),u.size=A instanceof je.a?A:new je.a(A),u.rotate=n instanceof je.a?n:new je.a(A),u.type=t,u.geometryModel=a,u.originPoints=s,u}return t=o,(r=[{key:"setViewColor",value:function(e){this.viewColor=e}}])&&nn(t.prototype,r),n&&nn(t,n),o}(kt);function yn(e,t){return(yn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Bn(e);if(t){var i=Bn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return En(this,r)}}function En(e,t){return!t||"object"!==vn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bn(e){return(Bn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vn(e){return(vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}pn([er.a,dn("design:type",String)],In.prototype,"id",void 0),pn([er.a,dn("design:type","function"==typeof(cn=void 0!==l&&l)?cn:Object)],In.prototype,"type",void 0),pn([er.a,dn("design:type","function"==typeof(ln=void 0!==je.a&&je.a)?ln:Object)],In.prototype,"position",void 0),pn([er.a,dn("design:type","function"==typeof(gn=void 0!==je.a&&je.a)?gn:Object)],In.prototype,"size",void 0),pn([er.a,dn("design:type","function"==typeof(fn=void 0!==je.a&&je.a)?fn:Object)],In.prototype,"rotate",void 0),pn([er.a,dn("design:type","function"==typeof(hn=void 0!==rn.a&&rn.a)?hn:Object)],In.prototype,"geometryModel",void 0),pn([er.a,dn("design:type",Array)],In.prototype,"originPoints",void 0),pn([er.a,dn("design:type",Object)],In.prototype,"viewColor",void 0);var mn=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":vn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Qn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":vn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},bn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yn(e,t)}(r,e);var t=Cn(r);function r(e){var n,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).id=null!==(i=e.id)&&void 0!==i?i:rr()(),n.linkModel=e.linkModel,n.plankFaces=e.plankFaces,n.hintOutline=e.hintOutline,n}return r}(kt);function _n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Sn(e,t){return(Sn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Rn(e);if(t){var i=Rn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Dn(this,r)}}function Dn(e,t){return!t||"object"!==Mn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Rn(e){return(Rn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Mn(e){return(Mn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}mn([er.a,Qn("design:type",String)],bn.prototype,"id",void 0);var xn=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Mn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Pn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Mn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Tn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sn(e,t)}(o,e);var t,r,n,i=wn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=i.call(this);var r=e.points,n=e.linkModel,A=e.color,a=e.opacity,s=e.height,u=e.id;return t.id=u,t.visible=!0,t.viewColor=A,t.opacity=a,t.points=r,t.height=s,t.linkModel=n,t}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}}])&&_n(t.prototype,r),n&&_n(t,n),o}(kt);function Fn(e,t){var r=[0,0,0];return 0===e?r[2]=1:1===e?r[0]=-1:2===e?r[1]=-1:3===e?r[0]=1:4===e?r[1]=1:5===e&&(r[2]=-1),t?new t({x:r[0],y:r[1],z:r[2]}):{x:r[0],y:r[1],z:r[2]}}xn([er.a,Pn("design:type",String)],Tn.prototype,"id",void 0),xn([er.a,Pn("design:type",Object)],Tn.prototype,"linkModel",void 0),xn([er.a,Pn("design:type",Object)],Tn.prototype,"viewColor",void 0),xn([er.a,Pn("design:type",Number)],Tn.prototype,"opacity",void 0),xn([er.a,Pn("design:type",Boolean)],Tn.prototype,"visible",void 0),xn([er.a,Pn("design:type",Array)],Tn.prototype,"points",void 0),xn([er.a,Pn("design:type",Number)],Tn.prototype,"height",void 0);var On=[new u.Vector3d({x:1,y:0,z:0}),new u.Vector3d({x:0,y:1,z:0}),new u.Vector3d({x:0,y:0,z:1})];function Ln(e){return!(!e||e.fittingType!==c.HOLE)}function kn(e){return!(!e||e.fittingType!==c.GROOVE)}function Nn(e,t,r){var n,i,o=r.holeColor,A=r.grooveColor,a=r.holeOpacity,s=r.grooveOpacity,c=function(e,t){var r,n,i=t.start,o=t.end,A=t.plankFaceId,a=e.getSize(),s=(new ke.a).makeTranslation(new je.a(-a.x/2,a.y/2,-a.z/2)),c=e.getConcatenatedMatrix().multiply(s),l=new u.Point3d(i),g=new u.Point3d(o),f=new u.LineSeg3d(l,g),h=f.getPoint(f.length/2),p=new je.a(h).applyMatrix4(c);if(Ln(t)){var d=t.diameter;r=new je.a(d,f.length,d),n=je.a.Y_AXIS}if(kn(t)){var I=t.width,y=t.depth;[0,5].includes(A)?(r=new je.a(I,f.length,y),n=je.a.Y_AXIS):[2,4].includes(A)?(r=new je.a(I,y,f.length),n=je.a.Z_AXIS):[1,3].includes(A)&&(r=new je.a(y,I,f.length),n=je.a.Z_AXIS)}var C=new je.a(o).sub(new je.a(i)).normalize(),E=(new Ge.a).setFromTwoVectors(n,C),B=c.clone().multiply((new ke.a).makeRotationFromQuaternion(E)),v=new je.a((new Oe.a).setFromRotationMatrix(B)),m=new Te.a(r,p,v);return new Qr(t.id,e.id,{position:p,size:r,rotate:v,height:f.length,boundingBox:m},t)}(t,e);Ln(e)?(n=o,i=a):kn(e)&&(n=A,i=s);var l=e.params||[],g=l.find((function(e){return e.key===Se})),f=l.find((function(e){return e.key===we}));return c.setVisible(!0),c.setViewColor(g?g.value:n),c.setOpacity(f?Number(f.value):i),c}var Gn=r(724),Un=r(725),jn=r(10),Vn=r(114),Yn=r.n(Vn),Hn=r(141),Kn=r.n(Hn),qn=r(209),Jn=r.n(qn),Wn=r(113),zn=r.n(Wn),Xn=r(210),Zn=r.n(Xn),$n=r(424),ei=r.n($n),ti=r(72),ri=r.n(ti),ni=r(188),ii=r.n(ni);function oi(e){var t=[];e.shapes.forEach((function(e){var r=e.getTriangles();r&&0!==r.length&&ri.a.addElements(t,r)}));var r=function(e){var t=[];return e.forEach((function(e){return ri.a.addUniqueElements(t,e.points)})),t}(t),n=function(e,t){return e.map((function(e){var r=new je.a;return r.x=t.indexOf(e.points[0]),r.y=t.indexOf(e.points[1]),r.z=t.indexOf(e.points[2]),r}))}(t,r);return{vertices:r,textures:function(e,t){if(!t){var r=(new ii.a).includePoints(e);t=new _r.a(r.min.x,r.max.y)}return e.map((function(e){return _r.a.sub(e,t)}))}(r,e.pivot),indices:n}}var Ai=new je.a(0,0,0);function ai(e){var t=e.planeTransform;return function(e){try{var t=oi(e),r=new rn.a;return r.vertices=new Float32Array(je.a.toFloatArray(e.computeVertices(t.vertices))),r.normals=new Float32Array(je.a.toFloatArray(e.computeNormals(t.vertices))),r.textures=new Float32Array(_r.a.toFloatArray(t.textures)),r.indices=new Uint16Array(je.a.toFloatArray(t.indices)),r}catch(e){return void console.error(e)}}({shapes:e.shapes,pivot:e.pivot,computeVertices:function(e){return e.map((function(e){return Ai.set(e.x,e.y,0),t.localToWorld(Ai)}))},computeNormals:function(e){var r=t.basicZ.clone().normalize();return e.map((function(){return r.clone()}))}})}function si(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ui(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ui(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function ui(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ci,li=new je.a(0,0,0);function gi(e,t,r){for(var n,i=e.id,o=r.getConcatenatedMatrix(),A=r.getSize(),a=(new ke.a).makeTranslation(new je.a(-A.x/2,A.y/2,-A.z/2)),s=o.clone().multiply(a),u=t["@type"],c=(n=u===l.FACE?fi(t,s):function(e,t){var r,n=e.shell,i=Gn.fromJson(JSON.parse(n)).map((function(e){return e.getFaces()})).flat().map((function(e){return Un.triangulate2(e)})),o=new rn.a,A=0,a=[],s=[],u=[],c=[],l=si(i);try{for(l.s();!(r=l.n()).done;){var g=r.value;a.push(g.vertices.map((function(e){return li.fromArray(e).applyMatrix4(t).toArray()})).flat()),s.push(g.normals.flat()),u.push(g.uvs.flat()),c.push(g.triangleIndices.flat().map((function(e){return e+A}))),A+=g.vertices.length}}catch(e){l.e(e)}finally{l.f()}return o.vertices=new Float32Array(a.flat()),o.normals=new Float32Array(s.flat()),o.textures=new Float32Array(u.flat()),o.indices=new Float32Array(c.flat()),o}(t,s)).getBoundingBox3().getCenter(),g=Yn.a.decompose(s).rotation,f=Yn.a.compose(c,g,je.a.ONE),h=(new ke.a).getInverse(f),p=new Float32Array(n.vertices),d=new Kn.a,I=0;I<p.length;I+=3)li.set(p[I],p[I+1],p[I+2]).applyMatrix4(h),d.includePoint(li);return new In(i,u,c,g,d.getSize(),n,t.points.map((function(e){return new je.a(e).applyMatrix4(s)})))}function fi(e,t){var r=e.points.map((function(e){return new je.a(e).applyMatrix4(t)})),n=(new Jn.a).setFromCoplanarPoints(r[0],r[1],r[2]).normal,i=r[1].clone().sub(r[0]).normalize(),o=n.clone().cross(i).normalize(),A=new ei.a(i,o,n,r[0]),a=r.map((function(e){return new _r.a(A.worldToLocal(e))})),s=new zn.a(a);return ai({planeTransform:A,shapes:[new Zn.a(s)]})}function hi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hi(Object(r),!0).forEach((function(t){di(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function di(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ii(e,t){var r=t.clone().inversed(),n=new Gr({id:e.id,type:Re.OUTER,points:e.points.map((function(e){return pi(pi({},e),{},{position:(t=e.position,n=new u.Point3d(t).appliedMatrix4(r),new u.Point2d(n))});var t,n})).map(yi),lines:e.lines.map(Ci),depth:e.depth,matrix4:t});return n.linkPointsAndLines(),n}function yi(e){return new Tr(e)}function Ci(e){return new Rr(e)}!function(e){e[e.POINT=0]="POINT",e[e.LINE=1]="LINE"}(ci||(ci={}));var Ei=new u.Tolerance.Tolerance(.01,.01,.01);function Bi(e){if(e.getType()===w.NONE)return!0;var t=e.prevLine,r=e.nextLine;return t.type!==D.CIRCLE_ARC&&r.type!==D.CIRCLE_ARC&&(0!==e.radius&&(!e.cornerCutDistance||0!==e.cornerCutDistance[0]&&0!==e.cornerCutDistance[1]))}function vi(e){return e.type===D.SEGMENT||(!(e.type!==D.CIRCLE_ARC||!u.Num.isEqual(e.getVector().length,2*e.radius))||(e.type!==D.CIRCLE_ARC||!u.Num.isBigger(e.getVector().length,2*e.radius)))}function mi(e){return e.type===ci.POINT?e.val.getCurveLineAndPoints().curveLine:e.type===ci.LINE?e.val.getRealLine():void 0}function Qi(e,t){if(e.type===ci.POINT&&e.val.getType()===w.NONE)return!0;if(t.type===ci.POINT&&t.val.getType()===w.NONE)return!0;var r=mi(e),n=mi(t);if(!r||!n)return!1;var i=u.Curve2dIntersect.curve2dIntersectCurve2d(r,n,Ei);return!(1===i.length&&!i[0].point.isEqual(r.startPoint,.01)&&!i[0].point.isEqual(r.endPoint,.01))&&(!(i.length>1)||i.every((function(e){return e.point.isEqual(i[0].point,.01)})))}function bi(e,t,r){var n=r.grooveColor,i=r.grooveOpacity,o=function(e,t){var r=Fn(e,u.Vector3d),n=On.find((function(e){return 0===e.dot(r)})),i=r.clone().cross(n).normalized(),o=u.Matrix4.makeBasis(n,i,r);return t&&o.setTranslation(new u.Vector3d(function(e,t){var r={x:0,y:0,z:0};0===e?r.z=t.z:3===e?r.x=t.x:2===e&&(r.y=-t.y);return r}(e,t))),o}(e.plankFaceId,t.getSize()),A=new en({data:e,path:Ii(e,o),model:t});A.setVisible(!0);var a=(e.params||[]).find((function(e){return e.key===Se})),s=(e.params||[]).find((function(e){return e.key===we}));return A.setViewColor(a?a.value:n),A.setOpacity(s?Number(s.value):i),A}var _i=r(21),Si=r(12),wi=r(11),Di=r.n(wi);function Ri(e){return(Ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Pi(e,t){return(Pi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ti(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Oi(e);if(t){var i=Oi(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Fi(this,r)}}function Fi(e,t){return!t||"object"!==Ri(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Oi(e){return(Oi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Li=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pi(e,t)}(o,e);var t,r,n,i=Ti(o);function o(){return Mi(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return null}}])&&xi(t.prototype,r),n&&xi(t,n),o}(Di.a.PureComponent);function ki(e){return(ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ni(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ui(e,t){return(Ui=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ji(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Yi(e);if(t){var i=Yi(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Vi(this,r)}}function Vi(e,t){return!t||"object"!==ki(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yi(e){return(Yi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hi,Ki=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ui(e,t)}(o,e);var t,r,n,i=ji(o);function o(){return Ni(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&Gi(t.prototype,r),n&&Gi(t,n),o}(_i.AXR);Hi||(Hi={});var qi,Ji=[];!function(e){e.SAVE_CUSTOM="saveCustom",e.UNDO_REDO="undoRedo",e.PARSE_DOCUMENT="parseDocument"}(qi||(qi={}));var Wi,zi,Xi={};function Zi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zi(Object(r),!0).forEach((function(t){eo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function eo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function to(e,t){!function(e){Wi.log(ro(e))}(e);var r={eventType:e.behavior+"_ktr",data:{},labels:{}};zi&&Object.assign(r.labels,zi()),t.dataKeys.forEach((function(t){return r.data[t]=e[t]})),t.labelKeys&&(Array.isArray(t.labelKeys)?t.labelKeys.forEach((function(t){return r.labels[t]=e[t]})):Object.assign(r.labels,t.labelKeys)),function(e){Wi.logByKtracker(e)}(r)}function ro(e){return $i($i({},e),{},{pluginName:"customPad"})}function no(e){return(no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function io(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ao(e,t,r){return(Ao="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=co(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function ao(e,t){return(ao=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function so(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=co(e);if(t){var i=co(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return uo(this,r)}}function uo(e,t){return!t||"object"!==no(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function co(e){return(co=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lo={entry:Ki,monitor:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ao(e,t)}(o,e);var t,r,n,i=so(o);function o(){return io(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"init",value:function(){Ao(co(o.prototype),"init",this).call(this),this.addConfig({sendLog:to,perfLogConfig:Ji,timeLogConfig:Xi})}}])&&oo(t.prototype,r),n&&oo(t,n),o}(_i.Monitor)};var go,fo,ho=r(60),po=r(723),Io=r(359);function yo(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Co(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){yo(o,n,i,A,a,"next",e)}function a(e){yo(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Eo(e){return function(e){if(Array.isArray(e))return mo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||vo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bo(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=vo(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function vo(e,t){if(e){if("string"==typeof e)return mo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mo(e,t):void 0}}function mo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){e[e.autoBackup=1]="autoBackup",e[e.transaction=2]="transaction",e[e.version=4]="version",e[e.modelBinding=8]="modelBinding",e[e.autoSave=16]="autoSave"}(go||(go={})),function(e){e[e.requestBackup=0]="requestBackup",e[e.forceBackup=1]="forceBackup",e[e.mergeRecorder=2]="mergeRecorder",e[e.notifyModelChange=3]="notifyModelChange",e[e.autoSave=4]="autoSave",e[e.save=5]="save",e[e.revert=6]="revert"}(fo||(fo={}));var bo=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.autoSaveInterruptSwitch=new po.InterruptSwitch((function(e){e?t.kafDocument.autoSave.stop():t.kafDocument.autoSave.start()})),this.keyCache=new Set,this.requestBackupTimes=0,this.maxRequestBackupTimes=1e3,this.throttleRequestBackup=Object(ho.throttleInRaf)((function(){_i.Util.safeExec((function(){++t.requestBackupTimes>t.maxRequestBackupTimes?Object(Io.devError)("requestBackup long time on backup"):t.kafDocument.autoBackupBlockKeys.size>0?t.requestBackup():t.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&t.kafDocument.requestBackup()}))}),1)}var t,r,n;return t=e,(r=[{key:"revert",value:function(){var e=this;_i.Util.safeExec((function(){var t,r=Bo(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().getTransactionContext().revert()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"requestBackup",value:function(){this.requestBackupTimes=0,this.throttleRequestBackup()}},{key:"forceBackup",value:function(){var e=this;_i.Util.safeExec((function(){e.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&e.kafDocument.backup()}))}},{key:"mergeRecorder",value:function(){var e=this;_i.Util.safeExec((function(){var t,r=Bo(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().getTransactionContext().mergeRecorder()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"notifyModelChange",value:function(){var e=this;_i.Util.safeExec((function(){var t,r=Bo(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().notifyModelChange()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"save",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_i.Util.safeExec((function(){e.kafDocument.saveDocument(t)}))}},{key:"interruptSingle",value:function(e,t){var r=this,n={};return t.includes(go.autoBackup)&&_i.Util.safeExec((function(){n[go.autoBackup]=(new Date).getTime().toString()+e.getId(),r.kafDocument.pauseAutoBackup(n[go.autoBackup])}),!1),t.includes(go.transaction)&&_i.Util.safeExec((function(){n[go.transaction]=e.getDoc().getTransactionSwitch().interrupt()})),t.includes(go.version)&&_i.Util.safeExec((function(){n[go.version]=e.getDoc().getVersionSwitch().interrupt()})),t.includes(go.modelBinding)&&_i.Util.safeExec((function(){n[go.modelBinding]=e.getDoc().getModelBindingSwitch().interrupt()})),t.includes(go.autoSave)&&_i.Util.safeExec((function(){n[go.autoSave]=r.autoSaveInterruptSwitch.interrupt()})),n}},{key:"interrupt",value:function(e,t){var r,n=this,i={},o=Bo(this.docs);try{for(o.s();!(r=o.n()).done;){var A=r.value;i[A.getId()]=this.interruptSingle(A,e)}}catch(e){o.e(e)}finally{o.f()}return this.keyCache.add(i),t&&setTimeout((function(){return n.resume(i)}),t),i}},{key:"resumeSingle",value:function(e,t){var r=this;t[go.autoBackup]&&_i.Util.safeExec((function(){r.kafDocument.requestResumeAutoBackup(t[go.autoBackup])}),!1),t[go.transaction]&&_i.Util.safeExec((function(){e.getDoc().getTransactionSwitch().resume(t[go.transaction])})),t[go.version]&&_i.Util.safeExec((function(){e.getDoc().getVersionSwitch().resume(t[go.version])})),t[go.modelBinding]&&_i.Util.safeExec((function(){e.getDoc().getModelBindingSwitch().resume(t[go.modelBinding])})),t[go.autoSave]&&_i.Util.safeExec((function(){r.autoSaveInterruptSwitch.resume(t[go.autoSave])}))}},{key:"resume",value:function(e,t){var r,n=Bo(this.docs);try{for(n.s();!(r=n.n()).done;){var i=r.value,o=e[i.getId()];o&&this.resumeSingle(i,o)}}catch(e){n.e(e)}finally{n.f()}this.keyCache.delete(e),t&&this.afterActions(t)}},{key:"forceResumeAll",value:function(){var e=this;Eo(this.keyCache.values()).forEach((function(t){return e.resume(t)}))}},{key:"interruptActions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[go.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[fo.requestBackup],n=arguments.length>3?arguments[3]:void 0,i=this;return function(){var o={};try{o=i.interrupt(t,n);for(var A=arguments.length,a=new Array(A),s=0;s<A;s++)a[s]=arguments[s];var u=e.apply(this,a);return u}finally{i.resume(o,r)}}}},{key:"interruptActionsAsync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[go.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[fo.requestBackup],n=arguments.length>3?arguments[3]:void 0,i=this;return Co(s.a.mark((function o(){var A,a,u,c,l,g=arguments;return s.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:for(A={},o.prev=1,A=i.interrupt(t,n),a=g.length,u=new Array(a),c=0;c<a;c++)u[c]=g[c];return o.next=6,e.apply(this,u);case 6:return l=o.sent,o.abrupt("return",l);case 8:return o.prev=8,i.resume(A,r),o.finish(8);case 11:case"end":return o.stop()}}),o,this,[[1,,8,11]])})))}},{key:"afterActions",value:function(e){e.includes(fo.mergeRecorder)&&this.mergeRecorder(),e.includes(fo.requestBackup)?this.requestBackup():e.includes(fo.forceBackup)?this.forceBackup():e.includes(fo.revert)&&this.revert(),e.includes(fo.notifyModelChange)&&this.notifyModelChange(),e.includes(fo.autoSave)?this.save(!0):e.includes(fo.save)&&this.save()}}])&&Qo(t.prototype,r),n&&Qo(t,n),e}(),_o=r(529),So=r.n(_o),wo=r(290);function Do(e){return(Do="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ro(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mo(e,t){return(Mo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=To(e);if(t){var i=To(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Po(this,r)}}function Po(e,t){return!t||"object"!==Do(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function To(e){return(To=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mo(e,t)}(o,e);var t,r,n,i=xo(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).model=e,t}return t=o,(r=[{key:"toModel",value:function(){return this.model}}])&&Ro(t.prototype,r),n&&Ro(t,n),o}(Si.BackupItem);var Oo=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.doc=t,this.key=r,this.BackupItemImpl=Fo,this.getModel=function(){var e=n.doc.getTransactionContext();return e.commitRecorder(),{recorderId:e.getCurrentId()}},this.onUpdateModel=function(e,t){var r=n.doc.getTransactionContext();t===wo.ModelUpdateType.redo?r.redoToRecorder(e.recorderId):t===wo.ModelUpdateType.undo?r.undoToRecorder(e.recorderId):t===wo.ModelUpdateType.revert&&r.revert()},this.updateListeners=function(e,t){var r=n.doc;e?(r.getTransactionSwitch().resumeAll(),r.requestCommit=t):r.requestCommit=void 0},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.open=function(){return Promise.resolve()}};function Lo(e){return(Lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ko(e){return function(e){if(Array.isArray(e))return Uo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Go(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function No(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Go(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Go(e,t){if(e){if("string"==typeof e)return Uo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Uo(e,t):void 0}}function Uo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jo(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Vo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ho(e,t,r){return t&&Yo(e.prototype,t),r&&Yo(e,r),e}function Ko(e,t){return(Ko=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Wo(e);if(t){var i=Wo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jo(this,r)}}function Jo(e,t){return!t||"object"!==Lo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wo(e){return(Wo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ko(e,t)}(r,e);var t=qo(r);function r(){var e;return Vo(this,r),(e=t.apply(this,arguments)).doc=new Xe.CDoc,e}return Ho(r,[{key:"getDoc",value:function(){return this.doc}}]),r}(So()(Object)),Xo=new(function(){function e(){Vo(this,e),this.stacks=[{documentAction:new bo}]}var t,r;return Ho(e,[{key:"getTopDocumentAction",value:function(){return this.stacks[this.stacks.length-1].documentAction}},{key:"configTopDocumentAction",value:function(e,t){var r=this.getTopDocumentAction();return r.docs=e,r.kafDocument=t,r}},{key:"pushDocumentAction",value:(t=s.a.mark((function e(){var t,r,n,i,o,A,a,u,c,l,g,f,h,p,d,I=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=I.length>0&&void 0!==I[0]?I[0]:[],r=this.stacks[this.stacks.length-1],n=r.documentAction.interrupt([go.autoBackup]),i=new bo,o=new zo,A=new Si.DocumentStateManager,a=No(this.stacks);try{for(a.s();!(u=a.n()).done;){c=u.value,l=No(c.documentAction.docs);try{for(l.s();!(g=l.n()).done;)g.value.getDoc().addTransactionHook(o.getDoc().onTrackTransaction)}catch(e){l.e(e)}finally{l.f()}}}catch(e){a.e(e)}finally{a.f()}i.docs=[o].concat(ko(t)),i.kafDocument=A,f=new Oo(o.getDoc(),"tempDocumentSource".concat(this.stacks.length)),A.addDocumentSource(f),h=No(t);try{for(h.s();!(p=h.n()).done;)d=p.value,A.addDocumentSource(new Oo(d.getDoc(),d.getId()))}catch(e){h.e(e)}finally{h.f()}return A.initState(),e.next=17,A.start();case 17:return this.stacks.push({documentAction:i,interruptKey:n,tempDoc:o,tempDocumentSource:f}),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e,this)})),r=function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function A(e){jo(o,n,i,A,a,"next",e)}function a(e){jo(o,n,i,A,a,"throw",e)}A(void 0)}))},function(){return r.apply(this,arguments)})},{key:"popDocumentAction",value:function(){if(this.stacks.length<=1)throw new Error("stasks has no extra document");var e,t=this.stacks.pop(),r=t.tempDoc,n=t.documentAction,i=t.interruptKey,o=No(this.stacks);try{for(o.s();!(e=o.n()).done;){var A,a=No(e.value.documentAction.docs);try{for(a.s();!(A=a.n()).done;){A.value.getDoc().removeTransactionHook(r.getDoc().onTrackTransaction)}}catch(e){a.e(e)}finally{a.f()}}}catch(e){o.e(e)}finally{o.f()}n.kafDocument.dispose(),this.getTopDocumentAction().resume(i,[fo.requestBackup])}}]),e}());function Zo(e){return(Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $o(e,t){return($o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=rA(e);if(t){var i=rA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return tA(this,r)}}function tA(e,t){return!t||"object"!==Zo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rA(e){return(rA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$o(e,t)}(r,e);var t=eA(r);function r(e,n){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=t.call(this,e.getDoc(),n)).key=n,i}return r}(Oo);function iA(e){return(iA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function AA(e,t){return(AA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function aA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=uA(e);if(t){var i=uA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return sA(this,r)}}function sA(e,t){return!t||"object"!==iA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function uA(e){return(uA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&AA(e,t)}(o,e);var t,r,n,i=aA(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).model=e,t}return t=o,(r=[{key:"toModel",value:function(){return this.model}}])&&oA(t.prototype,r),n&&oA(t,n),o}(Si.BackupItem);var lA,gA,fA=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.design=t,this.key=r,this.disposeListener=Ot.noop,this.BackupItemImpl=cA,this.open=function(){return Promise.resolve()},this.getModel=function(){return n.design},this.onUpdateModel=function(e){n.design=e},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.afterInit=function(e){kt.addSetHook(e)},this.beforeDispose=function(){}},hA=r(161);!function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(lA||(lA={})),function(e){e.SELECTED="SELECTED"}(gA||(gA={}));var pA=Symbol("paramModelAssembly"),dA=Symbol("paramModel");function IA(e,t){return(IA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=EA(e);if(t){var i=EA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return CA(this,r)}}function CA(e,t){return!t||"object"!==BA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function EA(e){return(EA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function BA(e){return(BA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var vA,mA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":BA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},QA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":BA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},bA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&IA(e,t)}(r,e);var t=yA(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).model=e,n._parent=void 0,n._children=[],n.entityType=pA,n.entityId=e.getId(),n}return r}(Si.Entity),_A=bA=mA([Object(Si.provideEntityAPIs)([new Si.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))]),QA("design:paramtypes",["function"==typeof(vA=void 0!==Ve.CoreParamModelAssembly&&Ve.CoreParamModelAssembly)?vA:Object])],bA);function SA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&DA(e,t)}function DA(e,t){return(DA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function RA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=xA(e);if(t){var i=xA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return MA(this,r)}}function MA(e,t){return!t||"object"!==PA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xA(e){return(xA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function PA(e){return(PA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var TA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":PA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},FA=function(e){wA(r,e);var t=RA(r);function r(e,n){var i;return SA(this,r),(i=t.call(this)).model=e,i.context=n,i._parent=void 0,i._children=[],i.entityType=n.type,i.entityId=e.getId(),i}return r}(Si.Entity),OA=function(e){wA(r,e);var t=RA(r);function r(){return SA(this,r),t.apply(this,arguments)}return r}(FA);OA=TA([Object(Si.provideEntityAPIs)([new Si.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],OA);var LA=r(6),kA=r.n(LA),NA=r(190);function GA(e){return(GA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var UA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":GA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},jA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":GA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},VA=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.interactionPriority=0,this.selectable=!0};function YA(e){return function(t,r){var n=function(e,t){try{var r=e.materialReplacedInfos,n=e.materialUVEditInfos,i=e.texture,o=e.opacity;if(!(r&&r.length||n&&n.length||i))return t.getMesh()+(1!==o?String(o):"")+t.getMtl().reduce((function(e,t){var r=[];return r.push(e,t.getObjName(),t.getDiffuseTexture(),t.getReflectGlossiness(),t.getFresnel(),t.getU(),t.getV(),t.getW(),t.getH()),t.getDiffuseTextureScale()&&r.push(t.getDiffuseTextureScale().toString()),t.getDiffuseColor()&&r.push(t.getDiffuseColor().toString()),t.getReflectColor()&&r.push(t.getReflectColor().toString()),t.getRefractColor()&&r.push(t.getRefractColor().toString()),r.join("#")}),"")}catch(e){A=e,setTimeout((function(){throw A}))}var A;return null}(t,r);return e+n}}function HA(e){return(HA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function KA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qA(e,t){return(qA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function JA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zA(e);if(t){var i=zA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return WA(this,r)}}function WA(e,t){return!t||"object"!==HA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zA(e){return(zA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}UA([Ft.observable,jA("design:type",Number)],VA.prototype,"opacity",void 0),UA([Ft.observable,jA("design:type",Boolean)],VA.prototype,"visible",void 0);var XA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qA(e,t)}(o,e);var t,r,n,i=JA(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).props=e,t.material=new LA.LineBasicMaterial({color:lA.outline}),t.setAttribute("outline",!1),t.setAttribute("shadowCaster",!1),t.update({}),t}return t=o,(r=[{key:"updateProps",value:function(e){var t=this.props;this.props=e,this.update(t)}},{key:"update",value:function(e){var t,r,n=this.props.points;if(e.points!==n){var i=(t=n,(r=new LA.BufferGeometry).addAttribute("position",new LA.Float32BufferAttribute(t,3)),r);this.geometry=i,this.computeLineDistances()}var o=this.props,A=o.color,a=void 0===A?lA.outline:A,s=o.visible,u=void 0===s||s;this.material.setValues({color:a}),this.visible=u}}])&&KA(t.prototype,r),n&&KA(t,n),o}(LA.LineSegments),ZA=r(360),$A=r(84);function ea(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ta(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ra=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ea(Object(r),!0).forEach((function(t){ta(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ea(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({side:LA.Side.FrontSide,specular:1118481,shininess:15},{polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:15});function na(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ia(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?na(Object(r),!0).forEach((function(t){oa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):na(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function oa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Aa(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function aa(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Aa(o,n,i,A,a,"next",e)}function a(e){Aa(o,n,i,A,a,"throw",e)}A(void 0)}))}}function sa(e){return ua.apply(this,arguments)}function ua(){return(ua=aa(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.material,n=t.materialInfo,i=t.opacity,o=void 0===i?1:i,A=t.textureUrl,a=t.textureSize,u=null==n?void 0:n.getRefractColor(),c=ia({},ra),u&&(l=Object($A.clamp)(Math.max(u.x,u.y,u.z),0,1),r.transparent=l>.01,c.opacity=Math.max(1-l,.1)),"number"==typeof o&&(o=o>1?1:o<0?0:o,c.transparent=o<1,c.opacity=o,c.depthWrite=!c.transparent),g=A||(null==n?void 0:n.getDiffuseTexture()),!Object(Ot.isEmpty)(g)){e.next=12;break}(f=null==n?void 0:n.getDiffuseColor())&&(c.color=new LA.Color(f.x,f.y,f.z).getHex()),c.texture=null,e.next=25;break;case 12:if(r.diffuseTextureUrl=g,a){e.next=18;break}return e.next=16,Object(ZA.loadImage)(g);case 16:h=e.sent,a={x:h.naturalWidth,y:h.naturalHeight};case 18:return e.next=20,Object(ZA.loadTexture)(g,{wrapS:LA.WebGLTextureWrap.Repeat,wrapT:LA.WebGLTextureWrap.Repeat,cacheReject:!0});case 20:(p=e.sent).repeat=new LA.Vector2(1/a.x,1/a.y),p.updateMatrix(),c.uvTransform=p.matrix,c.texture=p;case 25:r.setValues(c);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ca(e){return(ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function la(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ga(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){la(o,n,i,A,a,"next",e)}function a(e){la(o,n,i,A,a,"throw",e)}A(void 0)}))}}function fa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ha(e,t){return(ha=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ia(e);if(t){var i=Ia(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return da(this,r)}}function da(e,t){return!t||"object"!==ca(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ia(e){return(Ia=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ya=new LA.BufferGeometry;var Ca=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ha(e,t)}(a,e);var t,r,n,i,o,A=pa(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=A.call(this)).props=e,t.categoryId=_i.EDCCountCategory.PHONG,t.material=new LA.MeshPhongMaterial({transparent:!0}),t.update({}),t}return t=a,(r=[{key:"getProps",value:function(){return this.props}},{key:"updateProps",value:function(e){var t=this.props;this.props=e,this.update(t)}},{key:"update",value:(o=ga(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.props.visible,n=void 0===r||r,this.props.geometry!==t.geometry&&this.updateGeometry(),this.props.textureSize===t.textureSize&&this.props.tiledImgUrl===t.tiledImgUrl&&this.props.opacity===t.opacity&&this.props.popBufferMtl===t.popBufferMtl){e.next=5;break}return e.next=5,this.updateMaterial();case 5:this.visible=n;case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"updateGeometry",value:function(){var e,t,r,n,i,o,A=this.props.geometry;this.geometry&&this.geometry.dispose(),this.geometry=A?(e=A,t=new LA.BufferGeometry,r=new Uint32Array(e.indices),n=new Float32Array(e.vertices),i=new Float32Array(e.normals),o=new Float32Array(e.textures),t.index=new LA.BufferAttribute(r,1),t.addAttribute("position",new LA.BufferAttribute(n,3)),t.addAttribute("uv",new LA.BufferAttribute(o,2)),i&&i.length?t.addAttribute("normal",new LA.BufferAttribute(i,3)):t.computeVertexNormals(),t):ya}},{key:"updateMaterial",value:(i=ga(s.a.mark((function e(){var t,r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,r=t.popBufferMtl,n=t.opacity,i=t.tiledImgUrl,o=t.textureSize,e.next=3,sa({material:this.material,materialInfo:r,opacity:n,textureUrl:i,textureSize:o});case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&fa(t.prototype,r),n&&fa(t,n),a}(LA.Mesh);function Ea(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ba(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ba(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Ba(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function va(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ma(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ba={meshModels:[],renderChildNodes:[],furnitureModels:[],legal:!1,legalMesh:!1};var _a=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=t,this.context=r,this.modelDepProps=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?va(Object(r),!0).forEach((function(t){ma(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):va(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},ba),this.childNodeDrawables=[],this.displayInfoDrawables=[],this.meshes=[],this.childNodeMeshes=[],this.displayInfoMeshs=[],this.state=new VA,this.id=t.model.getId(),this.type=r.type;var n,i=Ea(r.stateReducers);try{for(i.s();!(n=i.n()).done;){(0,n.value)(t.model,!1,this.state)}}catch(e){i.e(e)}finally{i.f()}}var t,r,n;return t=e,(r=[{key:"interactionPriority",get:function(){return this.state.interactionPriority}},{key:"pickActualInteractiveEntity",value:function(e){var t=this,r=e.intersection.object,n=function(){for(;r;){var e=t.context.objectManager.getInfo(r);if(e)return{entityId:e.id,entityType:e.type};r=r.parent}return{entityId:t.id,entityType:t.context.type}}();return this.context.pickActualInteractiveEntity(n,{point:e.intersection.point})}},{key:"create",value:function(e){var t,r=this.props.model,n=new LA.Group;return n.uuid=this.id,n.visible=null===(t=this.state.visible)||void 0===t||t,this.context.filterParamModel(r)&&(this.renderMeshes(n,r,e),this.renderChildNodeMeshes(n,r,e),this.renderDisplayInfoMesh(n,r,e),this.renderDisplayInfoMeshes(n,r,e),this.applyTransform(n,r),this.context.objectManager.addObject(n,{drawable:this,type:this.type,id:this.id,drawableState:this.state,model:r})),n}},{key:"update",value:function(e,t){var r,n=this.props.model;e.visible=null===(r=this.state.visible)||void 0===r||r,this.renderMeshes(e,n,t),this.renderChildNodeMeshes(e,n,t),this.renderDisplayInfoMesh(e,n,t),this.renderDisplayInfoMeshes(e,n,t),this.renderLineSegments(e,n),this.applyTransform(e,n)}},{key:"dispose",value:function(e){this.disposeMeshes(e),this.disposeDisplayInfoMesh(e),this.disposeDisplayInfoMeshs(e),this.disposeChildNodeMeshes(e),this.disposeLineSegments(e),this.context.objectManager.removeObject(e)}},{key:"applyTransform",value:function(e,t){var r=t.getPosition(),n=t.getScale(),i=t.getRotation();e.position.set(r.x,r.y,r.z),e.rotation.set(i.x,i.y,i.z),e.scale.set(n.x,n.y,n.z)}},{key:"disposeMeshes",value:function(e){for(var t=0;t<this.meshes.length;t++)Object(NA.dispose)(this.meshes[t]);e.removeObjects(this.meshes)}},{key:"disposeChildNodeMeshes",value:function(e){for(var t=0;t<this.childNodeDrawables.length;t++)this.childNodeDrawables[t].dispose(this.childNodeMeshes[t]),Object(NA.dispose)(this.childNodeMeshes[t]);e.removeObjects(this.childNodeMeshes)}},{key:"disposeDisplayInfoMesh",value:function(e){this.displayInfoDrawable&&this.displayInfoMesh&&(this.displayInfoDrawable.dispose(this.displayInfoMesh),Object(NA.dispose)(this.displayInfoMesh),e.remove(this.displayInfoMesh))}},{key:"disposeDisplayInfoMeshs",value:function(e){for(var t=0;t<this.displayInfoDrawables.length;t++)this.displayInfoDrawables[t].dispose(this.displayInfoMeshs[t]),Object(NA.dispose)(this.displayInfoMeshs[t]);e.removeObjects(this.displayInfoMeshs)}},{key:"disposeLineSegments",value:function(e){this.lineSegments&&(Object(NA.dispose)(this.lineSegments),e.remove(this.lineSegments))}},{key:"renderMeshes",value:function(e,t,r){var n,i,o,A=this.modelDepProps,a=null!==(n=this.state.opacity)&&void 0!==n?n:1,s=t.getMeshModels(),u=t.getLegal(),c=t.getLegalMesh();if(A.meshModels!==s||A.legal!==u||A.legalMesh!==c){A.meshModels=s,A.legal=u,A.legalMesh=c,this.disposeMeshes(e);var l=[];if(u&&c)for(var g,f=s.length;f--;)g=s[f],g=new Ca({geometry:g.geometry,tiledImgUrl:g.texture&&(g.texture.hdTiledImageUrl||g.texture.tiledImgUrl),textureSize:null===(i=g.texture)||void 0===i?void 0:i.size,opacity:a,popBufferMtl:g.displayMaterial}),l[f]=g,e.add(g);this.meshes=l}else for(var h,p=this.meshes,d=s.length;d--;)h=s[d],p[d].updateProps({geometry:h.geometry,tiledImgUrl:h.texture&&(h.texture.hdTiledImageUrl||h.texture.tiledImgUrl),textureSize:null===(o=h.texture)||void 0===o?void 0:o.size,opacity:a,popBufferMtl:h.displayMaterial})}},{key:"renderChildNodeMeshes",value:function(e,t,r){var n,i=(n=t,n.getChildren().filter((function(e){return e.getLegal()})).concat(n.getAccessories())).filter(this.context.filterParamModel);if(Object(Ot.isEqual)(this.modelDepProps.renderChildNodes,i))for(var o=0;o<this.childNodeDrawables.length;o++){var A=this.childNodeDrawables[o],a=this.childNodeMeshes[o];A.update(a,r)}else if(this.modelDepProps.renderChildNodes=i,this.disposeChildNodeMeshes(e),this.childNodeDrawables=i.map(this.props.renderChild),this.childNodeMeshes=this.childNodeDrawables.map((function(e){return e.create(r)})),this.childNodeMeshes.length>0){var s,u=Ea(this.childNodeMeshes);try{for(u.s();!(s=u.n()).done;){var c=s.value;e.add(c)}}catch(e){u.e(e)}finally{u.f()}}}},{key:"renderDisplayInfoMesh",value:function(e,t,r){var n=t.getFurnitureModel();this.modelDepProps.furnitureModel!==n?(this.modelDepProps.furnitureModel=n,this.disposeDisplayInfoMesh(e),n&&(this.displayInfoDrawable=new Si.DisplayInfoDrawable({displayInfo:n.displayInfo,position:n.furnitureTranslation||je.a.ZERO,size:n.size.clone().div(n.scale),scale:je.a.ONE,rotation:je.a.ZERO,generateComponentInstanceKey:YA(t.getId()),getMaterialSideProperty:function(){return LA.Side.DoubleSide}}),this.displayInfoMesh=this.displayInfoDrawable.create(r),e.add(this.displayInfoMesh))):this.displayInfoDrawable&&this.displayInfoDrawable.update(this.displayInfoMesh)}},{key:"renderDisplayInfoMeshes",value:function(e,t,r){var n=t.getFurnitureModels();if(this.modelDepProps.furnitureModels!==n){if(this.modelDepProps.furnitureModels=n,this.disposeDisplayInfoMeshs(e),this.displayInfoDrawables=n.map((function(e){return new Si.DisplayInfoDrawable({displayInfo:e.displayInfo,position:e.position,size:e.size,scale:e.scale,rotation:e.rotate,generateComponentInstanceKey:YA(t.getId())})})),this.displayInfoMeshs=this.displayInfoDrawables.map((function(e){return e.create(r)})),this.displayInfoMeshs.length>0){var i,o=Ea(this.displayInfoMeshs);try{for(o.s();!(i=o.n()).done;){var A=i.value;e.add(A)}}catch(e){o.e(e)}finally{o.f()}}}else for(var a=0;a<this.displayInfoDrawables.length;a++){var s=this.displayInfoDrawables[a],u=this.displayInfoMeshs[a];s.update(u)}}},{key:"renderLineSegments",value:function(e,t){var r,n=t.getWireFrames(),i=this.context.store.showOutline;this.modelDepProps.wireFrames!==n?(this.modelDepProps.wireFrames=n,this.disposeLineSegments(e),this.lineSegments=new XA({points:n||[],visible:i}),e.add(this.lineSegments)):null===(r=this.lineSegments)||void 0===r||r.updateProps({points:n||[],visible:i})}}])&&Qa(t.prototype,r),n&&Qa(t,n),e}();function Sa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wa(e,t){return(wa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Da(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ma(e);if(t){var i=Ma(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ra(this,r)}}function Ra(e,t){return!t||"object"!==xa(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ma(e){return(Ma=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xa(e){return(xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Pa=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":xa(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Ta=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wa(e,t)}(r,e);var t=Da(r);function r(){var e;return Sa(this,r),(e=t.apply(this,arguments))._parent=void 0,e}return r}(FA);function Fa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function La(e,t,r){return t&&Oa(e.prototype,t),r&&Oa(e,r),e}function ka(e,t,r){var n=r.getEntity(e)||function(e,t){if(t.filterParamModel(e))return e.isRoot()?new Ta(e,t):new OA(e,t)}(e,t);if(n){r.registerEntity(e,n);var i=e.getParent();return i&&(n._parent=r.getEntity(i)),n._children=e.getChildNodes().map((function(e){return ka(e,t,r)})).filter((function(e){return!!e})),n}}Ta=Pa([Object(Si.provideEntityAPIs)([new Si.EntityAPIs.DrawableAPI3D((function(){var e=this;return new _a({model:this.model,renderChild:function t(r){return new _a({model:r,renderChild:t},e.context)}},this.context)})),new Si.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],Ta);var Na=function(){function e(t){var r=this;Fa(this,e),this.context=t,this.entityCaches=new WeakMap,this.entities=[],this.registerEntity=function(e,t){r.entityCaches.has(e)||r.entityCaches.set(e,t),r.entities.push(t)},this.getEntity=function(e){return r.entityCaches.get(e)}}return La(e,[{key:"createEntities",value:function(e){var t={registerEntity:this.registerEntity,getEntity:this.getEntity};this.entities=[];for(var r=0,n=e.length;r<n;r++)ka(e[r],this.context,t);return this.entities}},{key:"createAssemblyEntities",value:function(e){return e.map((function(e){return new _A(e)}))}}]),e}(),Ga=function(){function e(t,r){Fa(this,e),this.getCustom=t,this.getEntities=[this.getParamModelEntities,this.getParamModelAssemblyEntities],this.factory=new Na(r)}return La(e,[{key:"getParamModelEntities",value:function(){var e=this.getCustom();return void 0!==e?this.factory.createEntities(e.getParamModels()):[]}},{key:"getParamModelAssemblyEntities",value:function(){var e=this.getCustom();return void 0!==e?this.factory.createAssemblyEntities(e.getParamModelAssemblies()):[]}}]),e}();function Ua(e){return(Ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ja=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ua(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Va=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ua(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Ya=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.showOutline=!1,this.selected=[]};function Ha(e){return function(e){if(Array.isArray(e))return Ka(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ka(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ka(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ka(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}ja([Ft.observable,Va("design:type",Object)],Ya.prototype,"showOutline",void 0),ja([Ft.observable,Va("design:type",Array)],Ya.prototype,"selected",void 0);var Ja=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.infoMap=new Map,this.idMap=new Map}var t,r,n;return t=e,(r=[{key:"addObject",value:function(e,t){this.infoMap.set(e,t),this.idMap.set(t.id,t)}},{key:"removeObject",value:function(e){var t=this.infoMap.get(e);t&&(this.infoMap.delete(e),t===this.idMap.get(t.id)&&this.idMap.delete(t.id))}},{key:"getInfo",value:function(e){return e instanceof LA.Object3D?this.infoMap.get(e):this.idMap.get(e)}},{key:"getInfos",value:function(){return Ha(this.idMap.entries())}}])&&qa(t.prototype,r),n&&qa(t,n),e}(),Wa=r(189);function za(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Xa=function(){function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.selectionStateManager=t,this.entityTypes=r,this.onSelectChange=n,this._onStateChange=function(){i.onStateChange()},this.init()}var t,r,n;return t=e,(r=[{key:"isSelected",value:function(e){return!!this.selected.find((function(t){return t.entityId===e}))}},{key:"init",value:function(){this.enable()}},{key:"release",value:function(){this.disable()}},{key:"enable",value:function(){this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Wa.UPDATE,this._onStateChange),this.onStateChange()}},{key:"disable",value:function(){this.selectionStateManager.off(Wa.UPDATE,this._onStateChange),this.rawSelected=[],this.selected=[]}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value,t=this.rawSelected,r=this.selected;if(this.rawSelected!==e){this.rawSelected=e;var n=this.resolveSelected(e)||[];this.resolveSelectedChanged(this.selected,n)&&(this.selected=n)}t!==e&&this.onSelectChange(this.selected,r)}},{key:"resolveSelected",value:function(e){var t=this;return e.filter((function(e){return t.entityTypes.includes(e.entityType)}))}},{key:"resolveSelectedChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=function(e,t){return e>t?1:e===t?0:-1},n=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),i=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),o=0,A=i.length;o<A;++o)if(n[o]!==i[o])return!0;return!1}}])&&za(t.prototype,r),n&&za(t,n),e}();function Za(e){return(Za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||ts(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function es(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=ts(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function ts(e,t){if(e){if("string"==typeof e)return rs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rs(e,t):void 0}}function rs(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ns(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function is(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function os(e,t){return(os=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function As(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ss(e);if(t){var i=ss(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return as(this,r)}}function as(e,t){return!t||"object"!==Za(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ss(e){return(ss=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Xa.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED";var us=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&os(e,t)}(o,e);var t,r,n,i=As(o);function o(){var e;return ns(this,o),(e=i.apply(this,arguments)).store=new Ya,e.objectManager=new Ja,e.stateReducers=[],e.onScene3DInit=function(t){e.appService.stateManager.registerView(e._scene3dId).registerDefaultSystems3D(e._scene3dId,t).activeView(e._scene3dId)},e.toggleShowModelOutline=function(t){e.store.showOutline=t},e.updateModelState=function(t,r){var n=e.objectManager.getInfo(t),i=e.selectManager.isSelected(t);r(n.drawableState,i)},e.updateModelsState=function(t){var r,n=es(e.objectManager.getInfos());try{for(n.s();!(r=n.n()).done;){var i=$a(r.value,2),o=i[0],A=i[1],a=e.selectManager.isSelected(o);t(o,A.drawableState,a)}}catch(e){n.e(e)}finally{n.f()}},e}return t=o,(r=[{key:"config",value:function(e,t){var r=this;this._scene3dId=t.scene3dID||"scene3d",this.appService=e;var n=e.stateManager,i=t.paramModelSymbol,o=t.getDoc,A=t.getCustom,a=t.pickActualInteractiveEntity,s=void 0===a?function(e){return e}:a,u=t.filterParamModel;this.selectManager=new Xa(n.selection,[i],(function(e,t){r.store.selected=e,r.emit(gA.SELECTED,{selected:e,oldSelected:t})})),e.registerEntityDocument(new Ga(A,{store:this.store,type:i,objectManager:this.objectManager,pickActualInteractiveEntity:s,stateReducers:this.stateReducers,filterParamModel:u}));var c=o().getElementContext();return c.getterEmitter.on((function(e){Ft.advanced.reportObserved(e.instance)})),c.setterEmitter.on((function(e){Ft.advanced.reportChanged(e.instance)})),this}},{key:"registerReducer",value:function(e){this.stateReducers.push(e)}},{key:"triggerReducer",value:function(e){var t,r=es(this.objectManager.getInfos());try{for(r.s();!(t=r.n()).done;){var n=$a(t.value,2),i=n[0],o=n[1];if(!e||e.includes(i)){var A,a=this.selectManager.isSelected(i),s=es(this.stateReducers);try{for(s.s();!(A=s.n()).done;)(0,A.value)(o.model,a,o.drawableState)}catch(e){s.e(e)}finally{s.f()}}}}catch(e){r.e(e)}finally{r.f()}}},{key:"scene3dId",get:function(){return this._scene3dId}}])&&is(t.prototype,r),n&&is(t,n),o}(Pt.EventEmitter),cs=r(289),ls=r.n(cs),gs=r(730);function fs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ps(e,t,r){return t&&hs(e.prototype,t),r&&hs(e,r),e}function ds(e){return(ds="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Is,ys,Cs,Es,Bs=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ds(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},vs=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":ds(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function ms(e){var t=this;if(t===Cs.GUARD)return function(e,t,r){var n=r.value;return(r=Object.assign({},r)).value=function(){var e,r=void 0,i=this.__TRANSFORM_CONTEXT_ADD_DEP;if(i)if(Es){if(i!==Es)throw Error("CUSTOM: Access model data by crossing stub");i=void 0}else;i&&(Es=i,$e.a.begGetDeps(i));try{e=n.apply(this,arguments)}catch(e){r=e}if(i&&(Es=void 0,$e.a.endGetDeps(i)),r)throw r.message="CUSTOM: ["+t+"] "+r.message,r;return e},r};var r=0===arguments.length;return function(n,i){if(r){var o="get"+i[0].toLocaleUpperCase()+i.slice(1);e=function(e){return e[o]()}}if(!n.hasOwnProperty("__lazyKeys")){var A=[],a=[],s=[];Object.defineProperty(n,"__lazyKeys",{configurable:!0,enumerable:!0,value:A}),Object.defineProperty(n,"__immeKeys",{configurable:!0,enumerable:!0,value:a}),Object.defineProperty(n,"__immeVals",{configurable:!0,enumerable:!0,value:s});var u=n.__accessLazyValues,c=n.__accessImmeValues;Object.defineProperty(n,"__accessImmeValues",{configurable:!0,enumerable:!0,value:function(){c&&c.call(this);for(var e=void 0,t=0,r=a.length;t<r;++t)e=s[t],this[a[t]]=Object(Ot.isFunction)(e)?e(this.__DONT_USE_ME):e}}),Object.defineProperty(n,"__accessLazyValues",{configurable:!0,enumerable:!0,value:function(){u&&u.call(this);for(var e=0,t=A.length;e<t;++e)this[A[e]]}})}t===Cs.LAZY?(n.__lazyKeys.push(i),Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){var t=this.__LAZY_VALUES;if(t.__keys[i])return t[i];var r=e;if(Object(Ot.isFunction)(e)){var n=void 0,o=this.__TRANSFORM_CONTEXT_ADD_DEP;if(o)if(Es){if(o!==Es)throw Error("CUSTOM: Access model data by crossing stub");o=void 0}else;o&&(Es=o,$e.a.begGetDeps(o));try{r=e(this.__DONT_USE_ME,this)}catch(e){n=e}if(o&&(Es=void 0,$e.a.endGetDeps(o)),n)throw n.message="CUSTOM: ["+i+"] "+n.message,n}return t[i]=r,t.__keys[i]=!0,r}})):(n.__immeKeys.push(i),n.__immeVals.push(e))}}!function(e){e.LAZY="__@access@lazy@__",e.IMMEDIATE="__@access@imme@__",e.GUARD="__@access@guard@__"}(Cs||(Cs={}));var Qs={lazy:ms.bind(Cs.LAZY),imme:ms.bind(Cs.IMMEDIATE),guard:ms.bind(Cs.GUARD),castTo:void 0};Qs.castTo=function(){return Qs};var bs=function(){function e(t){fs(this,e),this.__DONT_USE_ME=t,Es&&(this.__TRANSFORM_CONTEXT_ADD_DEP=Es),Object.defineProperty(this,"__LAZY_VALUES",{enumerable:!1,value:{__keys:{}}}),this.__accessImmeValues&&this.__accessImmeValues()}return ps(e,[{key:"asStub",value:function(){var e=Xe.CDoc.transformModelContext;if(e&&e.deps&&e.rms){var t=e.deps,r=e.rms,n=this.__DONT_USE_ME;t.add(n),r.listeningTypes.add(n.constructor),this.__TRANSFORM_CONTEXT_ADD_DEP=function(e){e!==n&&(t.add(e),r.listeningTypes.add(e.constructor))}}else this.__TRANSFORM_CONTEXT_ADD_DEP&&(this.__TRANSFORM_CONTEXT_ADD_DEP=void 0)}},{key:"toPlain",value:function(){this.__accessLazyValues&&this.__accessLazyValues();var e=function(e,t){for(var r,n=Object.getOwnPropertyNames(e),i=0,o=n.length;i<o;++i)(r=n[i]).startsWith("$")||r.startsWith("_")||(t[r]=e[r]);return t},t={};return e(this,t),e(this.__LAZY_VALUES,t),t}},{key:"guard",value:function(e){return e(this)}}]),e}();Bs([Qs.imme(),vs("design:type",String)],bs.prototype,"id",void 0),Bs([Qs.imme((function(e){return e.constructor})),vs("design:type","function"==typeof(Is=void 0!==gs.ConstructorOf&&gs.ConstructorOf)?Is:Object)],bs.prototype,"kType",void 0),Bs([Qs.lazy((function(e){return e})),vs("design:type",Boolean)],bs.prototype,"$model",void 0),Bs([Qs.guard(),vs("design:type",Function),vs("design:paramtypes",[Function]),vs("design:returntype","function"==typeof(ys="undefined"!=typeof T&&T)?ys:Object)],bs.prototype,"guard",null);var _s=function(){function e(){fs(this,e)}return ps(e,null,[{key:"registeCreator",value:function(e,t){this.creators.set(e,t)}},{key:"get",value:function(e,t){if(t||!e.__modelDataFacade){var r=this.creators.get(e.constructor);if(!r)return;e.__modelDataFacade=r(e)}return e.__modelDataFacade}},{key:"put",value:function(e){e.__modelDataFacade&&(e.__modelDataFacade=void 0)}}]),e}();_s.creators=new Map;var Ss=r(246);function ws(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ds(e,t){return(Ds=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=xs(e);if(t){var i=xs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ms(this,r)}}function Ms(e,t){return!t||"object"!==Ps(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xs(e){return(xs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ps(e){return(Ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Ts,Fs,Os,Ls,ks,Ns=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ps(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Gs=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ps(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Us=Symbol("baseParamModel"),js=Qs.castTo(),Vs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ds(e,t)}(r,e);var t=Rs(r);function r(){return ws(this,r),t.apply(this,arguments)}return r}(bs);function Ys(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Hs(e,t){return(Hs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ks(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Js(e);if(t){var i=Js(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return qs(this,r)}}function qs(e,t){return!t||"object"!==Ws(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Js(e){return(Js=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ws(e){return(Ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Ns([js.lazy(),Gs("design:type",String)],Vs.prototype,"modelInstanceId",void 0),Ns([js.imme(Us),Gs("design:type",Symbol)],Vs.prototype,"type",void 0),Ns([js.lazy((function(e){return e.getType()})),Gs("design:type","function"==typeof(Ts=void 0!==jn.ParamModelType&&jn.ParamModelType)?Ts:Object)],Vs.prototype,"modelType",void 0),Ns([js.lazy(),Gs("design:type",String)],Vs.prototype,"name",void 0),Ns([js.lazy(),Gs("design:type","function"==typeof(Fs=void 0!==je.a&&je.a)?Fs:Object)],Vs.prototype,"size",void 0),Ns([js.lazy(),Gs("design:type","function"==typeof(Os=void 0!==Te.a&&Te.a)?Os:Object)],Vs.prototype,"box3",void 0),Ns([js.lazy(),Gs("design:type","function"==typeof(Ls=void 0!==Ss.ParamStore&&Ss.ParamStore)?Ls:Object)],Vs.prototype,"paramStore",void 0),Ns([js.lazy(),Gs("design:type","function"==typeof(ks=void 0!==jn.ParamModelCategory&&jn.ParamModelCategory)?ks:Object)],Vs.prototype,"category",void 0),Ns([js.lazy(),Gs("design:type",Boolean)],Vs.prototype,"legal",void 0),Ns([js.lazy((function(e){return e.getHasAttached()})),Gs("design:type",Boolean)],Vs.prototype,"attached",void 0),Ns([js.lazy(),Gs("design:type",Boolean)],Vs.prototype,"deletable",void 0),Ns([js.lazy(),Gs("design:type",Boolean)],Vs.prototype,"replaceable",void 0),Ns([js.lazy(),Gs("design:type",Number)],Vs.prototype,"attachedVersion",void 0),Ns([js.lazy(),Gs("design:type",Boolean)],Vs.prototype,"paramOverride",void 0);var zs,Xs,Zs=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ws(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},$s=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ws(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},eu=Qs.castTo(),tu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hs(e,t)}(o,e);var t,r,n,i=Ks(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e)).parent=t,r}return t=o,(r=[{key:"visit",value:function(e,t){this.$model.visit(e,t)}},{key:"upVisit",value:function(e,t){this.$model.upVisit(e,t)}}])&&Ys(t.prototype,r),n&&Ys(t,n),o}(Vs);function ru(e){return(ru="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function iu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nu(Object(r),!0).forEach((function(t){ou(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ou(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Au(e){return function(e){if(Array.isArray(e))return au(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return au(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return au(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function au(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function su(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uu(e,t,r){return(uu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=fu(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function cu(e,t){return(cu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fu(e);if(t){var i=fu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gu(this,r)}}function gu(e,t){return!t||"object"!==ru(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fu(e){return(fu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function hu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Zs([eu.lazy((function(e,t){for(var r=t;r.parent;)r=r.parent;return r})),$s("design:type",tu)],tu.prototype,"root",void 0),Zs([eu.imme(dA),$s("design:type",Symbol)],tu.prototype,"type",void 0),Zs([eu.lazy((function(e){return e.isRoot()})),$s("design:type",Boolean)],tu.prototype,"isRoot",void 0),Zs([eu.lazy((function(e){return e.isAccessory()})),$s("design:type",Boolean)],tu.prototype,"isAccessory",void 0),Zs([eu.lazy((function(e){return e.getAssembly()?e.getAssembly().getId():void 0})),$s("design:type",String)],tu.prototype,"assemblyId",void 0),Zs([eu.lazy((function(e,t){return e.getChildren().map((function(e){return _s.get(e)}))})),$s("design:type",Array)],tu.prototype,"children",void 0),Zs([eu.lazy((function(e,t){return e.getAccessories().map((function(e){return _s.get(e)}))})),$s("design:type",Array)],tu.prototype,"accessories",void 0),Zs([eu.lazy((function(e,t){return t.children.concat(t.accessories)})),$s("design:type",Array)],tu.prototype,"childNodes",void 0),Zs([eu.lazy((function(e,t){return!!e.getAssembly()&&e.getAssembly().isTemplateAssembly()})),$s("design:type",Boolean)],tu.prototype,"belongsToTemplateAssembly",void 0),Zs([eu.guard(),$s("design:type",Function),$s("design:paramtypes",["function"==typeof(zs=void 0!==gt.ParamModelVisitor&&gt.ParamModelVisitor)?zs:Object,Boolean]),$s("design:returntype",void 0)],tu.prototype,"visit",null),Zs([eu.guard(),$s("design:type",Function),$s("design:paramtypes",["function"==typeof(Xs=void 0!==gt.ParamModelVisitor&&gt.ParamModelVisitor)?Xs:Object,Boolean]),$s("design:returntype",void 0)],tu.prototype,"upVisit",null),_s.registeCreator(mt,(function(e){return e.isRoot()?new tu(e):_s.get(e.getParent()).guard((function(t){return new tu(e,t)}))}));Symbol("paramModelMultiSelectionEntity");var pu=function e(){hu(this,e),this.paramModels=[],this.paramModelAssembies=[]},du=function(e,t){return t.paramsMap[e]||t.paramsChildrenMap[e]},Iu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cu(e,t)}(o,e);var t,r,n,i=lu(o);function o(e){var t;return hu(this,o),(t=i.call(this,e)).findModelOrAssemblyModelById=function(e){var r=t.findModel(e);return r?r.$model:t.findParamModelAssembly(e)},t.modelsMap={paramsMap:{},paramsChildrenMap:{}},t.childrenMap={},t}return t=o,(r=[{key:"updateState",value:function(e){var t=this.state?this.state.paramModels:[],r=this.state?this.state.paramModelAssembies:[];uu(fu(o.prototype),"updateState",this).call(this,e);var n=this.state.paramModels,i=this.state.paramModelAssembies;this.updateParamModelsMap(t,n),t===n&&r===i||this.emit(o.EVENT_PARAM_MODELS_CHANGED,this)}},{key:"updateParamModelsMap",value:function(e,t){var r=_i.Util.diffArray(e,t),n=this.modelsMap.paramsMap,i=r.removed;i.push.apply(i,Au(r.updatedOld));var o,A,a=r.added;a.push.apply(a,Au(r.updatedNew));for(var s=this.childrenMap,u=this.modelsMap.paramsChildrenMap,c=0,l=i.length;c<l;++c){if(delete n[A=i[c].id],(o=s[A])&&o.length>0)for(var g=0,f=o.length;g<f;++g)delete u[o[g]];delete s[A]}for(var h=0,p=a.length;h<p;++h)n[A=a[h].id]=a[h].$model,o=[],a[h].visit((function(e){A=e.getId(),o.push(A),u[A]=e,_s.put(e)}),!0),s[A]=o}},{key:"initState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.updateState(iu(iu({},e),new pu)),this.state}},{key:"initModelBindingState",value:function(e){}},{key:"bindDesign",value:function(e){var t=this.reactiveModelState;t||(t=new(ls.a.createBase({defaultArrayItemSyncPoint:function(e,t){return!0},shouldIgnoreBinderCheck:function(e){return e&&e.type===dA}}))(this.updateState.bind(this),this.isImmutable),this.reactiveModelState=t);var r=e.getDoc();t.initModelState({paramModels:Object(cs.bindArray)(r.addDependency((function(){return e.getCustom().getParamModels()}),t)).map(r.addDependency((function(e){var t=_s.get(e,!0);return t.asStub(),t}),t)),paramModelAssembies:Object(cs.bindArray)(r.addDependency((function(){return e.getCustom().getParamModelAssemblies()}),t)).map(r.addDependency((function(e){return e}),t))})}},{key:"findModelEx",value:function(e,t){return t(e,this.modelsMap)}},{key:"findModel",value:function(e){var t=this.findModelEx(e,du);return t?_s.get(t):void 0}},{key:"findParamModelAssembly",value:function(e){return this.state.paramModelAssembies.find((function(t){return t.id===e}))}}])&&su(t.prototype,r),n&&su(t,n),o}(Si.KafBaseStateManager);function yu(e){return(yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Bu(e,t,r){return(Bu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=bu(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function vu(e,t){return(vu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bu(e);if(t){var i=bu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qu(this,r)}}function Qu(e,t){return!t||"object"!==yu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bu(e){return(bu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Iu.EVENT_PARAM_MODELS_CHANGED="EVENT_PARAM_MODELS_CHANGED";var _u,Su=Object(hA.getConnector)().setRootState,wu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vu(e,t)}(o,e);var t,r,n,i=mu(o);function o(){var e;return Cu(this,o),(e=i.apply(this,arguments)).design=new lt,e.fittingDesign=new Zt,e}return t=o,(r=[{key:"initState",value:function(){Bu(bu(o.prototype),"initState",this).call(this);var e=vc().getDependentPlugin(Si.AppServicePlugin);return this.kaf=e.stateManager,this.pad.bindDesign(this.design),this.state}}])&&Eu(t.prototype,r),n&&Eu(t,n),o}(Si.types.combine({pad:Iu}));function Du(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){e[e.NONE=0]="NONE",e[e.NORMAL=0]="NORMAL",e[e.ENCRYPTED=1]="ENCRYPTED",e[e.COMPRESSED=2]="COMPRESSED"}(_u||(_u={}));var Ru=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"toNetParams",value:function(e,t,r){var n={};return n.api=e,n.params=t?t.params:void 0,n.data=r,void 0===n.data&&(n.data=t?t.data:void 0),n.headers=t&&t.headers||{},n}},{key:"toAxiosConfig",value:function(e){e.method||(e.method=_i.ERequest.GET),e.method===_i.ERequest.GET&&e.data&&(e.params?Object.keys(e.data).forEach((function(t){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==e.params[t]&&console.warn("HTTP GET params ["+t+"] overwrited by data"),e.params[t]=e.data[t]})):e.params=e.data,delete e.data);var t={};if(t.url=e.url||e.api,t.params=e.params,t.data=e.data,t.headers=e.headers,t.method=e.method,e.extend){var r=t,n=e.extend;Object.keys(n).forEach((function(e){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==r[e]&&console.warn("[CUSTOM] Request config ["+e+"] overwrited by extend"),r[e]=n[e]}))}return t}}],(r=null)&&Du(t.prototype,r),n&&Du(t,n),e}();function Mu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var xu=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.net=t}var t,r,n;return t=e,(r=[{key:"addClientInterceptors",value:function(e){}},{key:"encryptedGet",value:function(e,t){return this._get(_u.ENCRYPTED,e,t)}},{key:"encryptedDelete",value:function(e,t){return this._delete(_u.ENCRYPTED,e,t)}},{key:"encryptedPost",value:function(e,t,r){return this._post(_u.ENCRYPTED,e,t,r)}},{key:"encryptedPut",value:function(e,t,r){return this._put(_u.ENCRYPTED,e,t,r)}},{key:"gzipGet",value:function(e,t){return this._get(_u.COMPRESSED,e,t)}},{key:"gzipPost",value:function(e,t,r){return this._post(_u.COMPRESSED,e,t,r)}},{key:"request",value:function(e){var t=Ru.toNetParams(e.url,e);return this.net.get(t)}},{key:"get",value:function(e,t){return this._get(_u.NORMAL,e,t)}},{key:"delete",value:function(e,t){return this._delete(_u.NORMAL,e,t)}},{key:"post",value:function(e,t,r){return this._post(_u.NORMAL,e,t,r)}},{key:"put",value:function(e,t,r){return this._put(_u.NORMAL,e,t,r)}},{key:"_get",value:function(e,t,r){var n=Ru.toNetParams(t,r);return this.net.get(n,{mode:e})}},{key:"_delete",value:function(e,t,r){var n=Ru.toNetParams(t,r);return this.net.delete(n,{mode:e})}},{key:"_post",value:function(e,t,r,n){var i=Ru.toNetParams(t,n,r);return this.net.post(i,{mode:e})}},{key:"_put",value:function(e,t,r,n){var i=Ru.toNetParams(t,n,r);return i.method="PUT",this.net.request(i,{mode:e})}}])&&Mu(t.prototype,r),n&&Mu(t,n),e}();function Pu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Tu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pu(Object(r),!0).forEach((function(t){Fu(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Fu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ou(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Lu(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Ou(o,n,i,A,a,"next",e)}function a(e){Ou(o,n,i,A,a,"throw",e)}A(void 0)}))}}function ku(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Nu=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e=Lu(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.request(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.get=function(){var e=Lu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Tu(Tu({},n),{},{url:r})),e.next=4,t.service.get(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.delete=function(){var e=Lu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Tu(Tu({},n),{},{url:r})),e.next=4,t.service.delete(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.post=function(){var e=Lu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Tu(Tu({},i),{},{data:n,url:r})),e.next=4,t.service.post(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.put=function(){var e=Lu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Tu(Tu({},i),{},{data:n,url:r})),e.next=4,t.service.put(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedRequest=function(){var e=Lu(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.encryptedRequest(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedGet=function(){var e=Lu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Tu(Tu({},n),{},{url:r})),e.next=4,t.service.encryptedGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedDelete=function(){var e=Lu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Tu(Tu({},n),{},{url:r})),e.next=4,t.service.encryptedDelete(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedPost=function(){var e=Lu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Tu(Tu({},i),{},{data:n,url:r})),e.next=4,t.service.encryptedPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedPut=function(){var e=Lu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Tu(Tu({},i),{},{data:n,url:r})),e.next=4,t.service.encryptedPut(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipRequest=function(){var e=Lu(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.gzipRequest(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipGet=function(){var e=Lu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Tu(Tu({},n),{},{url:r})),e.next=4,t.service.gzipGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipPost=function(){var e=Lu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Tu(Tu({},i),{},{data:n,url:r})),e.next=4,t.service.gzipPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipPut=function(){var e=Lu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Tu(Tu({},i),{},{data:n,url:r})),e.next=4,t.service.gzipPut(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.pbGzipGet=function(){var e=Lu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Tu(Tu({},n),{},{url:r})),e.next=4,t.service.pbGzipGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.pbGzipPost=function(){var e=Lu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Tu(Tu({},i),{},{data:n,url:r})),e.next=4,t.service.pbGzipPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}var t,r,n;return t=e,(r=[{key:"service",get:function(){if(!this._service)throw new Error("please call setRequestClient before getRequestClient.");return this._service}},{key:"setMiniAppHttpProxyClientService",value:function(e){return this._service=e,this}},{key:"convertRequest",value:function(e){var t,r;return{url:e.url,method:e.method,baseURL:e.baseURL,params:e.params,data:e.data,timeout:e.timeout,extra:{isRequestBodyJson:null===(r=null===(t=e)||void 0===t?void 0:t.extra)||void 0===r?void 0:r.isRequestBodyJson}}}},{key:"wrapResponse",value:function(e,t){return{data:t.data,status:200,statusText:"ok",headers:{},config:e,encryptedDataLength:0,dataLength:0}}}])&&ku(t.prototype,r),n&&ku(t,n),e}(),Gu=r(1128),Uu=r(31),ju=r(213),Vu=r(162),Yu=r(92);function Hu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ku(e,t){return(Ku=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Wu(e);if(t){var i=Wu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ju(this,r)}}function Ju(e,t){return!t||"object"!==zu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wu(e){return(Wu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zu(e){return(zu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Xu,Zu,$u,ec,tc,rc,nc,ic,oc=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":zu(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Ac=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":zu(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ac=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ku(e,t)}(r,e);var t=qu(r);function r(){var e;return Hu(this,r),(e=t.apply(this,arguments)).client=Object(Vu.getClient)([Uu.interceptor,ju.errorCodeInterceptor,Uu.parseCDNInterceptor,Uu.parseJSONInterceptor]),e.encryptedClient=Object(Vu.getClient)([Uu.interceptor,ju.errorCodeInterceptor,Uu.encryptInterceptor,Uu.parseCDNInterceptor,Uu.parseJSONInterceptor]),e.gzippedEncryptClient=Object(Vu.getClient)([Uu.interceptor,ju.errorCodeInterceptor,Uu.gzipEncryptBase64Interceptor,Uu.parseCDNInterceptor,Uu.parseJSONInterceptor]),e.pbEncryptedClient=Object(Vu.getClient)([Uu.interceptor,ju.errorCodeInterceptor,Uu.encryptInterceptorWithArrayBuffer,Uu.encryptInterceptor,Uu.parseCDNInterceptor,Uu.parseJSONInterceptor]),e.pbGzippedEncryptClient=Object(Vu.getClient)([Uu.interceptor,ju.errorCodeInterceptor,Uu.gzipEncryptInterceptorWithArrayBuffer,Uu.parseCDNInterceptor,Uu.parseJSONInterceptor]),e.ossGzippedEncryptClient=Object(Vu.getClient)([Uu.interceptor,ju.errorCodeInterceptor,Uu.gzipEncryptBase64Interceptor,Uu.parseCDNInterceptor,Uu.parseJSONInterceptor]),e.ossDegradedEncryptedClient=Object(Vu.getClient)([Uu.interceptor,ju.errorCodeInterceptor,Uu.ossDegradedEncryptInterceptor,Uu.parseCDNInterceptor,Uu.parseJSONInterceptor]),e.ossDegradedGzippedEncryptClient=Object(Vu.getClient)([Uu.interceptor,ju.errorCodeInterceptor,Uu.ossDegradedGzipEncryptBase64Interceptor,Uu.parseCDNInterceptor,Uu.parseJSONInterceptor]),e}return r}(Gu.RequestClient);oc([Uu.retryRequest,Ac("design:type","function"==typeof(Xu=void 0!==Yu.AxiosInstance&&Yu.AxiosInstance)?Xu:Object)],ac.prototype,"client",void 0),oc([Uu.retryRequest,Ac("design:type","function"==typeof(Zu=void 0!==Yu.AxiosInstance&&Yu.AxiosInstance)?Zu:Object)],ac.prototype,"encryptedClient",void 0),oc([Uu.retryRequest,Ac("design:type","function"==typeof($u=void 0!==Yu.AxiosInstance&&Yu.AxiosInstance)?$u:Object)],ac.prototype,"gzippedEncryptClient",void 0),oc([Uu.retryRequest,Ac("design:type","function"==typeof(ec=void 0!==Yu.AxiosInstance&&Yu.AxiosInstance)?ec:Object)],ac.prototype,"pbEncryptedClient",void 0),oc([Uu.retryRequest,Ac("design:type","function"==typeof(tc=void 0!==Yu.AxiosInstance&&Yu.AxiosInstance)?tc:Object)],ac.prototype,"pbGzippedEncryptClient",void 0),oc([Object(Uu.retryRequest)(!0),Ac("design:type","function"==typeof(rc=void 0!==Yu.AxiosInstance&&Yu.AxiosInstance)?rc:Object)],ac.prototype,"ossGzippedEncryptClient",void 0),oc([Uu.retryRequest,Ac("design:type","function"==typeof(nc=void 0!==Yu.AxiosInstance&&Yu.AxiosInstance)?nc:Object)],ac.prototype,"ossDegradedEncryptedClient",void 0),oc([Uu.retryRequest,Ac("design:type","function"==typeof(ic=void 0!==Yu.AxiosInstance&&Yu.AxiosInstance)?ic:Object)],ac.prototype,"ossDegradedGzippedEncryptClient",void 0);var sc=Object(Ot.once)((function(){return new ac})),uc=Object(Ot.once)((function(){return new Nu}));function cc(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function lc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var gc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n,i,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){return sc().addClientInterceptors(e)}},{key:"send",value:(i=s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=sc(),i=Ru.toAxiosConfig(t),r.mode!==_u.COMPRESSED){e.next=6;break}return e.abrupt("return",n.gzipRequest(i));case 6:if(r.mode!==_u.ENCRYPTED){e.next=10;break}return e.abrupt("return",n.encryptedRequest(i));case 10:return e.abrupt("return",n.request(i));case 11:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){cc(o,r,n,A,a,"next",e)}function a(e){cc(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e,t){return o.apply(this,arguments)})}])&&lc(t.prototype,r),n&&lc(t,n),e}();function fc(e){return(fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pc(e,t,r){return(pc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Cc(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function dc(e,t){return(dc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ic(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cc(e);if(t){var i=Cc(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yc(this,r)}}function yc(e,t){return!t||"object"!==fc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cc(e){return(Cc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ec=new _i.SingletonRef,Bc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dc(e,t)}(o,e);var t,r,n,i=Ic(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.core",name:"cCoreApp",Component:Li,axrs:lo,singleton:Ec},e)).stateManager=t,r}return t=o,(r=[{key:"init",value:function(){pc(Cc(o.prototype),"init",this).call(this),this.onInitialize()}},{key:"onInitialize",value:function(){var e=this.getDependentPlugin(Si.AppServicePlugin);this.initLogger(e);var t=this.stateManager,r=t.design,n=t.fittingDesign;Xo.configTopDocumentAction([r],e.stateManager.document),e.addDocumentSource(new nA(r,"custom-pad-document")),e.addDocumentSource(new fA(n,"fitting-document"));var i=r.getDoc().getElementContext();i.getterEmitter.on((function(e){Ft.advanced.reportObserved(e.instance)})),i.setterEmitter.on((function(e){Ft.advanced.reportChanged(e.instance)}))}},{key:"initLogger",value:function(e){var t;t=e.logger,Wi=t}},{key:"initStateManager",value:function(){this.stateManager.initState(),Su(this.stateManager)}},{key:"initNet",value:function(){pc(Cc(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new gc),this.client=new xu(this.net)}}])&&hc(t.prototype,r),n&&hc(t,n),o}(_i.PluginApplication),vc=Ec.instance;function mc(e){return function(e){if(Array.isArray(e))return Qc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Qc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qc(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sc(e,t){var r=t.findRelativeModel,n=t.transformModel,i=t.color,o=t.defaultConfig;return Object(Ot.map)(e,(function(e,t){var A=r(t);return A?Object(Ot.map)(e,(function(e){var t=n(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bc(Object(r),!0).forEach((function(t){_c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),A,o);return i&&t.setViewColor(i),t})):(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前孔槽找不到对应模型!"),[])})).flat()}function wc(e,t){if(!(e instanceof Tr&&e.type===w.NONE)){var r=vc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=e.path.plankArea.modelID,o=n.find((function(t){return t.id===e.id&&t.linkModel.id===i})),A=e.getHint();if(o)o.setViewColor(A.color),o.setOpacity(A.opacity);else{var a=function(e){var t=e instanceof Rr?e.getRealLine():e.getCurveLineAndPoints().curveLine;if(t instanceof u.Arc2d||t instanceof u.EllipticalArc2d){var r=e.path.getAllCurves().map((function(e){return e.curve}));if(t instanceof u.Arc2d){var n=t.circle.clone();n.radius+=1,t=new u.Arc2d(n,t.startAngle,t.endAngle,t.isCCW),e.path.type===Re.OUTER!=(u.PtInLoop.pointInLoop2D(t.middlePoint,r).ptInLoopType===u.PtInLoop.PtInLoopType.Outside)&&(n.radius-=2,t=new u.Arc2d(n,t.startAngle,t.endAngle,t.isCCW))}if(t instanceof u.EllipticalArc2d){var i=t.ccs,o=t.majorRadius+1,A=t.minorRadius+1,a=t.startParam,s=t.endParam,c=t.clockSign;t=new u.EllipticalArc2d(i,o,A,a,s,c),e.path.type===Re.OUTER!=(u.PtInLoop.pointInLoop2D(t.middlePoint,r).ptInLoopType===u.PtInLoop.PtInLoopType.Outside)&&(o=t.majorRadius-1,A=t.minorRadius-1,t=new u.EllipticalArc2d(i,o,A,a,s,c))}}return t}(e);t&&a.transform(t);var s=function(e){var t,r=e.linkModelId,n=e.hintModelId,i=e.curveLine,o=e.hint,A=vc().getStateManager().pad.findModelOrAssemblyModelById(r);if(A){var a=null===(t=A.getParam("thickness"))||void 0===t?void 0:t.getData().value,s=i instanceof u.EllipticalArc2d?i.getApproximatePoints(.01):i.getApproximatePoints();return new Tn({linkModel:A,points:s,color:o.color,opacity:o.opacity,height:a?+a:0,id:n})}}({hint:A,curveLine:a,hintModelId:e.id,linkModelId:i});s&&r.setPlankOutlineHintModels([].concat(mc(n),[s]))}}}var Dc=r(0);function Rc(e){return(Rc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
81
+ var z=function(){return(z=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function X(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}function Z(e,t){var r,n,i,o,A={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;A;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return A.label++,{value:o[1],done:!1};case 5:A.label++,n=o[1],o=[0];continue;case 7:o=A.ops.pop(),A.trys.pop();continue;default:if(!(i=A.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){A=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){A.label=o[1];break}if(6===o[0]&&A.label<i[1]){A.label=i[1],i=o;break}if(i&&A.label<i[2]){A.label=i[2],A.ops.push(o);break}i[2]&&A.ops.pop(),A.trys.pop();continue}o=t.call(e,A)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function $(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function ee(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($(arguments[t]));return e}var te=function(){function e(){this.namespace=""}return e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getValue=function(){return function(e,t){if(null!=e){if(t===S.boolean)return Boolean(parseFloat(e));if(t===S.number)return parseFloat(e)}return e}(this.value,this.type)},e.prototype.getNamespace=function(){return this.namespace},e.prototype.setValue=function(e){var t;if(!this.readonly&&this.ref){var r=null!==(t=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==t?t:1024,n=function(e,t){if(t===S.boolean)return e?"1":"0";return e.toString()}(e,this.type);if(function(e){for(var t=e.length,r=e.length-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:v.BZ_STORE,attr:O(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},e.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:v.BZ_STORE,attr:O(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},e.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},e}();function re(e,t,r){void 0===r&&(r=["W","D","H"]);var n=t.getParent();if(!(null==n?void 0:n.productId))throw new Error("model not support set formula");if(-1===n.getChild().findIndex((function(e){return e.id===t.id})))throw new Error("only child support set formula");for(var i=/#([a-zA-z$_][a-zA-Z$_\d]*)/g,o=null;o=i.exec(e);)if(!r.includes(o[1])&&!n.hasParam(o[1]))throw new Error(o[0]+" not available!")}var ne=function(){function e(){this.data={name:"",displayName:"",type:_.FIT,value:""}}return e.prototype.getValue=function(){return this.data.value},e.prototype.setValue=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:v.STORE,attr:this.data.name},this.getValue(),e),this.data.value=e,this.data.formula=void 0)},e.prototype.getFormula=function(){return this.data.formula},e.prototype.setFormula=function(e){this.getEditable()&&this.ref&&"function"==typeof this.ref.__trackUpdateField&&(re(e,this.ref),this.ref.__trackUpdateField({type:v.STORE,attr:this.data.name},this.getFormula(),e),this.data.formula=e)},e.prototype.toJSON=function(){return this.data},e.prototype.getMin=function(){return this.data.min},e.prototype.getEditable=function(){return!0===this.data.editable},e.prototype.getMax=function(){return this.data.max},e.prototype.getOptionValues=function(){return this.data.optionValues||[]},e.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},e.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},e.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},e.prototype.setPrimitiveOverride=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:v.STORE,attr:this.data.name},this.data.primitiveOverride,e),this.data.primitiveOverride=e)},e.prototype.getStep=function(){return this.data.step},e.prototype.getType=function(){return this.data.type},e.prototype.getParsedValue=function(){return this.getValue()},e.prototype.setParsedValue=function(e){return this.setValue(e)},e}();function ie(e){var t=new ne;return t.data=e,t}var oe,Ae,ae,se,ue,ce=function(){function e(e){this.option=e,this._changeMap={}}return Object.defineProperty(e.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),e.prototype.getRoot=function(e){var t=this.isRoot?this:this.root;if(e)for(var r;r=null==t?void 0:t.getParent();)t=r.getRoot()||t;return t},e.prototype.clone=function(){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&this.type===E.PARAM_PRIMITIVE)throw new Error("Primitive model don't support to clone!");var r=this.toJSON(),n=e.deserialize(JSON.stringify(r));return n._changeMap.cloned=!0,n._changeMap.forceUpdate=void 0,n._changeMap.originId||(n._changeMap.originId=n.id),n.id=function(){for(var e=0,t=0;t<36;t++)if(8===t||13===t||18===t||23===t)F[t]="-";else if(14===t)F[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,F[t]=P[19===t?3&r|8:r]}return F.join("")}(),n},e.prototype.getName=function(){return this.name},e.prototype.setName=function(e){this.__trackUpdateField({type:v.ATTRIBUTE,attr:"name"},this.name,e),this.name=e},e.prototype.getRemark=function(){return this.remark},e.prototype.setRemark=function(e){this.__trackUpdateField({type:v.ATTRIBUTE,attr:m.REMARK},this.remark,e),this.remark=e},e.prototype.setRotate=function(e){this.setRotation(e)},e.prototype.getRotate=function(){return this.getRotation()},e.prototype.setRotation=function(e){var t,r,n=this;if(null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate){var i=this.getRoot(!0).type,o=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(e){return e===n}));if((i===E.PARAM_ASSEMBLY||i===E.TEMPLATE_ASSEMBLY)&&o)throw new Error("Accessory under Assembly don't support to set rotation!")}this.__trackUpdateField({type:v.ATTRIBUTE,attr:m.ROTATION,mutexAttr:m.ROTATION_FORMULA},this.rotation,e);var A=e.x,a=e.y,s=e.z;this.rotation={x:A,y:a,z:s}},e.prototype.getRotation=function(){return this.rotation},e.prototype.getRotationFormula=function(){return this.rotationFormula},e.prototype.setRotationFormula=function(e){var t=e.x,r=e.y,n=e.z;re(t,this),re(r,this),re(n,this),this.__trackUpdateField({type:v.ATTRIBUTE,attr:m.ROTATION_FORMULA,mutexAttr:m.ROTATION},this.rotationFormula,e),this.rotationFormula={x:t,y:r,z:n}},e.prototype.setPosition=function(e){var t,r,n=this;if(null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate){var i=this.getRoot(!0).type,o=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(e){return e===n}));if((i===E.PARAM_ASSEMBLY||i===E.TEMPLATE_ASSEMBLY)&&o)throw new Error("Accessory under Assembly don't support to set position!")}this.__trackUpdateField({type:v.ATTRIBUTE,attr:m.POSITION,mutexAttr:m.POSITION_FORMULA},this.position,e);var A=e.x,a=e.y,s=e.z;this.position={x:A,y:a,z:s}},e.prototype.getPosition=function(){return this.position},e.prototype.getPositionFormula=function(){return this.positionFormula},e.prototype.setPositionFormula=function(e){var t=e.x,r=e.y,n=e.z;re(t,this),re(r,this),re(n,this),this.__trackUpdateField({type:v.ATTRIBUTE,attr:m.POSITION_FORMULA,mutexAttr:m.POSITION},this.positionFormula,e),this.positionFormula={x:t,y:r,z:n}},e.prototype.getToolType=function(){return this.toolType},e.prototype.setToolType=function(e){var t=K.get(e),r=(this.option||{}).allowToolTypes;if(this._origin===C.BRANDGOOD&&void 0!==t&&r){if(!r.includes(t))throw new Error("the custom model not support "+e+" tool");return this.__trackUpdateField({type:v.ATTRIBUTE,attr:m.TOOL_TYPE},this.toolType,e),void(this.toolType=e)}throw new Error("the custom model not support set tool type!")},e.prototype.dispose=function(){if(this.getRoot()._origin!==C.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&le(this,e,!1),!this.children.some((function(t){return t.id===e.id}))){e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:Q.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&le(this,e,!0),!this.accessories.some((function(t){return t.id===e.id}))){e.root=void 0,e._parent=this,this.accessories.push(e);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:Q.ACCESSORY,linkId:e.id})}},e.prototype.getParam=function(e){var t=this.params.get(e);return t&&!t.ref&&(t.ref=this),t},e.prototype.hasParam=function(e){return this.params.has(e)},e.prototype.getBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=O(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:""),o=this.bzProperties.get(i);return o&&!o.ref&&(o.ref=this),o},e.prototype.hasBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=O(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(i)},e.prototype.removeBzProperty=function(e,t){return!!this.hasBzProperty(e,t)&&(this.getBzProperty(e,t).remove(),!0)},e.prototype.toJSON=function(e,t){void 0===t&&(t=!0);var r=t&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,rotationFormula:r.rotationFormula,positionFormula:r.positionFormula,size:r.size,option:r.option,params:Array.from(r.params).map((function(e){var t=$(e,2);return[t[0],t[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(e){var t=$(e,2);return[t[0],t[1].toJSON()]})),productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(e){return e.toJSON(void 0,!1)})),accessories:r.accessories.map((function(e){return e.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin,legal:r.legal};return t&&r!==this&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(t){var r=this,n=JSON.parse(t);return function e(t,r,n,i){void 0===r&&(r=new Map);void 0===i&&(i=function(e,t){return new ce(e.option)});var o=i(t,n);o.id=t.id,o.type=t.type,o.name=t.name,o.remark=t.remark,o.position=t.position,o.rotation=t.rotation||t.rotate,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],ie(e[1])]}))),o.bzProperties=new Map((t.bzProperties||[]).map((function(e){return[e[0],(t=e[1],r=new te,Object.assign(r,t),r)];var t,r}))),o.positionFormula=t.positionFormula,o.rotationFormula=t.rotationFormula,o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o.toolType=t.toolType,o._origin=t._origin,o._changeMap=t._changeMap,o.legal=t.legal,!t.isRoot&&n&&(o.root=n);r.set(o.id,o);var A=o.isRoot?o:n;if(o.children=t.children.map((function(t){return e(t,r,A||o,i)})),o.accessories=t.accessories.map((function(t){return e(t,r,A||o,i)})),ee(o.children,o.accessories).forEach((function(e){return e._parent=o})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(n,void 0,void 0,(function(t,i){return void 0!==n._currentId||i?n._currentId===t.id?r:new e(t.option):(r.option=n.option,r)}))},e.serialize=function(e){return e.serialize()},e.deserialize=function(t){var r=new e;return r.deserialize(t),r},e.prototype.__trackUpdateField=function(e,t,r){var n=this._changeMap.update;n||(n=[]),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&(n.push(e),void 0!==e.mutexAttr&&(n=n.filter((function(t){return t.attr!=e.mutexAttr}))),this._changeMap.update=n)},e.prototype.getParent=function(){var e=this;if(this._parent)return this._parent;var t=function(t){return t.id===e.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var i=n.getChild(),o=n.getAccessory();if(i.some(t)||o.some(t))return this._parent=n,n;r.push.apply(r,ee(i)),r.push.apply(r,ee(o))}},e.prototype.forceUpdate=function(e){if(void 0===e&&(e=!0),!this.productId)throw new Error("Can't force-update model without productId");if(this._origin!==C.SENSE||!this.isRoot)throw new Error("only the root param models in design support force update!");this._changeMap.forceUpdate=e},e.prototype.getElementId=function(){var e=this.id,t=this.toolType,r=this.modelType;return r===b.ASSEMBLY||r===b.TEMPLATE_ASSEMBLY?{id:e,type:R.CustomGroup}:t?{id:e,type:W(t)}:void 0},e}();function le(e,t,r){var n=r?"accessory":"child";if([E.PARAM_ASSEMBLY,E.TEMPLATE_ASSEMBLY,E.PARAM_FURNITURE,E.PARAM_PRIMITIVE].includes(e.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model don't support to append "+n+"!");if(t.type===E.TEMPLATE_ASSEMBLY||t.type===E.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(t._origin===C.SENSE||t._origin===C.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(!t.isRoot)throw new Error("Only root model can be append as "+n+"!")}!function(e){e.ORDER="order-mini-app",e.QUOTATION="report-miniapp"}(oe||(oe={})),function(e){e[e.CONFIRMED=0]="CONFIRMED",e[e.ORDERED=1]="ORDERED",e[e.CLAIMED=2]="CLAIMED",e[e.PAY_PENDING=3]="PAY_PENDING",e[e.PAYED=4]="PAYED",e[e.PRODUCTION_SCHEDULING=5]="PRODUCTION_SCHEDULING",e[e.REVIEWED=6]="REVIEWED",e[e.SPLIT_ORDER=7]="SPLIT_ORDER",e[e.RETURNED=8]="RETURNED",e[e.CANCELLED=9]="CANCELLED",e[e.BATCHED=10]="BATCHED",e[e.OPENED_MATERIAL=11]="OPENED_MATERIAL",e[e.EDGE_SEALED=12]="EDGE_SEALED",e[e.HOLES_ARRANGED=13]="HOLES_ARRANGED",e[e.PACKED=14]="PACKED",e[e.WAREHOUSED=15]="WAREHOUSED",e[e.SHIPPED=16]="SHIPPED",e[e.REVIEW_PENDING=17]="REVIEW_PENDING",e[e.CONFIRM_PENDING=18]="CONFIRM_PENDING",e[e.PAY_COLLECT_PENDING=19]="PAY_COLLECT_PENDING",e[e.PAY_COLLECTED=20]="PAY_COLLECTED",e[e.SPLIT_ORDER_PENDING=21]="SPLIT_ORDER_PENDING",e[e.COMPLETED=24]="COMPLETED"}(Ae||(Ae={})),function(e){e[e.OTHER=0]="OTHER",e[e.NATURAL=1]="NATURAL",e[e.MODEL_ROOM=2]="MODEL_ROOM",e[e.NEW_MEDIA=3]="NEW_MEDIA",e[e.LIVE=4]="LIVE",e[e.CROSS_COOP=5]="CROSS_COOP",e[e.TELEMARKETING=6]="TELEMARKETING",e[e.OLD_INTRODUCE=7]="OLD_INTRODUCE",e[e.REPURCHASE=8]="REPURCHASE"}(ae||(ae={})),function(e){e[e.FORWARD=0]="FORWARD",e[e.REVERSE=1]="REVERSE"}(se||(se={})),function(e){e.AUDIT_PASS="audit_pass",e.AUDIT_REJECT="audit_reject",e.RESUBMIT="resubmit"}(ue||(ue={}));var ge,fe,he,pe,de,Ie,ye;new Map([[ue.AUDIT_PASS,"pass"],[ue.AUDIT_REJECT,"reject"],[ue.RESUBMIT,"resubmit"]]);!function(e){e[e.AUDIT=2]="AUDIT"}(ge||(ge={})),function(e){e[e.AUDIT=0]="AUDIT"}(fe||(fe={})),function(e){e.PASS="pass",e.REJECT="reject",e.RESUBMIT="resubmit",e.CREATE="create",e.ARRAIGNED="arraigned",e.CLAIM="claim",e.SEND_BACK="sendBack",e.CANCEL="cancel",e.PAY_REGISTER="payRegister",e.PAY_COLLECT_CONFIRM="payCollectConfirm",e.SPLIT_ORDER_CONFIRM="splitOrderConfirm",e.GEN_BATCH="genBatch",e.PREPARE_MATERIAL_CONFIRM="prepareMaterialConfirm",e.OPEN_MATERIAL_CONFIRM="openMaterialConfirm",e.EDGE_SEALED_CONFIRM="edgeSealedConfirm",e.HOLES_ARRANGED_CONFIRM="holesArrangedConfirm",e.PICK_CONFIRM="pickConfirm",e.PACKED_CONFIRM="packedConfirm",e.WAREHOUSED_CONFIRM="warehousedConfirm",e.SHIPPED_CONFIRM="shippedConfirm",e.COMPLETED_CONFIRM="COMPLETED_CONFIRM",e.REVOKE="revoke",e.DESIGN_SUBMIT="designSubmit",e.EDIT="orderEdit"}(he||(he={})),function(e){e[e.CUSTOMER_NAME=1]="CUSTOMER_NAME",e[e.CUSTOMER_PHONE=2]="CUSTOMER_PHONE",e[e.CUSTOMER_ADDR=3]="CUSTOMER_ADDR"}(pe||(pe={})),function(e){e[e.MYSELF=1]="MYSELF",e[e.ALL=2]="ALL"}(de||(de={})),function(e){e[e.STR=0]="STR",e[e.INT=1]="INT",e[e.FLOAT=2]="FLOAT",e[e.BOOL=3]="BOOL"}(Ie||(Ie={})),function(e){e.API_CALL="API_CALL"}(ye||(ye={}));var Ce,Ee,Be,ve,me=function(){function e(){}return e.getEvent=function(){return e._event},e.setEvent=function(t){e._event=t},e.emitApiCalledEvent=function(t){var r=e.getEvent();r&&r.emit(t)},e.collectSyncApiData=function(e,t,r){return function(n){var i={apiName:e.name,status:!0,args:r};try{var o=performance.now(),A=e.apply(t,r),a=performance.now();return i.return=A,i.duration=Math.floor(a-o),A}catch(e){throw i.status=!1,i.errMsg=e,e}finally{n(i)}}},e.collectAsyncApiData=function(e,t,r){return function(n){return X(void 0,void 0,void 0,(function(){var i,o,A,a,s;return Z(this,(function(u){switch(u.label){case 0:i={apiName:e.name,status:!0,args:r},u.label=1;case 1:return u.trys.push([1,3,4,5]),o=performance.now(),[4,e.apply(t,r)];case 2:return A=u.sent(),a=performance.now(),i.return=A,i.duration=Math.floor(a-o),[2,A];case 3:throw s=u.sent(),i.status=!1,i.errMsg=s,s;case 4:return n(i),[7];case 5:return[2]}}))}))}},e.observeAsyncApiDeco=function(t){return function(r,n,i){var o=i.value,A=function(r){e.emitApiCalledEvent(z(z(z({},r),{apiName:r.apiName||n}),t))};return i.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return X(this,void 0,void 0,(function(){var r;return Z(this,(function(n){switch(n.label){case 0:return r=this,[4,e.collectAsyncApiData(o,r,t)(A)];case 1:return[2,n.sent()]}}))}))},i}},e.observeSyncApiDeco=function(t){return function(r,n,i){var o=i.value;r.constructor.name;var A=function(r){e.emitApiCalledEvent(z(z(z({},r),{apiName:r.apiName||n}),t))};return i.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this,i=e.collectSyncApiData(o,n,t)(A);return i},i}},e.observeSyncApiWrap=function(t){return function(r,n){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return e.collectSyncApiData(r,n||this,i)((function(r){e.emitApiCalledEvent(z(z({},r),t))}))}}},e.observeAsyncApiWrap=function(t){return function(r,n){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return X(this,void 0,void 0,(function(){return Z(this,(function(o){return[2,e.collectAsyncApiData(r,n||this,i)((function(r){e.emitApiCalledEvent(z(z({},r),t))}))]}))}))}}},e}();!function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW",e[e.CABINET_COPY=4]="CABINET_COPY",e[e.WARDROBE_COPY=5]="WARDROBE_COPY",e[e.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(Ce||(Ce={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(Ee||(Ee={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(Be||(Be={})),function(e){e.ZH_CN="zh_CN",e.EN_US="en_US",e.DE_DE="de_DE",e.FR_FR="fr_FR",e.JA_JP="ja_JP",e.ZH_TW="zh_TW",e.RU_RU="ru_RU",e.KO_KR="ko_KR",e.ES_ES="es_ES",e.AR_EG="ar_EG",e.EN_CN="en_CN",e.VI="vi"}(ve||(ve={}));var Qe,be,_e,Se="$$geometry_color",we="$$geometry_opacity",De=[596,2048,2049];!function(e){e.CUSTOM="custom",e.TOP_MODEL="top_model",e.ACCESSORY="accessory",e.PRODUCT="product"}(Qe||(Qe={})),function(e){e.CLICK="click",e.DB_CLICK="double_click"}(be||(be={})),function(e){e.PARAM_MODEL="param_model",e.PARAM_MODEL_ASSEMBLY="param_model_assembly",e.FITTING_MODEL="fitting_model"}(_e||(_e={}));var Re,Me,xe=["0","1","2","3","4","5","6","7","8","9","ctrl","alt","shift","up","right","down","left","tab","enter","capslock","esc","backspace","space","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","~","!","@","#","$","%","^","&","*","(",")","_","+",":",'"',"<",">","?",",","`","-","=","[","]","\\",";","'",",",".","/"];!function(e){e.INNER="inner",e.OUTER="outer"}(Re||(Re={})),function(e){e.PARAM_MODEL="paramModel",e.PARAM_MODEL_ASSEMBLY="paramModelAssembly",e.HOLE="hole",e.GROOVE="groove",e.HARDWARE="hardware",e.HARDWARE_GROOVE="hardwareGroove"}(Me||(Me={}));var Pe=r(68),Te=r.n(Pe),Fe=r(98),Oe=r.n(Fe),Le=r(44),ke=r.n(Le),Ne=r(288),Ge=r.n(Ne),Ue=r(5),je=r.n(Ue),Ve=r(47);function Ye(e){return(Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ke(e,t){return(Ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=We(e);if(t){var i=We(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Je(this,r)}}function Je(e,t){return!t||"object"!==Ye(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function We(e){return(We=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ze=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ke(e,t)}(r,e);var t=qe(r);function r(){return He(this,r),t.apply(this,arguments)}return r}(Ve.CoreCustom),Xe=r(362),Ze=r(99),$e=r.n(Ze),et=r(1127);function tt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rt(e,t,r){return(rt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=At(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function nt(e,t){return(nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function it(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=At(e);if(t){var i=At(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ot(this,r)}}function ot(e,t){return!t||"object"!==at(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function At(e){return(At=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function at(e){return(at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var st,ut=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":at(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ct=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":at(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},lt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nt(e,t)}(o,e);var t,r,n,i=it(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).doc=new Xe.CDoc,e.versionStore=new et.VersionStore,e.setCustom(new ze),e.setContextProvider(e.doc.getElementContext),e}return t=o,(r=[{key:"compareVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;return rt(At(o.prototype),"compareVersion",this).call(this,e)&&this.custom.compareVersion(e)}},{key:"exportVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;e.clear(),rt(At(o.prototype),"exportVersion",this).call(this,e),this.custom.exportVersion(e)}},{key:"getDoc",value:function(){return this.doc}},{key:"getCustom",value:function(){return this.custom}},{key:"setCustom",value:function(e){return this.custom&&this.custom.setContextProvider(),this.custom=e.setContextProvider(this.provideContext()),this}}])&&tt(t.prototype,r),n&&tt(t,n),o}($e.a);ut([Object(Ze.property)(),ct("design:type","function"==typeof(st=void 0!==ze&&ze)?st:Object)],lt.prototype,"custom",void 0);var gt=r(107),ft=r.n(gt);function ht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dt(e,t){return(dt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function It(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ct(e);if(t){var i=Ct(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yt(this,r)}}function yt(e,t){return!t||"object"!==Et(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Et(e){return(Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Bt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Et(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},vt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Et(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},mt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dt(e,t)}(o,e);var t,r,n,i=It(o);function o(){var e;return ht(this,o),(e=i.apply(this,arguments)).linkedIds=[],e}return t=o,(r=[{key:"getCustom",value:function(){return this.custom}},{key:"setIsAppendHardware",value:function(e){this.isAppendHardware=e}},{key:"setLinkedIds",value:function(e){this.linkedIds=e}},{key:"setHardwareData",value:function(e){this.hardwareData=e}}])&&pt(t.prototype,r),n&&pt(t,n),o}(ft.a);function Qt(e){return(Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function St(e,t){return(St=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Rt(e);if(t){var i=Rt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Dt(this,r)}}function Dt(e,t){return!t||"object"!==Qt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Rt(e){return(Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Bt([Object(Ze.property)(),vt("design:type",Boolean)],mt.prototype,"isAppendHardware",void 0);var Mt,xt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&St(e,t)}(o,e);var t,r,n,i=wt(o);function o(){return bt(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"paramModelConstructor",get:function(){return mt}}])&&_t(t.prototype,r),n&&_t(t,n),o}(Ve.CoreParamModelAssembly),Pt=r(97),Tt=new Pt.EventEmitter;!function(e){e.FITTING_MODEL_CHANGE="fittingModelChange",e.SELECTION_SERVICE_MODEL_CHANGE="selectionServiceModelChange",e.SELECTION_SERVICE_V2_MODEL_CHANGE="selectionServiceV2ModelChange",e.PLANK_FACE_CLICK="plankFaceClick",e.PLANK_FACE_HOVER="plankFaceHover",e.API_CALLED="apiCalled"}(Mt||(Mt={}));var Ft=r(34),Ot=r(2),Lt=r(528),kt=Object(Lt.createKElementBaseClass)(),Nt=Ft.advanced.reportObserved,Gt=Ft.advanced.reportChanged;function Ut(e){return function(e){if(Array.isArray(e))return jt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return jt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yt(e,t){return(Yt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qt(e);if(t){var i=qt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Kt(this,r)}}function Kt(e,t){return!t||"object"!==Jt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qt(e){return(qt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jt(e){return(Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}kt.onGet=function(e){Nt(e)},kt.addSetHook((function(e){Gt(e)}));var Wt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Jt(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},zt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Jt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function Xt(e,t,r){var n=r.value;r.value=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=n.apply(this,t);return Tt.emit(Mt.FITTING_MODEL_CHANGE),i}}var Zt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yt(e,t)}(o,e);var t,r,n,i=Ht(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).setFittings([]),e.setIntersects([]),e.setGrooveFittings([]),e.setPlankFaceHintModels([]),e.setFittingHintModels([]),e.setPlankOutlineHintModels([]),e}return t=o,(r=[{key:"getFittings",value:function(e){if(e){if("ids"in e)return this.fittings.filter((function(t){return e.ids.includes(t.id)}));if("types"in e)return this.fittings.filter((function(t){return e.types.includes(t.type)}))}return this.fittings}},{key:"setFittings",value:function(e){this.fittings=e}},{key:"addFittings",value:function(e){this.fittings=[].concat(Ut(e),Ut(this.fittings))}},{key:"removeFittings",value:function(e){var t=Object(Ot.difference)(this.fittings,this.getFittings(e));this.setFittings(t)}},{key:"setIntersects",value:function(e){this.intersects=e}},{key:"getIntersects",value:function(){return this.intersects}},{key:"setGrooveFittings",value:function(e){this.grooveFittings=e}},{key:"addGrooveFittings",value:function(e){this.grooveFittings=[].concat(Ut(this.grooveFittings),Ut(e))}},{key:"getGrooveFittings",value:function(){return this.grooveFittings}},{key:"setPlankFaceHintModels",value:function(e){this.plankFaceHintModels=e}},{key:"getPlankFaceHintModels",value:function(){return this.plankFaceHintModels}},{key:"setFittingHintModels",value:function(e){this.fittingHintModels=e}},{key:"getFittingHintModels",value:function(){return this.fittingHintModels}},{key:"setPlankOutlineHintModels",value:function(e){this.plankOutlineHintModels=e}},{key:"getPlankOutlineHintModels",value:function(){return this.plankOutlineHintModels}}])&&Vt(t.prototype,r),n&&Vt(t,n),o}(kt);Wt([Ft.observable,zt("design:type",Array)],Zt.prototype,"fittings",void 0),Wt([Ft.observable,zt("design:type",Array)],Zt.prototype,"intersects",void 0),Wt([Ft.observable,zt("design:type",Array)],Zt.prototype,"grooveFittings",void 0),Wt([Ft.observable,zt("design:type",Array)],Zt.prototype,"plankFaceHintModels",void 0),Wt([Ft.observable,zt("design:type",Array)],Zt.prototype,"fittingHintModels",void 0),Wt([Ft.observable,zt("design:type",Array)],Zt.prototype,"plankOutlineHintModels",void 0),Wt([Xt,zt("design:type",Function),zt("design:paramtypes",[Array]),zt("design:returntype",void 0)],Zt.prototype,"setFittings",null),Wt([Xt,zt("design:type",Function),zt("design:paramtypes",[Array]),zt("design:returntype",void 0)],Zt.prototype,"addFittings",null),Wt([Xt,zt("design:type",Function),zt("design:paramtypes",[Object]),zt("design:returntype",void 0)],Zt.prototype,"removeFittings",null),Wt([Xt,zt("design:type",Function),zt("design:paramtypes",[Array]),zt("design:returntype",void 0)],Zt.prototype,"setGrooveFittings",null),Wt([Xt,zt("design:type",Function),zt("design:paramtypes",[Array]),zt("design:returntype",void 0)],Zt.prototype,"addGrooveFittings",null);var $t=r(30),er=r.n($t),tr=r(100),rr=r.n(tr);function nr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ir(e,t){return(ir=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function or(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ar(e);if(t){var i=ar(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ar(this,r)}}function Ar(e,t){return!t||"object"!==sr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ar(e){return(ar=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function sr(e){return(sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ur=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":sr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},cr=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":sr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},lr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ir(e,t)}(o,e);var t,r,n,i=or(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).id=rr()(),t.linkModel=e.linkModel,t.hintOutline=e.hintOutline,t.visible=e.linkModel instanceof ft.a?!e.linkModel.getInvisible():e.linkModel.visible,t}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}}])&&nr(t.prototype,r),n&&nr(t,n),o}(kt);function gr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fr(e,t){return(fr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=dr(e);if(t){var i=dr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return pr(this,r)}}function pr(e,t){return!t||"object"!==Ir(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dr(e){return(dr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ir(e){return(Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}ur([er.a,cr("design:type",String)],lr.prototype,"id",void 0),ur([er.a,cr("design:type",Object)],lr.prototype,"linkModel",void 0),ur([er.a,cr("design:type","function"!=typeof!1&&Object)],lr.prototype,"hintOutline",void 0),ur([er.a,cr("design:type",Boolean)],lr.prototype,"visible",void 0);var yr,Cr,Er,Br,vr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ir(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},mr=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ir(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Qr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fr(e,t)}(o,e);var t,r,n,i=hr(o);function o(e,t,r,n){var A;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(A=i.call(this)).fittingData=n,A.visible=!1,A.viewColor=0,A.opacity=1;var a=r.position,s=r.size,u=r.rotate,l=r.height,g=r.boundingBox;return A.id=e||rr()(),A.position=a instanceof je.a?a:new je.a(a),A.size=s instanceof je.a?s:new je.a(s),A.rotate=u instanceof je.a?u:new je.a(s),A.height=l,A.type="fittingType"in n?n.fittingType:c.INTERSECTED,A.visible=A.type!==c.INTERSECTED,A.linkParamModelId=t,A.boundingBox=g,A}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}}])&&gr(t.prototype,r),n&&gr(t,n),o}(kt);vr([er.a,mr("design:type",String)],Qr.prototype,"id",void 0),vr([er.a,mr("design:type","function"==typeof(yr=void 0!==je.a&&je.a)?yr:Object)],Qr.prototype,"position",void 0),vr([er.a,mr("design:type","function"==typeof(Cr=void 0!==je.a&&je.a)?Cr:Object)],Qr.prototype,"size",void 0),vr([er.a,mr("design:type",Number)],Qr.prototype,"height",void 0),vr([er.a,mr("design:type","function"==typeof(Er=void 0!==c&&c)?Er:Object)],Qr.prototype,"type",void 0),vr([er.a,mr("design:type","function"==typeof(Br=void 0!==je.a&&je.a)?Br:Object)],Qr.prototype,"rotate",void 0),vr([er.a,mr("design:type",Number)],Qr.prototype,"radius",void 0),vr([er.a,mr("design:type",Object)],Qr.prototype,"visible",void 0),vr([er.a,mr("design:type",Object)],Qr.prototype,"viewColor",void 0),vr([er.a,mr("design:type",Object)],Qr.prototype,"opacity",void 0);var br=r(16),_r=r.n(br);function Sr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return wr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Dr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Rr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.length=0,this.clockwise=t.clockwise,this.type=t.type,this.radius=t.radius,this.minorArc=t.minorArc,this.majorRadius=t.majorRadius,this.minorRadius=t.minorRadius,this.ellipseCenter=t.ellipseCenter,this.path=r,this.id=rr()()}var t,r,n;return t=e,(r=[{key:"getType",value:function(){return this.type}},{key:"getVector",value:function(){var e=this.start,t=this.end;return e&&t?function(e,t){return new u.Vector2d(t.x-e.x,t.y-e.y)}(e.getPosition(),t.getPosition()):new u.Vector2d}},{key:"getRealLine",value:function(){var e=Sr(this.start.getPointsForRender(),2)[1],t=Sr(this.end.getPointsForRender(),1)[0];return this.getType()===D.SEGMENT?new u.LineSeg2d(e,t):this.getType()===D.ELLIPSE_ARC?this.getEllipseLine():this.getCurveLine()}},{key:"getEllipseLine",value:function(){var e=new u.CCS2d(new u.Point2d(this.ellipseCenter.x,this.ellipseCenter.y),new u.Vector2d(1,0)),t=new u.Ellipse2d(e,this.majorRadius,this.minorRadius);return u.EllipticalArc2d.makeByStartEndPoints(t,this.start.getPosition(),this.end.getPosition(),!this.clockwise)}},{key:"getCurveLine",value:function(){var e=this.start,t=this.end;if(this.getType()!==D.CIRCLE_ARC)return new u.LineSeg2d(e.getPosition(),t.getPosition());var r,n,i,o,A,a,s,c,l,g,f,h=this.getVector().length/2;return this.radius<h&&(this.radius=h),r=this.radius,n=e.getPosition(),i=t.getPosition(),o=this.minorArc,A=this.clockwise,a=new u.LineSeg2d(n,i),s=a.length/2,c=a.getPoint(s),l=Math.sqrt(r*r-s*s),g=(A?o?a.rightNormal:a.leftNormal:o?a.leftNormal:a.rightNormal).multiplied(l/a.leftNormal.length),f=c.added(g),u.Arc2d.makeArcByStartEndPoints(f,n,i,!A)}},{key:"getLineLength",value:function(){var e=this.getRealLine();return e?new u.LineSeg2d(e.startPoint,e.endPoint).length:0}},{key:"getNormalLineLength",value:function(){return this.start&&this.end?this.start.getPosition().distanceTo(this.end.getPosition()):0}},{key:"getRenderPoints",value:function(){return[Sr(this.start.getPointsForRender(),2)[1],Sr(this.end.getPointsForRender(),1)[0]]}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(e){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,e),this.hint=e}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&Dr(t.prototype,r),n&&Dr(t,n),e}();function Mr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return xr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Tr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clockwise=!!t.clockwise,this.type=t.type,this.position=new u.Point2d(t.position),this.radius=t.radius,this.cornerCutDistance=t.cornerCutDistance,this.path=r,this.majorRadius=t.majorRadius,this.minorRadius=t.minorRadius,this.offset=new u.Vector2d(t.offset||{x:0,y:0}),this.id=rr()()}var t,r,n;return t=e,(r=[{key:"getPosition",value:function(){return this.position}},{key:"getType",value:function(){return this.type}},{key:"getLineLength",value:function(){if(this.getType()===w.NONE)return 0;var e=this.getCurveLineAndPoints().curveLine;return new u.LineSeg2d(e.startPoint,e.endPoint).length}},{key:"getCurveLineAndPoints",value:function(){var e=this.clockwise,t=this.prevLine,r=this.nextLine,n=this.offset,i=this.getType(),o=this.getPosition(),A=this.getPointsForRender(),a=Mr(A,2),s=a[0],c=a[1];if(i===w.CIRCLE||i===w.CUT_CIRCLE){if(i===w.CIRCLE){var l=t.getVector().getPerpVector(),g=r.getVector().getPerpVector();if(l.isParallel(g))return{curveLine:u.Arc2d.makeArcByStartEndPoints(s,s,c,!0),renderPoints:A};var f=new u.Line2d(s,l),h=new u.Line2d(c,g),p=Mr(f.intersectCurve(h),1)[0];if(!p)return{curveLine:new u.LineSeg2d(s,c),renderPoints:A};var d=u.Arc2d.makeArcByStartEndPoints(p.point,s,c,!1);return this.radius=void 0===this.radius?d.radius:this.radius,Math.abs(d.arcAngle)>Math.PI&&(d=u.Arc2d.makeArcByStartEndPoints(p.point,s,c,!0)),{curveLine:d,renderPoints:A}}return{curveLine:u.Arc2d.makeArcByStartEndPoints(o.added(n),s,c,!e),renderPoints:A}}if(i===w.ELLIPSE){var I=o.added(n),y=new u.CCS2d(new u.Point2d(I.x,I.y),new u.Vector2d(1,0)),C=new u.Ellipse2d(y,this.majorRadius,this.minorRadius);return{curveLine:u.EllipticalArc2d.makeByStartEndPoints(C,s,c,!e),renderPoints:A}}return{curveLine:new u.LineSeg2d(s,c),renderPoints:A}}},{key:"getPointsForRender",value:function(){var e=this.radius,t=this.prevLine,r=this.nextLine,n=this.cornerCutDistance,i=void 0===n?[0,0]:n,o=this.offset,A=this.getType(),a=this.getPosition();if(A===w.NONE)return[a,a];if(!t||!r)return[a,a];var s=new u.Ray2d(t.end.getPosition(),t.getVector().reversed()),c=new u.Ray2d(r.start.getPosition(),r.getVector());if(A===w.LINE)return[s.getPoint(i[0]),c.getPoint(i[1])];if(A===w.CIRCLE){if(void 0!==e){var l=s.direction,g=c.direction,f=l.angleTo(g),h=Math.abs(e/Math.tan(f/2));return[s.getPoint(h),c.getPoint(h)]}if(i)return[s.getPoint(i[0]),c.getPoint(i[0])]}if(A===w.CUT_CIRCLE){var p=a.added(o),d=new u.Circle2d(p,e),I=d.intersectCurve(s),y=d.intersectCurve(c);if(I.length&&y.length)return[I[0].point,y[0].point]}if(A===w.ELLIPSE){var C=a.added(o),E=new u.CCS2d(new u.Point2d(C.x,C.y),new u.Vector2d(1,0)),B=new u.Ellipse2d(E,this.majorRadius,this.minorRadius),v=B.intersectCurve(s),m=B.intersectCurve(c);if(v.length&&m.length)return[v[0].point,m[0].point]}return[a,a]}},{key:"getRenderPoints",value:function(){return this.getPointsForRender()}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(e){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,e),this.hint=e}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&Pr(t.prototype,r),n&&Pr(t,n),e}();function Fr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Or(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lr(e){return function(e){if(Array.isArray(e))return Gr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Nr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kr(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Nr(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Nr(e,t){if(e){if("string"==typeof e)return Gr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gr(e,t):void 0}}function Gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ur(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var jr=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._points=[],this._lines=[],this.getAllPolygonPoints=function(){return r.getPoints().reduce((function(e,t,r){t.getType()===w.NONE&&(e=e.concat(t.getPosition())),t.getType()===w.LINE&&(e=e.concat(t.getPointsForRender())),t.getType()!==w.CIRCLE&&t.getType()!==w.CUT_CIRCLE||(e=e.concat(t.getCurveLineAndPoints().curveLine.getApproximatePoints()));var n=t.nextLine;if(!n)return e;if(n.getType()===D.CIRCLE_ARC){var i=n.getCurveLine().getApproximatePoints();e=e.concat(i.slice(1,i.length-1))}return e}),[])},this.getEdges=function(){var e,t=r.getPoints(),n=r.getLines(),i=[],o=kr(t);try{for(o.s();!(e=o.n()).done;){var A=e.value;A.getType()!==w.NONE&&i.push(A.getCurveLineAndPoints().curveLine)}}catch(e){o.e(e)}finally{o.f()}var a,s=kr(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;i.push(u.getRealLine())}}catch(e){s.e(e)}finally{s.f()}return i},this.getGlobalTopPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new u.Point3d(e.x,e.y,0).appliedMatrix4(r.matrix4)}))},this.getGlobalBottomPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new u.Point3d(e.x,e.y,-r.depth).appliedMatrix4(r.matrix4)}))};var n=t.type,i=t.points,o=void 0===i?[]:i,A=t.lines,a=void 0===A?[]:A,s=t.forceCCW,c=void 0===s||s,l=t.depth,g=t.matrix4,f=t.offset;if(this.id=rr()(),this.type=n,this.depth=l,this.matrix4=g,this.offset=f,this.setPoints(o),this.setLines(a),this.linkPointsAndLines(),c){var h=u.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));h.isSelfIntersect()||h.isCCW()||this.turnover()}this.forceCCW=c,this.adjustClockwise()}var t,r,n;return t=e,(r=[{key:"points",get:function(){return this._points},set:function(e){this.setPoints(e)}},{key:"getPoints",value:function(){return this._points}},{key:"setPoints",value:function(e){var t=this;this._points=e,e.forEach((function(e){e.path=t})),this.adjustClockwise()}},{key:"lines",get:function(){return this.getLines()},set:function(e){this.setLines(e)}},{key:"getLines",value:function(){return this._lines}},{key:"setLines",value:function(e){var t=this;this._lines=e,e.forEach((function(e){e.path=t})),this.adjustClockwise()}},{key:"turnover",value:function(){if(!this.forceCCW||!this.isClosedPath()){if(this.isClosedPath()){this.setPoints(this.getPoints().slice().reverse().map((function(e){return e.clockwise=!e.clockwise,e})));var e=this.getLines().slice().reverse().map((function(e){return e.clockwise=!e.clockwise,e}));this.setLines(e.slice(1).concat(e[0]))}else this.setPoints(this.getPoints().slice().reverse()),this.setLines(this.getLines().slice().reverse());this.linkPointsAndLines()}}},{key:"isClosedPath",value:function(){return this.getLines().length===this.getPoints().length}},{key:"linkPointsAndLines",value:function(){var e=this,t=this.getLines(),r=this.getPoints();r.forEach((function(e){e.prevLine=void 0,e.nextLine=void 0})),t.forEach((function(n,i){n.start=void 0,n.end=void 0;var o,A=r[i];o=i===t.length-1&&e.isClosedPath()?r[0]:r[i+1],n.path=e,A.path=e,o.path=e,A.nextLine=n,o.prevLine=n,n.start=A,n.end=o}))}},{key:"getAllRenderPoints",value:function(){var e=[];return this.getPoints().forEach((function(t){t.getType()!==w.NONE?e.push.apply(e,Lr(t.getPointsForRender())):e.push(t.getPosition())})),e}},{key:"getAllRealPathCurves",value:function(){var e=[];return this.getLines().forEach((function(t){var r,n;if((null===(r=t.start)||void 0===r?void 0:r.getType())!==w.NONE){var i=null===(n=t.start)||void 0===n?void 0:n.getCurveLineAndPoints().curveLine;i&&e.push(i)}var o=t.getRealLine();e.push(o)})),e}},{key:"transformPathToFace2D",value:function(){var e={loops:[]};return e.loops.push(this.getAllRealPathCurves()),e}},{key:"transformPathToGeomLoop2d",value:function(){return new u.GeomLoop2d(this.getAllRealPathCurves())}},{key:"computeBoundingBox",value:function(){var e=new u.BBox2d;return this.getPoints().forEach((function(t){t.getType()!==w.NONE&&e.merge(t.getCurveLineAndPoints().curveLine.getBounding())})),this.getLines().forEach((function(t){e.merge(t.getRealLine().getBounding())})),e}},{key:"adjustClockwise",value:function(){if(this.forceCCW&&this.isClosedPath()){var e=u.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));if(!e.isSelfIntersect()&&!e.isCCW()){this.setPoints(this.getPoints().slice().reverse());var t=this.getLines().slice().reverse();this.setLines(t.slice(1).concat(t[0]).map((function(e){return e.type===D.CIRCLE_ARC&&(e.clockwise=!e.clockwise),e}))),this.linkPointsAndLines()}}}},{key:"getAllCurves",value:function(){var e=this.getPoints(),t=this.getLines(),r=function(e){return{curve:e.getRealLine(),source:e}};return e.reduce((function(e,n,i){var o;n.getType()!==w.NONE&&(o={curve:n.getCurveLineAndPoints().curveLine,source:n});var A=o?[o]:[];return e.concat(t[i]?[].concat(A,[r(t[i])]):[].concat(A))}),[]).concat(t.slice(e.length).map(r))}},{key:"getRedundantPoints",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getPoints().length;if(n<=3)return[];var i=this.getPoints().indexOf(e);if(-1===i)return[];var o=[];return(r?[1]:[1,-1]).forEach((function(r){var A=(i+r+n)%n,a=t.getPoints()[A];e.getPosition().isEqual(a.getPosition(),1)&&(a.nextLine.getType()!==D.SEGMENT?o.push(e):o.push(a))})),o}},{key:"getRenderPoints",value:function(){var e=[];return this.points.forEach((function(t){t.getType()===w.NONE?e.push(t.getPosition()):e.push.apply(e,Lr(t.getRenderPoints()))})),e}}])&&Ur(t.prototype,r),n&&Ur(t,n),e}();function Vr(e,t){var r=t.paramPoints.map((function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fr(Object(r),!0).forEach((function(t){Or(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e);return 0==t.radius&&[w.CIRCLE,w.CUT_CIRCLE,w.ELLIPSE].includes(t.type)&&(t.type=w.NONE),new Tr(t)})),n=t.paramPathLines.map((function(e){return new Rr(e)}));return new jr({type:e,offset:t.offset,points:r,lines:n,forceCCW:!1})}function Yr(e){return function(e){if(Array.isArray(e))return Hr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Hr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hr(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qr(e,t){return(qr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zr(e);if(t){var i=zr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wr(this,r)}}function Wr(e,t){return!t||"object"!==Xr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zr(e){return(zr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xr(e){return(Xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Zr,$r,en=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Xr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},tn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Xr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},rn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qr(e,t)}(o,e);var t,r,n,i=Jr(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).viewColor=0,t.visible=!1;var r=e.data,n=e.path,A=e.model;return t.id=r.id,t.type=c.HARDWARE_GROOVE,t.path=n,t.depth=r.depth,t.model=A,t.linkParamModelId=A.id,t.fittingData=r,t}return t=o,(r=[{key:"getTopRenderPoints",value:function(){var e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(t){return new u.Point3d(t.x,t.y,0).appliedMatrix4(e)}))}},{key:"getBottomRenderPoints",value:function(){var e=this,t=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(r){return new u.Point3d(r.x,r.y,-e.depth).appliedMatrix4(t)}))}},{key:"pointToGlobalMatrix",value:function(){var e=new u.Matrix4,t=this.model.getSize();return e.fromArray(Yr(this.model.getConcatenatedMatrix().multiply((new ke.a).makeTranslation(new je.a(-t.x/2,t.y/2,-t.z/2))).elements.values())),e.multiplied(this.path.matrix4)}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}},{key:"setVisible",value:function(e){this.visible=e}}])&&Kr(t.prototype,r),n&&Kr(t,n),o}(kt);en([er.a,tn("design:type",String)],rn.prototype,"id",void 0),en([er.a,tn("design:type",Object)],rn.prototype,"viewColor",void 0),en([er.a,tn("design:type",Object)],rn.prototype,"visible",void 0),en([er.a,tn("design:type","function"==typeof(Zr=void 0!==c&&c)?Zr:Object)],rn.prototype,"type",void 0),en([er.a,tn("design:type","function"==typeof($r=void 0!==jr&&jr)?$r:Object)],rn.prototype,"path",void 0),en([er.a,tn("design:type",Number)],rn.prototype,"depth",void 0),en([er.a,tn("design:type",Number)],rn.prototype,"opacity",void 0);var nn=r(142),on=r.n(nn);function An(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function an(e,t){return(an=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=cn(e);if(t){var i=cn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return un(this,r)}}function un(e,t){return!t||"object"!==ln(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cn(e){return(cn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ln(e){return(ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var gn,fn,hn,pn,dn,In=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ln(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},yn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":ln(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Cn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&an(e,t)}(o,e);var t,r,n,i=sn(o);function o(e,t,r,n,A,a,s){var u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(u=i.call(this)).viewColor=0,u.id=e||rr()(),u.position=r instanceof je.a?r:new je.a(r),u.size=A instanceof je.a?A:new je.a(A),u.rotate=n instanceof je.a?n:new je.a(A),u.type=t,u.geometryModel=a,u.originPoints=s,u}return t=o,(r=[{key:"setViewColor",value:function(e){this.viewColor=e}}])&&An(t.prototype,r),n&&An(t,n),o}(kt);function En(e,t){return(En=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=mn(e);if(t){var i=mn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vn(this,r)}}function vn(e,t){return!t||"object"!==Qn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mn(e){return(mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qn(e){return(Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}In([er.a,yn("design:type",String)],Cn.prototype,"id",void 0),In([er.a,yn("design:type","function"==typeof(gn=void 0!==l&&l)?gn:Object)],Cn.prototype,"type",void 0),In([er.a,yn("design:type","function"==typeof(fn=void 0!==je.a&&je.a)?fn:Object)],Cn.prototype,"position",void 0),In([er.a,yn("design:type","function"==typeof(hn=void 0!==je.a&&je.a)?hn:Object)],Cn.prototype,"size",void 0),In([er.a,yn("design:type","function"==typeof(pn=void 0!==je.a&&je.a)?pn:Object)],Cn.prototype,"rotate",void 0),In([er.a,yn("design:type","function"==typeof(dn=void 0!==on.a&&on.a)?dn:Object)],Cn.prototype,"geometryModel",void 0),In([er.a,yn("design:type",Array)],Cn.prototype,"originPoints",void 0),In([er.a,yn("design:type",Object)],Cn.prototype,"viewColor",void 0);var bn=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Qn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},_n=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Qn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Sn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&En(e,t)}(r,e);var t=Bn(r);function r(e){var n,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).id=null!==(i=e.id)&&void 0!==i?i:rr()(),n.linkModel=e.linkModel,n.plankFaces=e.plankFaces,n.hintOutline=e.hintOutline,n}return r}(kt);function wn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Dn(e,t){return(Dn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=xn(e);if(t){var i=xn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Mn(this,r)}}function Mn(e,t){return!t||"object"!==Pn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xn(e){return(xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pn(e){return(Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}bn([er.a,_n("design:type",String)],Sn.prototype,"id",void 0);var Tn=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Pn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Fn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Pn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},On=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dn(e,t)}(o,e);var t,r,n,i=Rn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=i.call(this);var r=e.points,n=e.linkModel,A=e.color,a=e.opacity,s=e.height,u=e.id;return t.id=u,t.visible=!0,t.viewColor=A,t.opacity=a,t.points=r,t.height=s,t.linkModel=n,t}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}}])&&wn(t.prototype,r),n&&wn(t,n),o}(kt);function Ln(e,t){var r=[0,0,0];return 0===e?r[2]=1:1===e?r[0]=-1:2===e?r[1]=-1:3===e?r[0]=1:4===e?r[1]=1:5===e&&(r[2]=-1),t?new t({x:r[0],y:r[1],z:r[2]}):{x:r[0],y:r[1],z:r[2]}}Tn([er.a,Fn("design:type",String)],On.prototype,"id",void 0),Tn([er.a,Fn("design:type",Object)],On.prototype,"linkModel",void 0),Tn([er.a,Fn("design:type",Object)],On.prototype,"viewColor",void 0),Tn([er.a,Fn("design:type",Number)],On.prototype,"opacity",void 0),Tn([er.a,Fn("design:type",Boolean)],On.prototype,"visible",void 0),Tn([er.a,Fn("design:type",Array)],On.prototype,"points",void 0),Tn([er.a,Fn("design:type",Number)],On.prototype,"height",void 0);var kn=[new u.Vector3d({x:1,y:0,z:0}),new u.Vector3d({x:0,y:1,z:0}),new u.Vector3d({x:0,y:0,z:1})];function Nn(e){return!(!e||e.fittingType!==c.HOLE)}function Gn(e){return!(!e||e.fittingType!==c.GROOVE)}function Un(e,t,r){var n,i,o=r.holeColor,A=r.grooveColor,a=r.holeOpacity,s=r.grooveOpacity,c=function(e,t){var r,n,i=t.start,o=t.end,A=t.plankFaceId,a=e.getSize(),s=(new ke.a).makeTranslation(new je.a(-a.x/2,a.y/2,-a.z/2)),c=e.getConcatenatedMatrix().multiply(s),l=new u.Point3d(i),g=new u.Point3d(o),f=new u.LineSeg3d(l,g),h=f.getPoint(f.length/2),p=new je.a(h).applyMatrix4(c);if(Nn(t)){var d=t.diameter;r=new je.a(d,f.length,d),n=je.a.Y_AXIS}if(Gn(t)){var I=t.width,y=t.depth;[0,5].includes(A)?(r=new je.a(I,f.length,y),n=je.a.Y_AXIS):[2,4].includes(A)?(r=new je.a(I,y,f.length),n=je.a.Z_AXIS):[1,3].includes(A)&&(r=new je.a(y,I,f.length),n=je.a.Z_AXIS)}var C=new je.a(o).sub(new je.a(i)).normalize(),E=(new Ge.a).setFromTwoVectors(n,C),B=c.clone().multiply((new ke.a).makeRotationFromQuaternion(E)),v=new je.a((new Oe.a).setFromRotationMatrix(B)),m=new Te.a(r,p,v);return new Qr(t.id,e.id,{position:p,size:r,rotate:v,height:f.length,boundingBox:m},t)}(t,e);Nn(e)?(n=o,i=a):Gn(e)&&(n=A,i=s);var l=e.params||[],g=l.find((function(e){return e.key===Se})),f=l.find((function(e){return e.key===we}));return c.setVisible(!0),c.setViewColor(g?g.value:n),c.setOpacity(f?Number(f.value):i),c}var jn=r(724),Vn=r(725),Yn=r(10),Hn=r(114),Kn=r.n(Hn),qn=r(141),Jn=r.n(qn),Wn=r(209),zn=r.n(Wn),Xn=r(113),Zn=r.n(Xn),$n=r(210),ei=r.n($n),ti=r(424),ri=r.n(ti),ni=r(72),ii=r.n(ni),oi=r(188),Ai=r.n(oi);function ai(e){var t=[];e.shapes.forEach((function(e){var r=e.getTriangles();r&&0!==r.length&&ii.a.addElements(t,r)}));var r=function(e){var t=[];return e.forEach((function(e){return ii.a.addUniqueElements(t,e.points)})),t}(t),n=function(e,t){return e.map((function(e){var r=new je.a;return r.x=t.indexOf(e.points[0]),r.y=t.indexOf(e.points[1]),r.z=t.indexOf(e.points[2]),r}))}(t,r);return{vertices:r,textures:function(e,t){if(!t){var r=(new Ai.a).includePoints(e);t=new _r.a(r.min.x,r.max.y)}return e.map((function(e){return _r.a.sub(e,t)}))}(r,e.pivot),indices:n}}var si=new je.a(0,0,0);function ui(e){var t=e.planeTransform;return function(e){try{var t=ai(e),r=new on.a;return r.vertices=new Float32Array(je.a.toFloatArray(e.computeVertices(t.vertices))),r.normals=new Float32Array(je.a.toFloatArray(e.computeNormals(t.vertices))),r.textures=new Float32Array(_r.a.toFloatArray(t.textures)),r.indices=new Uint16Array(je.a.toFloatArray(t.indices)),r}catch(e){return void console.error(e)}}({shapes:e.shapes,pivot:e.pivot,computeVertices:function(e){return e.map((function(e){return si.set(e.x,e.y,0),t.localToWorld(si)}))},computeNormals:function(e){var r=t.basicZ.clone().normalize();return e.map((function(){return r.clone()}))}})}function ci(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return li(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return li(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function li(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var gi,fi=new je.a(0,0,0);function hi(e,t,r){for(var n,i=e.id,o=r.getConcatenatedMatrix(),A=r.getSize(),a=(new ke.a).makeTranslation(new je.a(-A.x/2,A.y/2,-A.z/2)),s=o.clone().multiply(a),u=t["@type"],c=(n=u===l.FACE?pi(t,s):function(e,t){var r,n=e.shell,i=jn.fromJson(JSON.parse(n)).map((function(e){return e.getFaces()})).flat().map((function(e){return Vn.triangulate2(e)})),o=new on.a,A=0,a=[],s=[],u=[],c=[],l=ci(i);try{for(l.s();!(r=l.n()).done;){var g=r.value;a.push(g.vertices.map((function(e){return fi.fromArray(e).applyMatrix4(t).toArray()})).flat()),s.push(g.normals.flat()),u.push(g.uvs.flat()),c.push(g.triangleIndices.flat().map((function(e){return e+A}))),A+=g.vertices.length}}catch(e){l.e(e)}finally{l.f()}return o.vertices=new Float32Array(a.flat()),o.normals=new Float32Array(s.flat()),o.textures=new Float32Array(u.flat()),o.indices=new Float32Array(c.flat()),o}(t,s)).getBoundingBox3().getCenter(),g=Kn.a.decompose(s).rotation,f=Kn.a.compose(c,g,je.a.ONE),h=(new ke.a).getInverse(f),p=new Float32Array(n.vertices),d=new Jn.a,I=0;I<p.length;I+=3)fi.set(p[I],p[I+1],p[I+2]).applyMatrix4(h),d.includePoint(fi);return new Cn(i,u,c,g,d.getSize(),n,t.points.map((function(e){return new je.a(e).applyMatrix4(s)})))}function pi(e,t){var r=e.points.map((function(e){return new je.a(e).applyMatrix4(t)})),n=(new zn.a).setFromCoplanarPoints(r[0],r[1],r[2]).normal,i=r[1].clone().sub(r[0]).normalize(),o=n.clone().cross(i).normalize(),A=new ri.a(i,o,n,r[0]),a=r.map((function(e){return new _r.a(A.worldToLocal(e))})),s=new Zn.a(a);return ui({planeTransform:A,shapes:[new ei.a(s)]})}function di(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ii(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?di(Object(r),!0).forEach((function(t){yi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):di(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function yi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ci(e,t){var r=t.clone().inversed(),n=new jr({id:e.id,type:Re.OUTER,points:e.points.map((function(e){return Ii(Ii({},e),{},{position:(t=e.position,n=new u.Point3d(t).appliedMatrix4(r),new u.Point2d(n))});var t,n})).map(Ei),lines:e.lines.map(Bi),depth:e.depth,matrix4:t});return n.linkPointsAndLines(),n}function Ei(e){return new Tr(e)}function Bi(e){return new Rr(e)}!function(e){e[e.POINT=0]="POINT",e[e.LINE=1]="LINE"}(gi||(gi={}));var vi=new u.Tolerance.Tolerance(.01,.01,.01);function mi(e){if(e.getType()===w.NONE)return!0;var t=e.prevLine,r=e.nextLine;return t.type!==D.CIRCLE_ARC&&r.type!==D.CIRCLE_ARC&&(0!==e.radius&&(!e.cornerCutDistance||0!==e.cornerCutDistance[0]&&0!==e.cornerCutDistance[1]))}function Qi(e){return e.type===D.SEGMENT||(!(e.type!==D.CIRCLE_ARC||!u.Num.isEqual(e.getVector().length,2*e.radius))||(e.type!==D.CIRCLE_ARC||!u.Num.isBigger(e.getVector().length,2*e.radius)))}function bi(e){return e.type===gi.POINT?e.val.getCurveLineAndPoints().curveLine:e.type===gi.LINE?e.val.getRealLine():void 0}function _i(e,t){if(e.type===gi.POINT&&e.val.getType()===w.NONE)return!0;if(t.type===gi.POINT&&t.val.getType()===w.NONE)return!0;var r=bi(e),n=bi(t);if(!r||!n)return!1;var i=u.Curve2dIntersect.curve2dIntersectCurve2d(r,n,vi);return!(1===i.length&&!i[0].point.isEqual(r.startPoint,.01)&&!i[0].point.isEqual(r.endPoint,.01))&&(!(i.length>1)||i.every((function(e){return e.point.isEqual(i[0].point,.01)})))}function Si(e,t,r){var n=r.grooveColor,i=r.grooveOpacity,o=function(e,t){var r=Ln(e,u.Vector3d),n=kn.find((function(e){return 0===e.dot(r)})),i=r.clone().cross(n).normalized(),o=u.Matrix4.makeBasis(n,i,r);return t&&o.setTranslation(new u.Vector3d(function(e,t){var r={x:0,y:0,z:0};0===e?r.z=t.z:3===e?r.x=t.x:2===e&&(r.y=-t.y);return r}(e,t))),o}(e.plankFaceId,t.getSize()),A=new rn({data:e,path:Ci(e,o),model:t});A.setVisible(!0);var a=(e.params||[]).find((function(e){return e.key===Se})),s=(e.params||[]).find((function(e){return e.key===we}));return A.setViewColor(a?a.value:n),A.setOpacity(s?Number(s.value):i),A}var wi=r(21),Di=r(12),Ri=r(11),Mi=r.n(Ri);function xi(e){return(xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ti(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Fi(e,t){return(Fi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ki(e);if(t){var i=ki(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Li(this,r)}}function Li(e,t){return!t||"object"!==xi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ki(e){return(ki=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ni=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fi(e,t)}(o,e);var t,r,n,i=Oi(o);function o(){return Pi(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return null}}])&&Ti(t.prototype,r),n&&Ti(t,n),o}(Mi.a.PureComponent);function Gi(e){return(Gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ui(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ji(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Vi(e,t){return(Vi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ki(e);if(t){var i=Ki(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Hi(this,r)}}function Hi(e,t){return!t||"object"!==Gi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ki(e){return(Ki=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qi,Ji=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vi(e,t)}(o,e);var t,r,n,i=Yi(o);function o(){return Ui(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&ji(t.prototype,r),n&&ji(t,n),o}(wi.AXR);qi||(qi={});var Wi,zi=[];!function(e){e.SAVE_CUSTOM="saveCustom",e.UNDO_REDO="undoRedo",e.PARSE_DOCUMENT="parseDocument"}(Wi||(Wi={}));var Xi,Zi,$i={};function eo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function to(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eo(Object(r),!0).forEach((function(t){ro(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ro(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function no(e,t){!function(e){Xi.log(io(e))}(e);var r={eventType:e.behavior+"_ktr",data:{},labels:{}};Zi&&Object.assign(r.labels,Zi()),t.dataKeys.forEach((function(t){return r.data[t]=e[t]})),t.labelKeys&&(Array.isArray(t.labelKeys)?t.labelKeys.forEach((function(t){return r.labels[t]=e[t]})):Object.assign(r.labels,t.labelKeys)),function(e){Xi.logByKtracker(e)}(r)}function io(e){return to(to({},e),{},{pluginName:"customPad"})}function oo(e){return(oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ao(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ao(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function so(e,t,r){return(so="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=go(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function uo(e,t){return(uo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function co(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=go(e);if(t){var i=go(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return lo(this,r)}}function lo(e,t){return!t||"object"!==oo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function go(e){return(go=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fo={entry:Ji,monitor:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uo(e,t)}(o,e);var t,r,n,i=co(o);function o(){return Ao(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"init",value:function(){so(go(o.prototype),"init",this).call(this),this.addConfig({sendLog:no,perfLogConfig:zi,timeLogConfig:$i})}}])&&ao(t.prototype,r),n&&ao(t,n),o}(wi.Monitor)};var ho,po,Io=r(60),yo=r(723),Co=r(359);function Eo(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Bo(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Eo(o,n,i,A,a,"next",e)}function a(e){Eo(o,n,i,A,a,"throw",e)}A(void 0)}))}}function vo(e){return function(e){if(Array.isArray(e))return bo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Qo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mo(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Qo(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Qo(e,t){if(e){if("string"==typeof e)return bo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bo(e,t):void 0}}function bo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){e[e.autoBackup=1]="autoBackup",e[e.transaction=2]="transaction",e[e.version=4]="version",e[e.modelBinding=8]="modelBinding",e[e.autoSave=16]="autoSave"}(ho||(ho={})),function(e){e[e.requestBackup=0]="requestBackup",e[e.forceBackup=1]="forceBackup",e[e.mergeRecorder=2]="mergeRecorder",e[e.notifyModelChange=3]="notifyModelChange",e[e.autoSave=4]="autoSave",e[e.save=5]="save",e[e.revert=6]="revert"}(po||(po={}));var So=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.autoSaveInterruptSwitch=new yo.InterruptSwitch((function(e){e?t.kafDocument.autoSave.stop():t.kafDocument.autoSave.start()})),this.keyCache=new Set,this.requestBackupTimes=0,this.maxRequestBackupTimes=1e3,this.throttleRequestBackup=Object(Io.throttleInRaf)((function(){wi.Util.safeExec((function(){++t.requestBackupTimes>t.maxRequestBackupTimes?Object(Co.devError)("requestBackup long time on backup"):t.kafDocument.autoBackupBlockKeys.size>0?t.requestBackup():t.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&t.kafDocument.requestBackup()}))}),1)}var t,r,n;return t=e,(r=[{key:"revert",value:function(){var e=this;wi.Util.safeExec((function(){var t,r=mo(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().getTransactionContext().revert()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"requestBackup",value:function(){this.requestBackupTimes=0,this.throttleRequestBackup()}},{key:"forceBackup",value:function(){var e=this;wi.Util.safeExec((function(){e.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&e.kafDocument.backup()}))}},{key:"mergeRecorder",value:function(){var e=this;wi.Util.safeExec((function(){var t,r=mo(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().getTransactionContext().mergeRecorder()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"notifyModelChange",value:function(){var e=this;wi.Util.safeExec((function(){var t,r=mo(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().notifyModelChange()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"save",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];wi.Util.safeExec((function(){e.kafDocument.saveDocument(t)}))}},{key:"interruptSingle",value:function(e,t){var r=this,n={};return t.includes(ho.autoBackup)&&wi.Util.safeExec((function(){n[ho.autoBackup]=(new Date).getTime().toString()+e.getId(),r.kafDocument.pauseAutoBackup(n[ho.autoBackup])}),!1),t.includes(ho.transaction)&&wi.Util.safeExec((function(){n[ho.transaction]=e.getDoc().getTransactionSwitch().interrupt()})),t.includes(ho.version)&&wi.Util.safeExec((function(){n[ho.version]=e.getDoc().getVersionSwitch().interrupt()})),t.includes(ho.modelBinding)&&wi.Util.safeExec((function(){n[ho.modelBinding]=e.getDoc().getModelBindingSwitch().interrupt()})),t.includes(ho.autoSave)&&wi.Util.safeExec((function(){n[ho.autoSave]=r.autoSaveInterruptSwitch.interrupt()})),n}},{key:"interrupt",value:function(e,t){var r,n=this,i={},o=mo(this.docs);try{for(o.s();!(r=o.n()).done;){var A=r.value;i[A.getId()]=this.interruptSingle(A,e)}}catch(e){o.e(e)}finally{o.f()}return this.keyCache.add(i),t&&setTimeout((function(){return n.resume(i)}),t),i}},{key:"resumeSingle",value:function(e,t){var r=this;t[ho.autoBackup]&&wi.Util.safeExec((function(){r.kafDocument.requestResumeAutoBackup(t[ho.autoBackup])}),!1),t[ho.transaction]&&wi.Util.safeExec((function(){e.getDoc().getTransactionSwitch().resume(t[ho.transaction])})),t[ho.version]&&wi.Util.safeExec((function(){e.getDoc().getVersionSwitch().resume(t[ho.version])})),t[ho.modelBinding]&&wi.Util.safeExec((function(){e.getDoc().getModelBindingSwitch().resume(t[ho.modelBinding])})),t[ho.autoSave]&&wi.Util.safeExec((function(){r.autoSaveInterruptSwitch.resume(t[ho.autoSave])}))}},{key:"resume",value:function(e,t){var r,n=mo(this.docs);try{for(n.s();!(r=n.n()).done;){var i=r.value,o=e[i.getId()];o&&this.resumeSingle(i,o)}}catch(e){n.e(e)}finally{n.f()}this.keyCache.delete(e),t&&this.afterActions(t)}},{key:"forceResumeAll",value:function(){var e=this;vo(this.keyCache.values()).forEach((function(t){return e.resume(t)}))}},{key:"interruptActions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[ho.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[po.requestBackup],n=arguments.length>3?arguments[3]:void 0,i=this;return function(){var o={};try{o=i.interrupt(t,n);for(var A=arguments.length,a=new Array(A),s=0;s<A;s++)a[s]=arguments[s];var u=e.apply(this,a);return u}finally{i.resume(o,r)}}}},{key:"interruptActionsAsync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[ho.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[po.requestBackup],n=arguments.length>3?arguments[3]:void 0,i=this;return Bo(s.a.mark((function o(){var A,a,u,c,l,g=arguments;return s.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:for(A={},o.prev=1,A=i.interrupt(t,n),a=g.length,u=new Array(a),c=0;c<a;c++)u[c]=g[c];return o.next=6,e.apply(this,u);case 6:return l=o.sent,o.abrupt("return",l);case 8:return o.prev=8,i.resume(A,r),o.finish(8);case 11:case"end":return o.stop()}}),o,this,[[1,,8,11]])})))}},{key:"afterActions",value:function(e){e.includes(po.mergeRecorder)&&this.mergeRecorder(),e.includes(po.requestBackup)?this.requestBackup():e.includes(po.forceBackup)?this.forceBackup():e.includes(po.revert)&&this.revert(),e.includes(po.notifyModelChange)&&this.notifyModelChange(),e.includes(po.autoSave)?this.save(!0):e.includes(po.save)&&this.save()}}])&&_o(t.prototype,r),n&&_o(t,n),e}(),wo=r(529),Do=r.n(wo),Ro=r(290);function Mo(e){return(Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Po(e,t){return(Po=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function To(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Oo(e);if(t){var i=Oo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Fo(this,r)}}function Fo(e,t){return!t||"object"!==Mo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Oo(e){return(Oo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Po(e,t)}(o,e);var t,r,n,i=To(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).model=e,t}return t=o,(r=[{key:"toModel",value:function(){return this.model}}])&&xo(t.prototype,r),n&&xo(t,n),o}(Di.BackupItem);var ko=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.doc=t,this.key=r,this.BackupItemImpl=Lo,this.getModel=function(){var e=n.doc.getTransactionContext();return e.commitRecorder(),{recorderId:e.getCurrentId()}},this.onUpdateModel=function(e,t){var r=n.doc.getTransactionContext();t===Ro.ModelUpdateType.redo?r.redoToRecorder(e.recorderId):t===Ro.ModelUpdateType.undo?r.undoToRecorder(e.recorderId):t===Ro.ModelUpdateType.revert&&r.revert()},this.updateListeners=function(e,t){var r=n.doc;e?(r.getTransactionSwitch().resumeAll(),r.requestCommit=t):r.requestCommit=void 0},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.open=function(){return Promise.resolve()}};function No(e){return(No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Go(e){return function(e){if(Array.isArray(e))return Vo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||jo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Uo(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=jo(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function jo(e,t){if(e){if("string"==typeof e)return Vo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vo(e,t):void 0}}function Vo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Yo(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Ho(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ko(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qo(e,t,r){return t&&Ko(e.prototype,t),r&&Ko(e,r),e}function Jo(e,t){return(Jo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xo(e);if(t){var i=Xo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zo(this,r)}}function zo(e,t){return!t||"object"!==No(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xo(e){return(Xo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jo(e,t)}(r,e);var t=Wo(r);function r(){var e;return Ho(this,r),(e=t.apply(this,arguments)).doc=new Xe.CDoc,e}return qo(r,[{key:"getDoc",value:function(){return this.doc}}]),r}(Do()(Object)),$o=new(function(){function e(){Ho(this,e),this.stacks=[{documentAction:new So}]}var t,r;return qo(e,[{key:"getTopDocumentAction",value:function(){return this.stacks[this.stacks.length-1].documentAction}},{key:"configTopDocumentAction",value:function(e,t){var r=this.getTopDocumentAction();return r.docs=e,r.kafDocument=t,r}},{key:"pushDocumentAction",value:(t=s.a.mark((function e(){var t,r,n,i,o,A,a,u,c,l,g,f,h,p,d,I=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=I.length>0&&void 0!==I[0]?I[0]:[],r=this.stacks[this.stacks.length-1],n=r.documentAction.interrupt([ho.autoBackup]),i=new So,o=new Zo,A=new Di.DocumentStateManager,a=Uo(this.stacks);try{for(a.s();!(u=a.n()).done;){c=u.value,l=Uo(c.documentAction.docs);try{for(l.s();!(g=l.n()).done;)g.value.getDoc().addTransactionHook(o.getDoc().onTrackTransaction)}catch(e){l.e(e)}finally{l.f()}}}catch(e){a.e(e)}finally{a.f()}i.docs=[o].concat(Go(t)),i.kafDocument=A,f=new ko(o.getDoc(),"tempDocumentSource".concat(this.stacks.length)),A.addDocumentSource(f),h=Uo(t);try{for(h.s();!(p=h.n()).done;)d=p.value,A.addDocumentSource(new ko(d.getDoc(),d.getId()))}catch(e){h.e(e)}finally{h.f()}return A.initState(),e.next=17,A.start();case 17:return this.stacks.push({documentAction:i,interruptKey:n,tempDoc:o,tempDocumentSource:f}),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e,this)})),r=function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function A(e){Yo(o,n,i,A,a,"next",e)}function a(e){Yo(o,n,i,A,a,"throw",e)}A(void 0)}))},function(){return r.apply(this,arguments)})},{key:"popDocumentAction",value:function(){if(this.stacks.length<=1)throw new Error("stasks has no extra document");var e,t=this.stacks.pop(),r=t.tempDoc,n=t.documentAction,i=t.interruptKey,o=Uo(this.stacks);try{for(o.s();!(e=o.n()).done;){var A,a=Uo(e.value.documentAction.docs);try{for(a.s();!(A=a.n()).done;){A.value.getDoc().removeTransactionHook(r.getDoc().onTrackTransaction)}}catch(e){a.e(e)}finally{a.f()}}}catch(e){o.e(e)}finally{o.f()}n.kafDocument.dispose(),this.getTopDocumentAction().resume(i,[po.requestBackup])}}]),e}());function eA(e){return(eA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tA(e,t){return(tA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=iA(e);if(t){var i=iA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nA(this,r)}}function nA(e,t){return!t||"object"!==eA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function iA(e){return(iA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tA(e,t)}(r,e);var t=rA(r);function r(e,n){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=t.call(this,e.getDoc(),n)).key=n,i}return r}(ko);function AA(e){return(AA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sA(e,t){return(sA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=lA(e);if(t){var i=lA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return cA(this,r)}}function cA(e,t){return!t||"object"!==AA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lA(e){return(lA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sA(e,t)}(o,e);var t,r,n,i=uA(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).model=e,t}return t=o,(r=[{key:"toModel",value:function(){return this.model}}])&&aA(t.prototype,r),n&&aA(t,n),o}(Di.BackupItem);var fA,hA,pA=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.design=t,this.key=r,this.disposeListener=Ot.noop,this.BackupItemImpl=gA,this.open=function(){return Promise.resolve()},this.getModel=function(){return n.design},this.onUpdateModel=function(e){n.design=e},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.afterInit=function(e){kt.addSetHook(e)},this.beforeDispose=function(){}},dA=r(161);!function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(fA||(fA={})),function(e){e.SELECTED="SELECTED"}(hA||(hA={}));var IA=Symbol("paramModelAssembly"),yA=Symbol("paramModel");function CA(e,t){return(CA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function EA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vA(e);if(t){var i=vA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return BA(this,r)}}function BA(e,t){return!t||"object"!==mA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vA(e){return(vA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mA(e){return(mA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var QA,bA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":mA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},_A=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":mA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},SA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&CA(e,t)}(r,e);var t=EA(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).model=e,n._parent=void 0,n._children=[],n.entityType=IA,n.entityId=e.getId(),n}return r}(Di.Entity),wA=SA=bA([Object(Di.provideEntityAPIs)([new Di.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))]),_A("design:paramtypes",["function"==typeof(QA=void 0!==Ve.CoreParamModelAssembly&&Ve.CoreParamModelAssembly)?QA:Object])],SA);function DA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&MA(e,t)}function MA(e,t){return(MA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=TA(e);if(t){var i=TA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return PA(this,r)}}function PA(e,t){return!t||"object"!==FA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function TA(e){return(TA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function FA(e){return(FA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var OA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":FA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},LA=function(e){RA(r,e);var t=xA(r);function r(e,n){var i;return DA(this,r),(i=t.call(this)).model=e,i.context=n,i._parent=void 0,i._children=[],i.entityType=n.type,i.entityId=e.getId(),i}return r}(Di.Entity),kA=function(e){RA(r,e);var t=xA(r);function r(){return DA(this,r),t.apply(this,arguments)}return r}(LA);kA=OA([Object(Di.provideEntityAPIs)([new Di.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],kA);var NA=r(6),GA=r.n(NA),UA=r(190);function jA(e){return(jA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var VA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":jA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},YA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":jA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},HA=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.interactionPriority=0,this.selectable=!0};function KA(e){return function(t,r){var n=function(e,t){try{var r=e.materialReplacedInfos,n=e.materialUVEditInfos,i=e.texture,o=e.opacity;if(!(r&&r.length||n&&n.length||i))return t.getMesh()+(1!==o?String(o):"")+t.getMtl().reduce((function(e,t){var r=[];return r.push(e,t.getObjName(),t.getDiffuseTexture(),t.getReflectGlossiness(),t.getFresnel(),t.getU(),t.getV(),t.getW(),t.getH()),t.getDiffuseTextureScale()&&r.push(t.getDiffuseTextureScale().toString()),t.getDiffuseColor()&&r.push(t.getDiffuseColor().toString()),t.getReflectColor()&&r.push(t.getReflectColor().toString()),t.getRefractColor()&&r.push(t.getRefractColor().toString()),r.join("#")}),"")}catch(e){A=e,setTimeout((function(){throw A}))}var A;return null}(t,r);return e+n}}function qA(e){return(qA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function WA(e,t){return(WA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ZA(e);if(t){var i=ZA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return XA(this,r)}}function XA(e,t){return!t||"object"!==qA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ZA(e){return(ZA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}VA([Ft.observable,YA("design:type",Number)],HA.prototype,"opacity",void 0),VA([Ft.observable,YA("design:type",Boolean)],HA.prototype,"visible",void 0);var $A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&WA(e,t)}(o,e);var t,r,n,i=zA(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).props=e,t.material=new NA.LineBasicMaterial({color:fA.outline}),t.setAttribute("outline",!1),t.setAttribute("shadowCaster",!1),t.update({}),t}return t=o,(r=[{key:"updateProps",value:function(e){var t=this.props;this.props=e,this.update(t)}},{key:"update",value:function(e){var t,r,n=this.props.points;if(e.points!==n){var i=(t=n,(r=new NA.BufferGeometry).addAttribute("position",new NA.Float32BufferAttribute(t,3)),r);this.geometry=i,this.computeLineDistances()}var o=this.props,A=o.color,a=void 0===A?fA.outline:A,s=o.visible,u=void 0===s||s;this.material.setValues({color:a}),this.visible=u}}])&&JA(t.prototype,r),n&&JA(t,n),o}(NA.LineSegments),ea=r(360),ta=r(84);function ra(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function na(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ia=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ra(Object(r),!0).forEach((function(t){na(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ra(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({side:NA.Side.FrontSide,specular:1118481,shininess:15},{polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:15});function oa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Aa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oa(Object(r),!0).forEach((function(t){aa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function aa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sa(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ua(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){sa(o,n,i,A,a,"next",e)}function a(e){sa(o,n,i,A,a,"throw",e)}A(void 0)}))}}function ca(e){return la.apply(this,arguments)}function la(){return(la=ua(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.material,n=t.materialInfo,i=t.opacity,o=void 0===i?1:i,A=t.textureUrl,a=t.textureSize,u=null==n?void 0:n.getRefractColor(),c=Aa({},ia),u&&(l=Object(ta.clamp)(Math.max(u.x,u.y,u.z),0,1),r.transparent=l>.01,c.opacity=Math.max(1-l,.1)),"number"==typeof o&&(o=o>1?1:o<0?0:o,c.transparent=o<1,c.opacity=o,c.depthWrite=!c.transparent),g=A||(null==n?void 0:n.getDiffuseTexture()),!Object(Ot.isEmpty)(g)){e.next=12;break}(f=null==n?void 0:n.getDiffuseColor())&&(c.color=new NA.Color(f.x,f.y,f.z).getHex()),c.texture=null,e.next=25;break;case 12:if(r.diffuseTextureUrl=g,a){e.next=18;break}return e.next=16,Object(ea.loadImage)(g);case 16:h=e.sent,a={x:h.naturalWidth,y:h.naturalHeight};case 18:return e.next=20,Object(ea.loadTexture)(g,{wrapS:NA.WebGLTextureWrap.Repeat,wrapT:NA.WebGLTextureWrap.Repeat,cacheReject:!0});case 20:(p=e.sent).repeat=new NA.Vector2(1/a.x,1/a.y),p.updateMatrix(),c.uvTransform=p.matrix,c.texture=p;case 25:r.setValues(c);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ga(e){return(ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fa(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ha(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){fa(o,n,i,A,a,"next",e)}function a(e){fa(o,n,i,A,a,"throw",e)}A(void 0)}))}}function pa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function da(e,t){return(da=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ia(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ca(e);if(t){var i=Ca(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ya(this,r)}}function ya(e,t){return!t||"object"!==ga(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ca(e){return(Ca=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ea=new NA.BufferGeometry;var Ba=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&da(e,t)}(a,e);var t,r,n,i,o,A=Ia(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=A.call(this)).props=e,t.categoryId=wi.EDCCountCategory.PHONG,t.material=new NA.MeshPhongMaterial({transparent:!0}),t.update({}),t}return t=a,(r=[{key:"getProps",value:function(){return this.props}},{key:"updateProps",value:function(e){var t=this.props;this.props=e,this.update(t)}},{key:"update",value:(o=ha(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.props.visible,n=void 0===r||r,this.props.geometry!==t.geometry&&this.updateGeometry(),this.props.textureSize===t.textureSize&&this.props.tiledImgUrl===t.tiledImgUrl&&this.props.opacity===t.opacity&&this.props.popBufferMtl===t.popBufferMtl){e.next=5;break}return e.next=5,this.updateMaterial();case 5:this.visible=n;case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"updateGeometry",value:function(){var e,t,r,n,i,o,A=this.props.geometry;this.geometry&&this.geometry.dispose(),this.geometry=A?(e=A,t=new NA.BufferGeometry,r=new Uint32Array(e.indices),n=new Float32Array(e.vertices),i=new Float32Array(e.normals),o=new Float32Array(e.textures),t.index=new NA.BufferAttribute(r,1),t.addAttribute("position",new NA.BufferAttribute(n,3)),t.addAttribute("uv",new NA.BufferAttribute(o,2)),i&&i.length?t.addAttribute("normal",new NA.BufferAttribute(i,3)):t.computeVertexNormals(),t):Ea}},{key:"updateMaterial",value:(i=ha(s.a.mark((function e(){var t,r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,r=t.popBufferMtl,n=t.opacity,i=t.tiledImgUrl,o=t.textureSize,e.next=3,ca({material:this.material,materialInfo:r,opacity:n,textureUrl:i,textureSize:o});case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&pa(t.prototype,r),n&&pa(t,n),a}(NA.Mesh);function va(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ma(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ma(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function ma(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ba(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Sa={meshModels:[],renderChildNodes:[],furnitureModels:[],legal:!1,legalMesh:!1};var wa=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=t,this.context=r,this.modelDepProps=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qa(Object(r),!0).forEach((function(t){ba(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},Sa),this.childNodeDrawables=[],this.displayInfoDrawables=[],this.meshes=[],this.childNodeMeshes=[],this.displayInfoMeshs=[],this.state=new HA,this.id=t.model.getId(),this.type=r.type;var n,i=va(r.stateReducers);try{for(i.s();!(n=i.n()).done;){(0,n.value)(t.model,!1,this.state)}}catch(e){i.e(e)}finally{i.f()}}var t,r,n;return t=e,(r=[{key:"interactionPriority",get:function(){return this.state.interactionPriority}},{key:"pickActualInteractiveEntity",value:function(e){var t=this,r=e.intersection.object,n=function(){for(;r;){var e=t.context.objectManager.getInfo(r);if(e)return{entityId:e.id,entityType:e.type};r=r.parent}return{entityId:t.id,entityType:t.context.type}}();return this.context.pickActualInteractiveEntity(n,{point:e.intersection.point})}},{key:"create",value:function(e){var t,r=this.props.model,n=new NA.Group;return n.uuid=this.id,n.visible=null===(t=this.state.visible)||void 0===t||t,this.context.filterParamModel(r)&&(this.renderMeshes(n,r,e),this.renderChildNodeMeshes(n,r,e),this.renderDisplayInfoMesh(n,r,e),this.renderDisplayInfoMeshes(n,r,e),this.applyTransform(n,r),this.context.objectManager.addObject(n,{drawable:this,type:this.type,id:this.id,drawableState:this.state,model:r})),n}},{key:"update",value:function(e,t){var r,n=this.props.model;e.visible=null===(r=this.state.visible)||void 0===r||r,this.renderMeshes(e,n,t),this.renderChildNodeMeshes(e,n,t),this.renderDisplayInfoMesh(e,n,t),this.renderDisplayInfoMeshes(e,n,t),this.renderLineSegments(e,n),this.applyTransform(e,n)}},{key:"dispose",value:function(e){this.disposeMeshes(e),this.disposeDisplayInfoMesh(e),this.disposeDisplayInfoMeshs(e),this.disposeChildNodeMeshes(e),this.disposeLineSegments(e),this.context.objectManager.removeObject(e)}},{key:"applyTransform",value:function(e,t){var r=t.getPosition(),n=t.getScale(),i=t.getRotation();e.position.set(r.x,r.y,r.z),e.rotation.set(i.x,i.y,i.z),e.scale.set(n.x,n.y,n.z)}},{key:"disposeMeshes",value:function(e){for(var t=0;t<this.meshes.length;t++)Object(UA.dispose)(this.meshes[t]);e.removeObjects(this.meshes)}},{key:"disposeChildNodeMeshes",value:function(e){for(var t=0;t<this.childNodeDrawables.length;t++)this.childNodeDrawables[t].dispose(this.childNodeMeshes[t]),Object(UA.dispose)(this.childNodeMeshes[t]);e.removeObjects(this.childNodeMeshes)}},{key:"disposeDisplayInfoMesh",value:function(e){this.displayInfoDrawable&&this.displayInfoMesh&&(this.displayInfoDrawable.dispose(this.displayInfoMesh),Object(UA.dispose)(this.displayInfoMesh),e.remove(this.displayInfoMesh))}},{key:"disposeDisplayInfoMeshs",value:function(e){for(var t=0;t<this.displayInfoDrawables.length;t++)this.displayInfoDrawables[t].dispose(this.displayInfoMeshs[t]),Object(UA.dispose)(this.displayInfoMeshs[t]);e.removeObjects(this.displayInfoMeshs)}},{key:"disposeLineSegments",value:function(e){this.lineSegments&&(Object(UA.dispose)(this.lineSegments),e.remove(this.lineSegments))}},{key:"renderMeshes",value:function(e,t,r){var n,i,o,A=this.modelDepProps,a=null!==(n=this.state.opacity)&&void 0!==n?n:1,s=t.getMeshModels(),u=t.getLegal(),c=t.getLegalMesh();if(A.meshModels!==s||A.legal!==u||A.legalMesh!==c){A.meshModels=s,A.legal=u,A.legalMesh=c,this.disposeMeshes(e);var l=[];if(u&&c)for(var g,f=s.length;f--;)g=s[f],g=new Ba({geometry:g.geometry,tiledImgUrl:g.texture&&(g.texture.hdTiledImageUrl||g.texture.tiledImgUrl),textureSize:null===(i=g.texture)||void 0===i?void 0:i.size,opacity:a,popBufferMtl:g.displayMaterial}),l[f]=g,e.add(g);this.meshes=l}else for(var h,p=this.meshes,d=s.length;d--;)h=s[d],p[d].updateProps({geometry:h.geometry,tiledImgUrl:h.texture&&(h.texture.hdTiledImageUrl||h.texture.tiledImgUrl),textureSize:null===(o=h.texture)||void 0===o?void 0:o.size,opacity:a,popBufferMtl:h.displayMaterial})}},{key:"renderChildNodeMeshes",value:function(e,t,r){var n,i=(n=t,n.getChildren().filter((function(e){return e.getLegal()})).concat(n.getAccessories())).filter(this.context.filterParamModel);if(Object(Ot.isEqual)(this.modelDepProps.renderChildNodes,i))for(var o=0;o<this.childNodeDrawables.length;o++){var A=this.childNodeDrawables[o],a=this.childNodeMeshes[o];A.update(a,r)}else if(this.modelDepProps.renderChildNodes=i,this.disposeChildNodeMeshes(e),this.childNodeDrawables=i.map(this.props.renderChild),this.childNodeMeshes=this.childNodeDrawables.map((function(e){return e.create(r)})),this.childNodeMeshes.length>0){var s,u=va(this.childNodeMeshes);try{for(u.s();!(s=u.n()).done;){var c=s.value;e.add(c)}}catch(e){u.e(e)}finally{u.f()}}}},{key:"renderDisplayInfoMesh",value:function(e,t,r){var n=t.getFurnitureModel();this.modelDepProps.furnitureModel!==n?(this.modelDepProps.furnitureModel=n,this.disposeDisplayInfoMesh(e),n&&(this.displayInfoDrawable=new Di.DisplayInfoDrawable({displayInfo:n.displayInfo,position:n.furnitureTranslation||je.a.ZERO,size:n.size.clone().div(n.scale),scale:je.a.ONE,rotation:je.a.ZERO,generateComponentInstanceKey:KA(t.getId()),getMaterialSideProperty:function(){return NA.Side.DoubleSide}}),this.displayInfoMesh=this.displayInfoDrawable.create(r),e.add(this.displayInfoMesh))):this.displayInfoDrawable&&this.displayInfoDrawable.update(this.displayInfoMesh)}},{key:"renderDisplayInfoMeshes",value:function(e,t,r){var n=t.getFurnitureModels();if(this.modelDepProps.furnitureModels!==n){if(this.modelDepProps.furnitureModels=n,this.disposeDisplayInfoMeshs(e),this.displayInfoDrawables=n.map((function(e){return new Di.DisplayInfoDrawable({displayInfo:e.displayInfo,position:e.position,size:e.size,scale:e.scale,rotation:e.rotate,generateComponentInstanceKey:KA(t.getId())})})),this.displayInfoMeshs=this.displayInfoDrawables.map((function(e){return e.create(r)})),this.displayInfoMeshs.length>0){var i,o=va(this.displayInfoMeshs);try{for(o.s();!(i=o.n()).done;){var A=i.value;e.add(A)}}catch(e){o.e(e)}finally{o.f()}}}else for(var a=0;a<this.displayInfoDrawables.length;a++){var s=this.displayInfoDrawables[a],u=this.displayInfoMeshs[a];s.update(u)}}},{key:"renderLineSegments",value:function(e,t){var r,n=t.getWireFrames(),i=this.context.store.showOutline;this.modelDepProps.wireFrames!==n?(this.modelDepProps.wireFrames=n,this.disposeLineSegments(e),this.lineSegments=new $A({points:n||[],visible:i}),e.add(this.lineSegments)):null===(r=this.lineSegments)||void 0===r||r.updateProps({points:n||[],visible:i})}}])&&_a(t.prototype,r),n&&_a(t,n),e}();function Da(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ra(e,t){return(Ra=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ma(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Pa(e);if(t){var i=Pa(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xa(this,r)}}function xa(e,t){return!t||"object"!==Ta(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pa(e){return(Pa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ta(e){return(Ta="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Fa=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ta(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Oa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ra(e,t)}(r,e);var t=Ma(r);function r(){var e;return Da(this,r),(e=t.apply(this,arguments))._parent=void 0,e}return r}(LA);function La(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ka(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Na(e,t,r){return t&&ka(e.prototype,t),r&&ka(e,r),e}function Ga(e,t,r){var n=r.getEntity(e)||function(e,t){if(t.filterParamModel(e))return e.isRoot()?new Oa(e,t):new kA(e,t)}(e,t);if(n){r.registerEntity(e,n);var i=e.getParent();return i&&(n._parent=r.getEntity(i)),n._children=e.getChildNodes().map((function(e){return Ga(e,t,r)})).filter((function(e){return!!e})),n}}Oa=Fa([Object(Di.provideEntityAPIs)([new Di.EntityAPIs.DrawableAPI3D((function(){var e=this;return new wa({model:this.model,renderChild:function t(r){return new wa({model:r,renderChild:t},e.context)}},this.context)})),new Di.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],Oa);var Ua=function(){function e(t){var r=this;La(this,e),this.context=t,this.entityCaches=new WeakMap,this.entities=[],this.registerEntity=function(e,t){r.entityCaches.has(e)||r.entityCaches.set(e,t),r.entities.push(t)},this.getEntity=function(e){return r.entityCaches.get(e)}}return Na(e,[{key:"createEntities",value:function(e){var t={registerEntity:this.registerEntity,getEntity:this.getEntity};this.entities=[];for(var r=0,n=e.length;r<n;r++)Ga(e[r],this.context,t);return this.entities}},{key:"createAssemblyEntities",value:function(e){return e.map((function(e){return new wA(e)}))}}]),e}(),ja=function(){function e(t,r){La(this,e),this.getCustom=t,this.getEntities=[this.getParamModelEntities,this.getParamModelAssemblyEntities],this.factory=new Ua(r)}return Na(e,[{key:"getParamModelEntities",value:function(){var e=this.getCustom();return void 0!==e?this.factory.createEntities(e.getParamModels()):[]}},{key:"getParamModelAssemblyEntities",value:function(){var e=this.getCustom();return void 0!==e?this.factory.createAssemblyEntities(e.getParamModelAssemblies()):[]}}]),e}();function Va(e){return(Va="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Ya=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Va(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Ha=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Va(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Ka=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.showOutline=!1,this.selected=[]};function qa(e){return function(e){if(Array.isArray(e))return Ja(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ja(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ja(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ja(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Wa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Ya([Ft.observable,Ha("design:type",Object)],Ka.prototype,"showOutline",void 0),Ya([Ft.observable,Ha("design:type",Array)],Ka.prototype,"selected",void 0);var za=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.infoMap=new Map,this.idMap=new Map}var t,r,n;return t=e,(r=[{key:"addObject",value:function(e,t){this.infoMap.set(e,t),this.idMap.set(t.id,t)}},{key:"removeObject",value:function(e){var t=this.infoMap.get(e);t&&(this.infoMap.delete(e),t===this.idMap.get(t.id)&&this.idMap.delete(t.id))}},{key:"getInfo",value:function(e){return e instanceof NA.Object3D?this.infoMap.get(e):this.idMap.get(e)}},{key:"getInfos",value:function(){return qa(this.idMap.entries())}}])&&Wa(t.prototype,r),n&&Wa(t,n),e}(),Xa=r(189);function Za(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var $a=function(){function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.selectionStateManager=t,this.entityTypes=r,this.onSelectChange=n,this._onStateChange=function(){i.onStateChange()},this.init()}var t,r,n;return t=e,(r=[{key:"isSelected",value:function(e){return!!this.selected.find((function(t){return t.entityId===e}))}},{key:"init",value:function(){this.enable()}},{key:"release",value:function(){this.disable()}},{key:"enable",value:function(){this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Xa.UPDATE,this._onStateChange),this.onStateChange()}},{key:"disable",value:function(){this.selectionStateManager.off(Xa.UPDATE,this._onStateChange),this.rawSelected=[],this.selected=[]}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value,t=this.rawSelected,r=this.selected;if(this.rawSelected!==e){this.rawSelected=e;var n=this.resolveSelected(e)||[];this.resolveSelectedChanged(this.selected,n)&&(this.selected=n)}t!==e&&this.onSelectChange(this.selected,r)}},{key:"resolveSelected",value:function(e){var t=this;return e.filter((function(e){return t.entityTypes.includes(e.entityType)}))}},{key:"resolveSelectedChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=function(e,t){return e>t?1:e===t?0:-1},n=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),i=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),o=0,A=i.length;o<A;++o)if(n[o]!==i[o])return!0;return!1}}])&&Za(t.prototype,r),n&&Za(t,n),e}();function es(e){return(es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ts(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||ns(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rs(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=ns(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function ns(e,t){if(e){if("string"==typeof e)return is(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?is(e,t):void 0}}function is(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function os(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function As(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function as(e,t){return(as=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ss(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=cs(e);if(t){var i=cs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return us(this,r)}}function us(e,t){return!t||"object"!==es(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cs(e){return(cs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}$a.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED";var ls=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&as(e,t)}(o,e);var t,r,n,i=ss(o);function o(){var e;return os(this,o),(e=i.apply(this,arguments)).store=new Ka,e.objectManager=new za,e.stateReducers=[],e.onScene3DInit=function(t){e.appService.stateManager.registerView(e._scene3dId).registerDefaultSystems3D(e._scene3dId,t).activeView(e._scene3dId)},e.toggleShowModelOutline=function(t){e.store.showOutline=t},e.updateModelState=function(t,r){var n=e.objectManager.getInfo(t),i=e.selectManager.isSelected(t);r(n.drawableState,i)},e.updateModelsState=function(t){var r,n=rs(e.objectManager.getInfos());try{for(n.s();!(r=n.n()).done;){var i=ts(r.value,2),o=i[0],A=i[1],a=e.selectManager.isSelected(o);t(o,A.drawableState,a)}}catch(e){n.e(e)}finally{n.f()}},e}return t=o,(r=[{key:"config",value:function(e,t){var r=this;this._scene3dId=t.scene3dID||"scene3d",this.appService=e;var n=e.stateManager,i=t.paramModelSymbol,o=t.getDoc,A=t.getCustom,a=t.pickActualInteractiveEntity,s=void 0===a?function(e){return e}:a,u=t.filterParamModel;this.selectManager=new $a(n.selection,[i],(function(e,t){r.store.selected=e,r.emit(hA.SELECTED,{selected:e,oldSelected:t})})),e.registerEntityDocument(new ja(A,{store:this.store,type:i,objectManager:this.objectManager,pickActualInteractiveEntity:s,stateReducers:this.stateReducers,filterParamModel:u}));var c=o().getElementContext();return c.getterEmitter.on((function(e){Ft.advanced.reportObserved(e.instance)})),c.setterEmitter.on((function(e){Ft.advanced.reportChanged(e.instance)})),this}},{key:"registerReducer",value:function(e){this.stateReducers.push(e)}},{key:"triggerReducer",value:function(e){var t,r=rs(this.objectManager.getInfos());try{for(r.s();!(t=r.n()).done;){var n=ts(t.value,2),i=n[0],o=n[1];if(!e||e.includes(i)){var A,a=this.selectManager.isSelected(i),s=rs(this.stateReducers);try{for(s.s();!(A=s.n()).done;)(0,A.value)(o.model,a,o.drawableState)}catch(e){s.e(e)}finally{s.f()}}}}catch(e){r.e(e)}finally{r.f()}}},{key:"scene3dId",get:function(){return this._scene3dId}}])&&As(t.prototype,r),n&&As(t,n),o}(Pt.EventEmitter),gs=r(289),fs=r.n(gs),hs=r(730);function ps(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ds(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Is(e,t,r){return t&&ds(e.prototype,t),r&&ds(e,r),e}function ys(e){return(ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Cs,Es,Bs,vs,ms=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ys(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Qs=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":ys(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function bs(e){var t=this;if(t===Bs.GUARD)return function(e,t,r){var n=r.value;return(r=Object.assign({},r)).value=function(){var e,r=void 0,i=this.__TRANSFORM_CONTEXT_ADD_DEP;if(i)if(vs){if(i!==vs)throw Error("CUSTOM: Access model data by crossing stub");i=void 0}else;i&&(vs=i,$e.a.begGetDeps(i));try{e=n.apply(this,arguments)}catch(e){r=e}if(i&&(vs=void 0,$e.a.endGetDeps(i)),r)throw r.message="CUSTOM: ["+t+"] "+r.message,r;return e},r};var r=0===arguments.length;return function(n,i){if(r){var o="get"+i[0].toLocaleUpperCase()+i.slice(1);e=function(e){return e[o]()}}if(!n.hasOwnProperty("__lazyKeys")){var A=[],a=[],s=[];Object.defineProperty(n,"__lazyKeys",{configurable:!0,enumerable:!0,value:A}),Object.defineProperty(n,"__immeKeys",{configurable:!0,enumerable:!0,value:a}),Object.defineProperty(n,"__immeVals",{configurable:!0,enumerable:!0,value:s});var u=n.__accessLazyValues,c=n.__accessImmeValues;Object.defineProperty(n,"__accessImmeValues",{configurable:!0,enumerable:!0,value:function(){c&&c.call(this);for(var e=void 0,t=0,r=a.length;t<r;++t)e=s[t],this[a[t]]=Object(Ot.isFunction)(e)?e(this.__DONT_USE_ME):e}}),Object.defineProperty(n,"__accessLazyValues",{configurable:!0,enumerable:!0,value:function(){u&&u.call(this);for(var e=0,t=A.length;e<t;++e)this[A[e]]}})}t===Bs.LAZY?(n.__lazyKeys.push(i),Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){var t=this.__LAZY_VALUES;if(t.__keys[i])return t[i];var r=e;if(Object(Ot.isFunction)(e)){var n=void 0,o=this.__TRANSFORM_CONTEXT_ADD_DEP;if(o)if(vs){if(o!==vs)throw Error("CUSTOM: Access model data by crossing stub");o=void 0}else;o&&(vs=o,$e.a.begGetDeps(o));try{r=e(this.__DONT_USE_ME,this)}catch(e){n=e}if(o&&(vs=void 0,$e.a.endGetDeps(o)),n)throw n.message="CUSTOM: ["+i+"] "+n.message,n}return t[i]=r,t.__keys[i]=!0,r}})):(n.__immeKeys.push(i),n.__immeVals.push(e))}}!function(e){e.LAZY="__@access@lazy@__",e.IMMEDIATE="__@access@imme@__",e.GUARD="__@access@guard@__"}(Bs||(Bs={}));var _s={lazy:bs.bind(Bs.LAZY),imme:bs.bind(Bs.IMMEDIATE),guard:bs.bind(Bs.GUARD),castTo:void 0};_s.castTo=function(){return _s};var Ss=function(){function e(t){ps(this,e),this.__DONT_USE_ME=t,vs&&(this.__TRANSFORM_CONTEXT_ADD_DEP=vs),Object.defineProperty(this,"__LAZY_VALUES",{enumerable:!1,value:{__keys:{}}}),this.__accessImmeValues&&this.__accessImmeValues()}return Is(e,[{key:"asStub",value:function(){var e=Xe.CDoc.transformModelContext;if(e&&e.deps&&e.rms){var t=e.deps,r=e.rms,n=this.__DONT_USE_ME;t.add(n),r.listeningTypes.add(n.constructor),this.__TRANSFORM_CONTEXT_ADD_DEP=function(e){e!==n&&(t.add(e),r.listeningTypes.add(e.constructor))}}else this.__TRANSFORM_CONTEXT_ADD_DEP&&(this.__TRANSFORM_CONTEXT_ADD_DEP=void 0)}},{key:"toPlain",value:function(){this.__accessLazyValues&&this.__accessLazyValues();var e=function(e,t){for(var r,n=Object.getOwnPropertyNames(e),i=0,o=n.length;i<o;++i)(r=n[i]).startsWith("$")||r.startsWith("_")||(t[r]=e[r]);return t},t={};return e(this,t),e(this.__LAZY_VALUES,t),t}},{key:"guard",value:function(e){return e(this)}}]),e}();ms([_s.imme(),Qs("design:type",String)],Ss.prototype,"id",void 0),ms([_s.imme((function(e){return e.constructor})),Qs("design:type","function"==typeof(Cs=void 0!==hs.ConstructorOf&&hs.ConstructorOf)?Cs:Object)],Ss.prototype,"kType",void 0),ms([_s.lazy((function(e){return e})),Qs("design:type",Boolean)],Ss.prototype,"$model",void 0),ms([_s.guard(),Qs("design:type",Function),Qs("design:paramtypes",[Function]),Qs("design:returntype","function"==typeof(Es="undefined"!=typeof T&&T)?Es:Object)],Ss.prototype,"guard",null);var ws=function(){function e(){ps(this,e)}return Is(e,null,[{key:"registeCreator",value:function(e,t){this.creators.set(e,t)}},{key:"get",value:function(e,t){if(t||!e.__modelDataFacade){var r=this.creators.get(e.constructor);if(!r)return;e.__modelDataFacade=r(e)}return e.__modelDataFacade}},{key:"put",value:function(e){e.__modelDataFacade&&(e.__modelDataFacade=void 0)}}]),e}();ws.creators=new Map;var Ds=r(246);function Rs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ms(e,t){return(Ms=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ts(e);if(t){var i=Ts(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ps(this,r)}}function Ps(e,t){return!t||"object"!==Fs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ts(e){return(Ts=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Fs(e){return(Fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Os,Ls,ks,Ns,Gs,Us=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Fs(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},js=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Fs(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Vs=Symbol("baseParamModel"),Ys=_s.castTo(),Hs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ms(e,t)}(r,e);var t=xs(r);function r(){return Rs(this,r),t.apply(this,arguments)}return r}(Ss);function Ks(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qs(e,t){return(qs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Js(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zs(e);if(t){var i=zs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ws(this,r)}}function Ws(e,t){return!t||"object"!==Xs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zs(e){return(zs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xs(e){return(Xs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Us([Ys.lazy(),js("design:type",String)],Hs.prototype,"modelInstanceId",void 0),Us([Ys.imme(Vs),js("design:type",Symbol)],Hs.prototype,"type",void 0),Us([Ys.lazy((function(e){return e.getType()})),js("design:type","function"==typeof(Os=void 0!==Yn.ParamModelType&&Yn.ParamModelType)?Os:Object)],Hs.prototype,"modelType",void 0),Us([Ys.lazy(),js("design:type",String)],Hs.prototype,"name",void 0),Us([Ys.lazy(),js("design:type","function"==typeof(Ls=void 0!==je.a&&je.a)?Ls:Object)],Hs.prototype,"size",void 0),Us([Ys.lazy(),js("design:type","function"==typeof(ks=void 0!==Te.a&&Te.a)?ks:Object)],Hs.prototype,"box3",void 0),Us([Ys.lazy(),js("design:type","function"==typeof(Ns=void 0!==Ds.ParamStore&&Ds.ParamStore)?Ns:Object)],Hs.prototype,"paramStore",void 0),Us([Ys.lazy(),js("design:type","function"==typeof(Gs=void 0!==Yn.ParamModelCategory&&Yn.ParamModelCategory)?Gs:Object)],Hs.prototype,"category",void 0),Us([Ys.lazy(),js("design:type",Boolean)],Hs.prototype,"legal",void 0),Us([Ys.lazy((function(e){return e.getHasAttached()})),js("design:type",Boolean)],Hs.prototype,"attached",void 0),Us([Ys.lazy(),js("design:type",Boolean)],Hs.prototype,"deletable",void 0),Us([Ys.lazy(),js("design:type",Boolean)],Hs.prototype,"replaceable",void 0),Us([Ys.lazy(),js("design:type",Number)],Hs.prototype,"attachedVersion",void 0),Us([Ys.lazy(),js("design:type",Boolean)],Hs.prototype,"paramOverride",void 0);var Zs,$s,eu=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Xs(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},tu=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Xs(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ru=_s.castTo(),nu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qs(e,t)}(o,e);var t,r,n,i=Js(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e)).parent=t,r}return t=o,(r=[{key:"visit",value:function(e,t){this.$model.visit(e,t)}},{key:"upVisit",value:function(e,t){this.$model.upVisit(e,t)}}])&&Ks(t.prototype,r),n&&Ks(t,n),o}(Hs);function iu(e){return(iu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ou(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Au(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ou(Object(r),!0).forEach((function(t){au(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ou(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function au(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function su(e){return function(e){if(Array.isArray(e))return uu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return uu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uu(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function lu(e,t,r){return(lu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=pu(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function gu(e,t){return(gu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pu(e);if(t){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hu(this,r)}}function hu(e,t){return!t||"object"!==iu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pu(e){return(pu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function du(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}eu([ru.lazy((function(e,t){for(var r=t;r.parent;)r=r.parent;return r})),tu("design:type",nu)],nu.prototype,"root",void 0),eu([ru.imme(yA),tu("design:type",Symbol)],nu.prototype,"type",void 0),eu([ru.lazy((function(e){return e.isRoot()})),tu("design:type",Boolean)],nu.prototype,"isRoot",void 0),eu([ru.lazy((function(e){return e.isAccessory()})),tu("design:type",Boolean)],nu.prototype,"isAccessory",void 0),eu([ru.lazy((function(e){return e.getAssembly()?e.getAssembly().getId():void 0})),tu("design:type",String)],nu.prototype,"assemblyId",void 0),eu([ru.lazy((function(e,t){return e.getChildren().map((function(e){return ws.get(e)}))})),tu("design:type",Array)],nu.prototype,"children",void 0),eu([ru.lazy((function(e,t){return e.getAccessories().map((function(e){return ws.get(e)}))})),tu("design:type",Array)],nu.prototype,"accessories",void 0),eu([ru.lazy((function(e,t){return t.children.concat(t.accessories)})),tu("design:type",Array)],nu.prototype,"childNodes",void 0),eu([ru.lazy((function(e,t){return!!e.getAssembly()&&e.getAssembly().isTemplateAssembly()})),tu("design:type",Boolean)],nu.prototype,"belongsToTemplateAssembly",void 0),eu([ru.guard(),tu("design:type",Function),tu("design:paramtypes",["function"==typeof(Zs=void 0!==gt.ParamModelVisitor&&gt.ParamModelVisitor)?Zs:Object,Boolean]),tu("design:returntype",void 0)],nu.prototype,"visit",null),eu([ru.guard(),tu("design:type",Function),tu("design:paramtypes",["function"==typeof($s=void 0!==gt.ParamModelVisitor&&gt.ParamModelVisitor)?$s:Object,Boolean]),tu("design:returntype",void 0)],nu.prototype,"upVisit",null),ws.registeCreator(mt,(function(e){return e.isRoot()?new nu(e):ws.get(e.getParent()).guard((function(t){return new nu(e,t)}))}));Symbol("paramModelMultiSelectionEntity");var Iu=function e(){du(this,e),this.paramModels=[],this.paramModelAssembies=[]},yu=function(e,t){return t.paramsMap[e]||t.paramsChildrenMap[e]},Cu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gu(e,t)}(o,e);var t,r,n,i=fu(o);function o(e){var t;return du(this,o),(t=i.call(this,e)).findModelOrAssemblyModelById=function(e){var r=t.findModel(e);return r?r.$model:t.findParamModelAssembly(e)},t.modelsMap={paramsMap:{},paramsChildrenMap:{}},t.childrenMap={},t}return t=o,(r=[{key:"updateState",value:function(e){var t=this.state?this.state.paramModels:[],r=this.state?this.state.paramModelAssembies:[];lu(pu(o.prototype),"updateState",this).call(this,e);var n=this.state.paramModels,i=this.state.paramModelAssembies;this.updateParamModelsMap(t,n),t===n&&r===i||this.emit(o.EVENT_PARAM_MODELS_CHANGED,this)}},{key:"updateParamModelsMap",value:function(e,t){var r=wi.Util.diffArray(e,t),n=this.modelsMap.paramsMap,i=r.removed;i.push.apply(i,su(r.updatedOld));var o,A,a=r.added;a.push.apply(a,su(r.updatedNew));for(var s=this.childrenMap,u=this.modelsMap.paramsChildrenMap,c=0,l=i.length;c<l;++c){if(delete n[A=i[c].id],(o=s[A])&&o.length>0)for(var g=0,f=o.length;g<f;++g)delete u[o[g]];delete s[A]}for(var h=0,p=a.length;h<p;++h)n[A=a[h].id]=a[h].$model,o=[],a[h].visit((function(e){A=e.getId(),o.push(A),u[A]=e,ws.put(e)}),!0),s[A]=o}},{key:"initState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.updateState(Au(Au({},e),new Iu)),this.state}},{key:"initModelBindingState",value:function(e){}},{key:"bindDesign",value:function(e){var t=this.reactiveModelState;t||(t=new(fs.a.createBase({defaultArrayItemSyncPoint:function(e,t){return!0},shouldIgnoreBinderCheck:function(e){return e&&e.type===yA}}))(this.updateState.bind(this),this.isImmutable),this.reactiveModelState=t);var r=e.getDoc();t.initModelState({paramModels:Object(gs.bindArray)(r.addDependency((function(){return e.getCustom().getParamModels()}),t)).map(r.addDependency((function(e){var t=ws.get(e,!0);return t.asStub(),t}),t)),paramModelAssembies:Object(gs.bindArray)(r.addDependency((function(){return e.getCustom().getParamModelAssemblies()}),t)).map(r.addDependency((function(e){return e}),t))})}},{key:"findModelEx",value:function(e,t){return t(e,this.modelsMap)}},{key:"findModel",value:function(e){var t=this.findModelEx(e,yu);return t?ws.get(t):void 0}},{key:"findParamModelAssembly",value:function(e){return this.state.paramModelAssembies.find((function(t){return t.id===e}))}}])&&cu(t.prototype,r),n&&cu(t,n),o}(Di.KafBaseStateManager);function Eu(e){return(Eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mu(e,t,r){return(mu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Su(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Qu(e,t){return(Qu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Su(e);if(t){var i=Su(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _u(this,r)}}function _u(e,t){return!t||"object"!==Eu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Su(e){return(Su=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Cu.EVENT_PARAM_MODELS_CHANGED="EVENT_PARAM_MODELS_CHANGED";var wu,Du=Object(dA.getConnector)().setRootState,Ru=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qu(e,t)}(o,e);var t,r,n,i=bu(o);function o(){var e;return Bu(this,o),(e=i.apply(this,arguments)).design=new lt,e.fittingDesign=new Zt,e}return t=o,(r=[{key:"initState",value:function(){mu(Su(o.prototype),"initState",this).call(this);var e=Qc().getDependentPlugin(Di.AppServicePlugin);return this.kaf=e.stateManager,this.pad.bindDesign(this.design),this.state}}])&&vu(t.prototype,r),n&&vu(t,n),o}(Di.types.combine({pad:Cu}));function Mu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){e[e.NONE=0]="NONE",e[e.NORMAL=0]="NORMAL",e[e.ENCRYPTED=1]="ENCRYPTED",e[e.COMPRESSED=2]="COMPRESSED"}(wu||(wu={}));var xu=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"toNetParams",value:function(e,t,r){var n={};return n.api=e,n.params=t?t.params:void 0,n.data=r,void 0===n.data&&(n.data=t?t.data:void 0),n.headers=t&&t.headers||{},n}},{key:"toAxiosConfig",value:function(e){e.method||(e.method=wi.ERequest.GET),e.method===wi.ERequest.GET&&e.data&&(e.params?Object.keys(e.data).forEach((function(t){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==e.params[t]&&console.warn("HTTP GET params ["+t+"] overwrited by data"),e.params[t]=e.data[t]})):e.params=e.data,delete e.data);var t={};if(t.url=e.url||e.api,t.params=e.params,t.data=e.data,t.headers=e.headers,t.method=e.method,e.extend){var r=t,n=e.extend;Object.keys(n).forEach((function(e){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==r[e]&&console.warn("[CUSTOM] Request config ["+e+"] overwrited by extend"),r[e]=n[e]}))}return t}}],(r=null)&&Mu(t.prototype,r),n&&Mu(t,n),e}();function Pu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Tu=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.net=t}var t,r,n;return t=e,(r=[{key:"addClientInterceptors",value:function(e){}},{key:"encryptedGet",value:function(e,t){return this._get(wu.ENCRYPTED,e,t)}},{key:"encryptedDelete",value:function(e,t){return this._delete(wu.ENCRYPTED,e,t)}},{key:"encryptedPost",value:function(e,t,r){return this._post(wu.ENCRYPTED,e,t,r)}},{key:"encryptedPut",value:function(e,t,r){return this._put(wu.ENCRYPTED,e,t,r)}},{key:"gzipGet",value:function(e,t){return this._get(wu.COMPRESSED,e,t)}},{key:"gzipPost",value:function(e,t,r){return this._post(wu.COMPRESSED,e,t,r)}},{key:"request",value:function(e){var t=xu.toNetParams(e.url,e);return this.net.get(t)}},{key:"get",value:function(e,t){return this._get(wu.NORMAL,e,t)}},{key:"delete",value:function(e,t){return this._delete(wu.NORMAL,e,t)}},{key:"post",value:function(e,t,r){return this._post(wu.NORMAL,e,t,r)}},{key:"put",value:function(e,t,r){return this._put(wu.NORMAL,e,t,r)}},{key:"_get",value:function(e,t,r){var n=xu.toNetParams(t,r);return this.net.get(n,{mode:e})}},{key:"_delete",value:function(e,t,r){var n=xu.toNetParams(t,r);return this.net.delete(n,{mode:e})}},{key:"_post",value:function(e,t,r,n){var i=xu.toNetParams(t,n,r);return this.net.post(i,{mode:e})}},{key:"_put",value:function(e,t,r,n){var i=xu.toNetParams(t,n,r);return i.method="PUT",this.net.request(i,{mode:e})}}])&&Pu(t.prototype,r),n&&Pu(t,n),e}();function Fu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ou(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fu(Object(r),!0).forEach((function(t){Lu(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Lu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ku(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Nu(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ku(o,n,i,A,a,"next",e)}function a(e){ku(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Gu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Uu=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e=Nu(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.request(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.get=function(){var e=Nu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Ou(Ou({},n),{},{url:r})),e.next=4,t.service.get(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.delete=function(){var e=Nu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Ou(Ou({},n),{},{url:r})),e.next=4,t.service.delete(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.post=function(){var e=Nu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Ou(Ou({},i),{},{data:n,url:r})),e.next=4,t.service.post(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.put=function(){var e=Nu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Ou(Ou({},i),{},{data:n,url:r})),e.next=4,t.service.put(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedRequest=function(){var e=Nu(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.encryptedRequest(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedGet=function(){var e=Nu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Ou(Ou({},n),{},{url:r})),e.next=4,t.service.encryptedGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedDelete=function(){var e=Nu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Ou(Ou({},n),{},{url:r})),e.next=4,t.service.encryptedDelete(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedPost=function(){var e=Nu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Ou(Ou({},i),{},{data:n,url:r})),e.next=4,t.service.encryptedPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedPut=function(){var e=Nu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Ou(Ou({},i),{},{data:n,url:r})),e.next=4,t.service.encryptedPut(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipRequest=function(){var e=Nu(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.gzipRequest(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipGet=function(){var e=Nu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Ou(Ou({},n),{},{url:r})),e.next=4,t.service.gzipGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipPost=function(){var e=Nu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Ou(Ou({},i),{},{data:n,url:r})),e.next=4,t.service.gzipPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipPut=function(){var e=Nu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Ou(Ou({},i),{},{data:n,url:r})),e.next=4,t.service.gzipPut(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.pbGzipGet=function(){var e=Nu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(Ou(Ou({},n),{},{url:r})),e.next=4,t.service.pbGzipGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.pbGzipPost=function(){var e=Nu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(Ou(Ou({},i),{},{data:n,url:r})),e.next=4,t.service.pbGzipPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}var t,r,n;return t=e,(r=[{key:"service",get:function(){if(!this._service)throw new Error("please call setRequestClient before getRequestClient.");return this._service}},{key:"setMiniAppHttpProxyClientService",value:function(e){return this._service=e,this}},{key:"convertRequest",value:function(e){var t,r;return{url:e.url,method:e.method,baseURL:e.baseURL,params:e.params,data:e.data,timeout:e.timeout,extra:{isRequestBodyJson:null===(r=null===(t=e)||void 0===t?void 0:t.extra)||void 0===r?void 0:r.isRequestBodyJson}}}},{key:"wrapResponse",value:function(e,t){return{data:t.data,status:200,statusText:"ok",headers:{},config:e,encryptedDataLength:0,dataLength:0}}}])&&Gu(t.prototype,r),n&&Gu(t,n),e}(),ju=r(1128),Vu=r(31),Yu=r(213),Hu=r(162),Ku=r(92);function qu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ju(e,t){return(Ju=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xu(e);if(t){var i=Xu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zu(this,r)}}function zu(e,t){return!t||"object"!==Zu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xu(e){return(Xu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zu(e){return(Zu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var $u,ec,tc,rc,nc,ic,oc,Ac,ac=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Zu(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},sc=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Zu(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},uc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ju(e,t)}(r,e);var t=Wu(r);function r(){var e;return qu(this,r),(e=t.apply(this,arguments)).client=Object(Hu.getClient)([Vu.interceptor,Yu.errorCodeInterceptor,Vu.parseCDNInterceptor,Vu.parseJSONInterceptor]),e.encryptedClient=Object(Hu.getClient)([Vu.interceptor,Yu.errorCodeInterceptor,Vu.encryptInterceptor,Vu.parseCDNInterceptor,Vu.parseJSONInterceptor]),e.gzippedEncryptClient=Object(Hu.getClient)([Vu.interceptor,Yu.errorCodeInterceptor,Vu.gzipEncryptBase64Interceptor,Vu.parseCDNInterceptor,Vu.parseJSONInterceptor]),e.pbEncryptedClient=Object(Hu.getClient)([Vu.interceptor,Yu.errorCodeInterceptor,Vu.encryptInterceptorWithArrayBuffer,Vu.encryptInterceptor,Vu.parseCDNInterceptor,Vu.parseJSONInterceptor]),e.pbGzippedEncryptClient=Object(Hu.getClient)([Vu.interceptor,Yu.errorCodeInterceptor,Vu.gzipEncryptInterceptorWithArrayBuffer,Vu.parseCDNInterceptor,Vu.parseJSONInterceptor]),e.ossGzippedEncryptClient=Object(Hu.getClient)([Vu.interceptor,Yu.errorCodeInterceptor,Vu.gzipEncryptBase64Interceptor,Vu.parseCDNInterceptor,Vu.parseJSONInterceptor]),e.ossDegradedEncryptedClient=Object(Hu.getClient)([Vu.interceptor,Yu.errorCodeInterceptor,Vu.ossDegradedEncryptInterceptor,Vu.parseCDNInterceptor,Vu.parseJSONInterceptor]),e.ossDegradedGzippedEncryptClient=Object(Hu.getClient)([Vu.interceptor,Yu.errorCodeInterceptor,Vu.ossDegradedGzipEncryptBase64Interceptor,Vu.parseCDNInterceptor,Vu.parseJSONInterceptor]),e}return r}(ju.RequestClient);ac([Vu.retryRequest,sc("design:type","function"==typeof($u=void 0!==Ku.AxiosInstance&&Ku.AxiosInstance)?$u:Object)],uc.prototype,"client",void 0),ac([Vu.retryRequest,sc("design:type","function"==typeof(ec=void 0!==Ku.AxiosInstance&&Ku.AxiosInstance)?ec:Object)],uc.prototype,"encryptedClient",void 0),ac([Vu.retryRequest,sc("design:type","function"==typeof(tc=void 0!==Ku.AxiosInstance&&Ku.AxiosInstance)?tc:Object)],uc.prototype,"gzippedEncryptClient",void 0),ac([Vu.retryRequest,sc("design:type","function"==typeof(rc=void 0!==Ku.AxiosInstance&&Ku.AxiosInstance)?rc:Object)],uc.prototype,"pbEncryptedClient",void 0),ac([Vu.retryRequest,sc("design:type","function"==typeof(nc=void 0!==Ku.AxiosInstance&&Ku.AxiosInstance)?nc:Object)],uc.prototype,"pbGzippedEncryptClient",void 0),ac([Object(Vu.retryRequest)(!0),sc("design:type","function"==typeof(ic=void 0!==Ku.AxiosInstance&&Ku.AxiosInstance)?ic:Object)],uc.prototype,"ossGzippedEncryptClient",void 0),ac([Vu.retryRequest,sc("design:type","function"==typeof(oc=void 0!==Ku.AxiosInstance&&Ku.AxiosInstance)?oc:Object)],uc.prototype,"ossDegradedEncryptedClient",void 0),ac([Vu.retryRequest,sc("design:type","function"==typeof(Ac=void 0!==Ku.AxiosInstance&&Ku.AxiosInstance)?Ac:Object)],uc.prototype,"ossDegradedGzippedEncryptClient",void 0);var cc=Object(Ot.once)((function(){return new uc})),lc=Object(Ot.once)((function(){return new Uu}));function gc(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function fc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var hc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n,i,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){return cc().addClientInterceptors(e)}},{key:"send",value:(i=s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=cc(),i=xu.toAxiosConfig(t),r.mode!==wu.COMPRESSED){e.next=6;break}return e.abrupt("return",n.gzipRequest(i));case 6:if(r.mode!==wu.ENCRYPTED){e.next=10;break}return e.abrupt("return",n.encryptedRequest(i));case 10:return e.abrupt("return",n.request(i));case 11:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){gc(o,r,n,A,a,"next",e)}function a(e){gc(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e,t){return o.apply(this,arguments)})}])&&fc(t.prototype,r),n&&fc(t,n),e}();function pc(e){return(pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ic(e,t,r){return(Ic="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bc(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function yc(e,t){return(yc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Bc(e);if(t){var i=Bc(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ec(this,r)}}function Ec(e,t){return!t||"object"!==pc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bc(e){return(Bc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vc=new wi.SingletonRef,mc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yc(e,t)}(o,e);var t,r,n,i=Cc(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.core",name:"cCoreApp",Component:Ni,axrs:fo,singleton:vc},e)).stateManager=t,r}return t=o,(r=[{key:"init",value:function(){Ic(Bc(o.prototype),"init",this).call(this),this.onInitialize()}},{key:"onInitialize",value:function(){var e=this.getDependentPlugin(Di.AppServicePlugin);this.initLogger(e);var t=this.stateManager,r=t.design,n=t.fittingDesign;$o.configTopDocumentAction([r],e.stateManager.document),e.addDocumentSource(new oA(r,"custom-pad-document")),e.addDocumentSource(new pA(n,"fitting-document"));var i=r.getDoc().getElementContext();i.getterEmitter.on((function(e){Ft.advanced.reportObserved(e.instance)})),i.setterEmitter.on((function(e){Ft.advanced.reportChanged(e.instance)}))}},{key:"initLogger",value:function(e){var t;t=e.logger,Xi=t}},{key:"initStateManager",value:function(){this.stateManager.initState(),Du(this.stateManager)}},{key:"initNet",value:function(){Ic(Bc(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new hc),this.client=new Tu(this.net)}}])&&dc(t.prototype,r),n&&dc(t,n),o}(wi.PluginApplication),Qc=vc.instance;function bc(e){return function(e){if(Array.isArray(e))return _c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return _c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _c(e,t)}(e)||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 _c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Sc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dc(e,t){var r=t.findRelativeModel,n=t.transformModel,i=t.color,o=t.defaultConfig;return Object(Ot.map)(e,(function(e,t){var A=r(t);return A?Object(Ot.map)(e,(function(e){var t=n(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sc(Object(r),!0).forEach((function(t){wc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),A,o);return i&&t.setViewColor(i),t})):(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前孔槽找不到对应模型!"),[])})).flat()}function Rc(e,t){if(!(e instanceof Tr&&e.type===w.NONE)){var r=Qc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=e.path.plankArea.modelID,o=n.find((function(t){return t.id===e.id&&t.linkModel.id===i})),A=e.getHint();if(o)o.setViewColor(A.color),o.setOpacity(A.opacity);else{var a=function(e){var t=e instanceof Rr?e.getRealLine():e.getCurveLineAndPoints().curveLine;if(t instanceof u.Arc2d||t instanceof u.EllipticalArc2d){var r=e.path.getAllCurves().map((function(e){return e.curve}));if(t instanceof u.Arc2d){var n=t.circle.clone();n.radius+=1,t=new u.Arc2d(n,t.startAngle,t.endAngle,t.isCCW),e.path.type===Re.OUTER!=(u.PtInLoop.pointInLoop2D(t.middlePoint,r).ptInLoopType===u.PtInLoop.PtInLoopType.Outside)&&(n.radius-=2,t=new u.Arc2d(n,t.startAngle,t.endAngle,t.isCCW))}if(t instanceof u.EllipticalArc2d){var i=t.ccs,o=t.majorRadius+1,A=t.minorRadius+1,a=t.startParam,s=t.endParam,c=t.clockSign;t=new u.EllipticalArc2d(i,o,A,a,s,c),e.path.type===Re.OUTER!=(u.PtInLoop.pointInLoop2D(t.middlePoint,r).ptInLoopType===u.PtInLoop.PtInLoopType.Outside)&&(o=t.majorRadius-1,A=t.minorRadius-1,t=new u.EllipticalArc2d(i,o,A,a,s,c))}}return t}(e);t&&a.transform(t);var s=function(e){var t,r=e.linkModelId,n=e.hintModelId,i=e.curveLine,o=e.hint,A=Qc().getStateManager().pad.findModelOrAssemblyModelById(r);if(A){var a=null===(t=A.getParam("thickness"))||void 0===t?void 0:t.getData().value,s=i instanceof u.EllipticalArc2d?i.getApproximatePoints(.01):i.getApproximatePoints();return new On({linkModel:A,points:s,color:o.color,opacity:o.opacity,height:a?+a:0,id:n})}}({hint:A,curveLine:a,hintModelId:e.id,linkModelId:i});s&&r.setPlankOutlineHintModels([].concat(bc(n),[s]))}}}var Mc=r(0);function xc(e){return(xc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
82
82
  /*!
83
83
  * @qunhe/custom-miniapp-outer-sdk v0.19.10-alpha.1
84
84
  * (c) 2022
85
85
  * @license MIT
86
- */var Mc,xc,Pc,Tc,Fc,Oc,Lc;
86
+ */var Pc,Tc,Fc,Oc,Lc,kc,Nc;
87
87
  /*!
88
88
  * @qunhe/custom-apass-api v0.40.0
89
89
  * (c) 2022 yuanlin <yuanlin@qunhemail.com>
@@ -103,7 +103,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
103
103
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
104
104
  PERFORMANCE OF THIS SOFTWARE.
105
105
  ***************************************************************************** */
106
- function kc(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function Nc(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(kc(arguments[t]));return e}!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL"}(Mc||(Mc={})),function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(xc||(xc={})),function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=6]="TEMPLATE_ASSEMBLY"}(Pc||(Pc={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE",e[e.BZ_STORE=2]="BZ_STORE"}(Tc||(Tc={})),function(e){e.NAME="name",e.REMARK="remark",e.POSITION="position",e.ROTATION="rotation",e.TOOL_TYPE="toolType"}(Fc||(Fc={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(Oc||(Oc={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(Lc||(Lc={}));var Gc,Uc,jc,Vc,Yc,Hc,Kc,qc,Jc,Wc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),zc=new Array(36);function Xc(e,t,r){return void 0===r&&(r="-"),[t,e].map((function(e){return e.replace(new RegExp("^"+r+"+|"+r+"+$","g"),"")})).filter((function(e){return!!e.trim()})).join(r)}!function(e){e[e.GROOVE=1]="GROOVE",e[e.HOLE=2]="HOLE",e[e.HARDWARE=3]="HARDWARE",e[e.HARDWARE_GROOVE=4]="HARDWARE_GROOVE",e.INTERSECTED="intersected"}(Gc||(Gc={})),function(e){e.SHELL="1",e.FACE="2"}(Uc||(Uc={})),function(e){e[e.BOTH_PLANK=0]="BOTH_PLANK",e[e.PLANK_FURNITURE=1]="PLANK_FURNITURE"}(jc||(jc={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.LOCK=1]="LOCK",e[e.UNLOCK=2]="UNLOCK",e[e.RAW=3]="RAW"}(Vc||(Vc={})),function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(Yc||(Yc={})),function(e){e.number="number",e.string="string",e.boolean="boolean"}(Hc||(Hc={})),function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE",e[e.ELLIPSE=4]="ELLIPSE"}(Kc||(Kc={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(qc||(qc={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(Jc||(Jc={}));var Zc=new Map([[Jc.Cabinet,0],[Jc.Wardrobe,1],[Jc.DoorWindow,2],[Jc.CabinetCopy,4],[Jc.WardrobeCopy,5],[Jc.DoorWindowCopy,6]]),$c=function(){function e(){this.namespace=""}return e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getValue=function(){return function(e,t){if(null!=e){if(t===Hc.boolean)return Boolean(parseFloat(e));if(t===Hc.number)return parseFloat(e)}return e}(this.value,this.type)},e.prototype.getNamespace=function(){return this.namespace},e.prototype.setValue=function(e){var t;if(!this.readonly&&this.ref){var r=null!==(t=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==t?t:1024,n=function(e,t){if(t===Hc.boolean)return e?"1":"0";return e.toString()}(e,this.type);if(function(e){for(var t=e.length,r=e.length-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:Tc.BZ_STORE,attr:Xc(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},e.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:Tc.BZ_STORE,attr:Xc(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},e.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},e}();var el,tl=function(){function e(){this.data={name:"",displayName:"",type:Yc.FIT,value:""}}return e.prototype.getValue=function(){return this.data.value},e.prototype.setValue=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:Tc.STORE,attr:this.data.name},this.getValue(),e),this.data.value=e)},e.prototype.toJSON=function(){return this.data},e.prototype.getMin=function(){return this.data.min},e.prototype.getEditable=function(){return!0===this.data.editable},e.prototype.getMax=function(){return this.data.max},e.prototype.getOptionValues=function(){return this.data.optionValues||[]},e.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},e.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},e.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},e.prototype.setPrimitiveOverride=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:Tc.STORE,attr:this.data.name},this.data.primitiveOverride,e),this.data.primitiveOverride=e)},e.prototype.getStep=function(){return this.data.step},e.prototype.getType=function(){return this.data.type},e.prototype.getParsedValue=function(){return this.getValue()},e.prototype.setParsedValue=function(e){return this.setValue(e)},e}();function rl(e){var t=new tl;return t.data=e,t}!function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(el||(el={}));var nl,il,ol,Al,al,sl,ul,cl=function(){function e(e){this.option=e,this._changeMap={}}return Object.defineProperty(e.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),e.prototype.getRoot=function(e){var t=this.isRoot?this:this.root;if(e)for(var r;r=null==t?void 0:t.getParent();)t=r.getRoot()||t;return t},e.prototype.clone=function(){if(this.type===Pc.PARAM_PRIMITIVE)throw new Error("Primitive model don't support to clone!");var t=this.toJSON(),r=e.deserialize(JSON.stringify(t));return r._changeMap.cloned=!0,r._changeMap.forceUpdate=void 0,r._changeMap.originId||(r._changeMap.originId=r.id),r.id=function(){for(var e=0,t=0;t<36;t++)if(8===t||13===t||18===t||23===t)zc[t]="-";else if(14===t)zc[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,zc[t]=Wc[19===t?3&r|8:r]}return zc.join("")}(),r},e.prototype.getName=function(){return this.name},e.prototype.setName=function(e){this.__trackUpdateField({type:Tc.ATTRIBUTE,attr:"name"},this.name,e),this.name=e},e.prototype.getRemark=function(){return this.remark},e.prototype.setRemark=function(e){this.__trackUpdateField({type:Tc.ATTRIBUTE,attr:Fc.REMARK},this.remark,e),this.remark=e},e.prototype.setRotate=function(e){this.setRotation(e)},e.prototype.getRotate=function(){return this.getRotation()},e.prototype.setRotation=function(e){if(!this.isRoot)throw new Error("Non-root model don't support to set rotation!");var t=this.getRoot(!0).type;if(t===Pc.PARAM_ASSEMBLY||t===Pc.TEMPLATE_ASSEMBLY)throw new Error("Root-model under Assembly don't support to set rotation!");this.__trackUpdateField({type:Tc.ATTRIBUTE,attr:Fc.ROTATION},this.rotation,e),this.rotation=e},e.prototype.getRotation=function(){return this.rotation},e.prototype.setPosition=function(e){if(!this.isRoot)throw new Error("Non-root model don't support to set position!");var t=this.getRoot(!0).type;if(t===Pc.PARAM_ASSEMBLY||t===Pc.TEMPLATE_ASSEMBLY)throw new Error("Root-model under Assembly don't support to set position!");this.__trackUpdateField({type:Tc.ATTRIBUTE,attr:Fc.POSITION},this.position,e),this.position=e},e.prototype.getPosition=function(){return this.position},e.prototype.getToolType=function(){return this.toolType},e.prototype.setToolType=function(e){var t,r=Zc.get(e);if(this._origin===el.BRANDGOOD&&void 0!==r&&(null===(t=this.option)||void 0===t?void 0:t.allowToolTypes)){if(!this.option.allowToolTypes.includes(r))throw new Error("the custom model not support "+e+" tool");return this.__trackUpdateField({type:Tc.ATTRIBUTE,attr:Fc.TOOL_TYPE},this.toolType,e),void(this.toolType=e)}throw new Error("the custom model not support set tool type!")},e.prototype.dispose=function(){if(this.getRoot()._origin!==el.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){if(ll(this,e,!1),!this.children.some((function(t){return t.id===e.id}))){e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:Oc.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){if(ll(this,e,!0),!this.accessories.some((function(t){return t.id===e.id}))){e.root=void 0,e._parent=this,this.accessories.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:Oc.ACCESSORY,linkId:e.id})}},e.prototype.getParam=function(e){var t=this.params.get(e);return t&&!t.ref&&(t.ref=this),t},e.prototype.hasParam=function(e){return this.params.has(e)},e.prototype.getBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=Xc(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:""),o=this.bzProperties.get(i);return o&&!o.ref&&(o.ref=this),o},e.prototype.hasBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=Xc(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(i)},e.prototype.removeBzProperty=function(e,t){return!!this.hasBzProperty(e,t)&&(this.getBzProperty(e,t).remove(),!0)},e.prototype.toJSON=function(e,t){void 0===t&&(t=!0);var r=t&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,size:r.size,option:r.option,params:Array.from(r.params).map((function(e){var t=kc(e,2);return[t[0],t[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(e){var t=kc(e,2);return[t[0],t[1].toJSON()]})),productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(e){return e.toJSON(void 0,!1)})),accessories:r.accessories.map((function(e){return e.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin};return t&&r!==this&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(t){var r=this,n=JSON.parse(t);return function e(t,r,n,i){void 0===r&&(r=new Map);void 0===i&&(i=function(e,t){return new cl(e.option)});var o=i(t,n);o.id=t.id,o.type=t.type,o.name=t.name,o.remark=t.remark,o.position=t.position,o.rotation=t.rotation||t.rotate,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],rl(e[1])]}))),o.bzProperties=new Map((t.bzProperties||[]).map((function(e){return[e[0],(t=e[1],r=new $c,Object.assign(r,t),r)];var t,r}))),o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o.toolType=t.toolType,o._origin=t._origin,o._changeMap=t._changeMap,!t.isRoot&&n&&(o.root=n);r.set(o.id,o);var A=o.isRoot?o:n;if(o.children=t.children.map((function(t){return e(t,r,A||o,i)})),o.accessories=t.accessories.map((function(t){return e(t,r,A||o,i)})),Nc(o.children,o.accessories).forEach((function(e){return e._parent=o})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(n,void 0,void 0,(function(t,i){return void 0!==n._currentId||i?n._currentId===t.id?r:new e(t.option):(r.option=n.option,r)}))},e.serialize=function(e){return e.serialize()},e.deserialize=function(t){var r=new e;return r.deserialize(t),r},e.prototype.__trackUpdateField=function(e,t,r){var n=this._changeMap.update;n||(n=[]),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&(n.push(e),this._changeMap.update=n)},e.prototype.getParent=function(){var e=this;if(this._parent)return this._parent;var t=function(t){return t.id===e.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var i=n.getChild(),o=n.getAccessory();if(i.some(t)||o.some(t))return this._parent=n,n;r.push.apply(r,Nc(i)),r.push.apply(r,Nc(o))}},e.prototype.forceUpdate=function(e){if(void 0===e&&(e=!0),!this.productId)throw new Error("Can't force-update model without productId");if(this._origin!==el.SENSE||!this.isRoot)throw new Error("only the root param models in design support force update!");this._changeMap.forceUpdate=e},e}();function ll(e,t,r){var n=r?"accessory":"child";if([Pc.PARAM_ASSEMBLY,Pc.TEMPLATE_ASSEMBLY,Pc.PARAM_FURNITURE,Pc.PARAM_PRIMITIVE].includes(e.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model don't support to append "+n+"!");if(t.type===Pc.TEMPLATE_ASSEMBLY||t.type===Pc.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(t._origin===el.SENSE||t._origin===el.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(r&&!t.isRoot)throw new Error("Only root model can be append as accessory!")}!function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(nl||(nl={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW",e[e.CABINET_COPY=4]="CABINET_COPY",e[e.WARDROBE_COPY=5]="WARDROBE_COPY",e[e.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(il||(il={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(ol||(ol={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(Al||(Al={})),function(e){e[e.PUBLIC=0]="PUBLIC",e[e.PROTECTED=1]="PROTECTED",e[e.PRIVATE=2]="PRIVATE",e[e.INNER=4]="INNER"}(al||(al={})),function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY"}(sl||(sl={})),function(e){e.PARAM_MODEL_ASSEMBLY="PARAM_MODEL_ASSEMBLY",e.FRAME="FRAME"}(ul||(ul={}));
106
+ function Gc(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function Uc(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Gc(arguments[t]));return e}!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL"}(Pc||(Pc={})),function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(Tc||(Tc={})),function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=6]="TEMPLATE_ASSEMBLY"}(Fc||(Fc={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE",e[e.BZ_STORE=2]="BZ_STORE"}(Oc||(Oc={})),function(e){e.NAME="name",e.REMARK="remark",e.POSITION="position",e.ROTATION="rotation",e.TOOL_TYPE="toolType"}(Lc||(Lc={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(kc||(kc={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(Nc||(Nc={}));var jc,Vc,Yc,Hc,Kc,qc,Jc,Wc,zc,Xc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Zc=new Array(36);function $c(e,t,r){return void 0===r&&(r="-"),[t,e].map((function(e){return e.replace(new RegExp("^"+r+"+|"+r+"+$","g"),"")})).filter((function(e){return!!e.trim()})).join(r)}!function(e){e[e.GROOVE=1]="GROOVE",e[e.HOLE=2]="HOLE",e[e.HARDWARE=3]="HARDWARE",e[e.HARDWARE_GROOVE=4]="HARDWARE_GROOVE",e.INTERSECTED="intersected"}(jc||(jc={})),function(e){e.SHELL="1",e.FACE="2"}(Vc||(Vc={})),function(e){e[e.BOTH_PLANK=0]="BOTH_PLANK",e[e.PLANK_FURNITURE=1]="PLANK_FURNITURE"}(Yc||(Yc={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.LOCK=1]="LOCK",e[e.UNLOCK=2]="UNLOCK",e[e.RAW=3]="RAW"}(Hc||(Hc={})),function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(Kc||(Kc={})),function(e){e.number="number",e.string="string",e.boolean="boolean"}(qc||(qc={})),function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE",e[e.ELLIPSE=4]="ELLIPSE"}(Jc||(Jc={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(Wc||(Wc={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(zc||(zc={}));var el=new Map([[zc.Cabinet,0],[zc.Wardrobe,1],[zc.DoorWindow,2],[zc.CabinetCopy,4],[zc.WardrobeCopy,5],[zc.DoorWindowCopy,6]]),tl=function(){function e(){this.namespace=""}return e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getValue=function(){return function(e,t){if(null!=e){if(t===qc.boolean)return Boolean(parseFloat(e));if(t===qc.number)return parseFloat(e)}return e}(this.value,this.type)},e.prototype.getNamespace=function(){return this.namespace},e.prototype.setValue=function(e){var t;if(!this.readonly&&this.ref){var r=null!==(t=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==t?t:1024,n=function(e,t){if(t===qc.boolean)return e?"1":"0";return e.toString()}(e,this.type);if(function(e){for(var t=e.length,r=e.length-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:Oc.BZ_STORE,attr:$c(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},e.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:Oc.BZ_STORE,attr:$c(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},e.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},e}();var rl,nl=function(){function e(){this.data={name:"",displayName:"",type:Kc.FIT,value:""}}return e.prototype.getValue=function(){return this.data.value},e.prototype.setValue=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:Oc.STORE,attr:this.data.name},this.getValue(),e),this.data.value=e)},e.prototype.toJSON=function(){return this.data},e.prototype.getMin=function(){return this.data.min},e.prototype.getEditable=function(){return!0===this.data.editable},e.prototype.getMax=function(){return this.data.max},e.prototype.getOptionValues=function(){return this.data.optionValues||[]},e.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},e.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},e.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},e.prototype.setPrimitiveOverride=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:Oc.STORE,attr:this.data.name},this.data.primitiveOverride,e),this.data.primitiveOverride=e)},e.prototype.getStep=function(){return this.data.step},e.prototype.getType=function(){return this.data.type},e.prototype.getParsedValue=function(){return this.getValue()},e.prototype.setParsedValue=function(e){return this.setValue(e)},e}();function il(e){var t=new nl;return t.data=e,t}!function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(rl||(rl={}));var ol,Al,al,sl,ul,cl,ll,gl=function(){function e(e){this.option=e,this._changeMap={}}return Object.defineProperty(e.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),e.prototype.getRoot=function(e){var t=this.isRoot?this:this.root;if(e)for(var r;r=null==t?void 0:t.getParent();)t=r.getRoot()||t;return t},e.prototype.clone=function(){if(this.type===Fc.PARAM_PRIMITIVE)throw new Error("Primitive model don't support to clone!");var t=this.toJSON(),r=e.deserialize(JSON.stringify(t));return r._changeMap.cloned=!0,r._changeMap.forceUpdate=void 0,r._changeMap.originId||(r._changeMap.originId=r.id),r.id=function(){for(var e=0,t=0;t<36;t++)if(8===t||13===t||18===t||23===t)Zc[t]="-";else if(14===t)Zc[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,Zc[t]=Xc[19===t?3&r|8:r]}return Zc.join("")}(),r},e.prototype.getName=function(){return this.name},e.prototype.setName=function(e){this.__trackUpdateField({type:Oc.ATTRIBUTE,attr:"name"},this.name,e),this.name=e},e.prototype.getRemark=function(){return this.remark},e.prototype.setRemark=function(e){this.__trackUpdateField({type:Oc.ATTRIBUTE,attr:Lc.REMARK},this.remark,e),this.remark=e},e.prototype.setRotate=function(e){this.setRotation(e)},e.prototype.getRotate=function(){return this.getRotation()},e.prototype.setRotation=function(e){if(!this.isRoot)throw new Error("Non-root model don't support to set rotation!");var t=this.getRoot(!0).type;if(t===Fc.PARAM_ASSEMBLY||t===Fc.TEMPLATE_ASSEMBLY)throw new Error("Root-model under Assembly don't support to set rotation!");this.__trackUpdateField({type:Oc.ATTRIBUTE,attr:Lc.ROTATION},this.rotation,e),this.rotation=e},e.prototype.getRotation=function(){return this.rotation},e.prototype.setPosition=function(e){if(!this.isRoot)throw new Error("Non-root model don't support to set position!");var t=this.getRoot(!0).type;if(t===Fc.PARAM_ASSEMBLY||t===Fc.TEMPLATE_ASSEMBLY)throw new Error("Root-model under Assembly don't support to set position!");this.__trackUpdateField({type:Oc.ATTRIBUTE,attr:Lc.POSITION},this.position,e),this.position=e},e.prototype.getPosition=function(){return this.position},e.prototype.getToolType=function(){return this.toolType},e.prototype.setToolType=function(e){var t,r=el.get(e);if(this._origin===rl.BRANDGOOD&&void 0!==r&&(null===(t=this.option)||void 0===t?void 0:t.allowToolTypes)){if(!this.option.allowToolTypes.includes(r))throw new Error("the custom model not support "+e+" tool");return this.__trackUpdateField({type:Oc.ATTRIBUTE,attr:Lc.TOOL_TYPE},this.toolType,e),void(this.toolType=e)}throw new Error("the custom model not support set tool type!")},e.prototype.dispose=function(){if(this.getRoot()._origin!==rl.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){if(fl(this,e,!1),!this.children.some((function(t){return t.id===e.id}))){e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:kc.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){if(fl(this,e,!0),!this.accessories.some((function(t){return t.id===e.id}))){e.root=void 0,e._parent=this,this.accessories.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:kc.ACCESSORY,linkId:e.id})}},e.prototype.getParam=function(e){var t=this.params.get(e);return t&&!t.ref&&(t.ref=this),t},e.prototype.hasParam=function(e){return this.params.has(e)},e.prototype.getBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=$c(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:""),o=this.bzProperties.get(i);return o&&!o.ref&&(o.ref=this),o},e.prototype.hasBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=$c(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(i)},e.prototype.removeBzProperty=function(e,t){return!!this.hasBzProperty(e,t)&&(this.getBzProperty(e,t).remove(),!0)},e.prototype.toJSON=function(e,t){void 0===t&&(t=!0);var r=t&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,size:r.size,option:r.option,params:Array.from(r.params).map((function(e){var t=Gc(e,2);return[t[0],t[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(e){var t=Gc(e,2);return[t[0],t[1].toJSON()]})),productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(e){return e.toJSON(void 0,!1)})),accessories:r.accessories.map((function(e){return e.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin};return t&&r!==this&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(t){var r=this,n=JSON.parse(t);return function e(t,r,n,i){void 0===r&&(r=new Map);void 0===i&&(i=function(e,t){return new gl(e.option)});var o=i(t,n);o.id=t.id,o.type=t.type,o.name=t.name,o.remark=t.remark,o.position=t.position,o.rotation=t.rotation||t.rotate,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],il(e[1])]}))),o.bzProperties=new Map((t.bzProperties||[]).map((function(e){return[e[0],(t=e[1],r=new tl,Object.assign(r,t),r)];var t,r}))),o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o.toolType=t.toolType,o._origin=t._origin,o._changeMap=t._changeMap,!t.isRoot&&n&&(o.root=n);r.set(o.id,o);var A=o.isRoot?o:n;if(o.children=t.children.map((function(t){return e(t,r,A||o,i)})),o.accessories=t.accessories.map((function(t){return e(t,r,A||o,i)})),Uc(o.children,o.accessories).forEach((function(e){return e._parent=o})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(n,void 0,void 0,(function(t,i){return void 0!==n._currentId||i?n._currentId===t.id?r:new e(t.option):(r.option=n.option,r)}))},e.serialize=function(e){return e.serialize()},e.deserialize=function(t){var r=new e;return r.deserialize(t),r},e.prototype.__trackUpdateField=function(e,t,r){var n=this._changeMap.update;n||(n=[]),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&(n.push(e),this._changeMap.update=n)},e.prototype.getParent=function(){var e=this;if(this._parent)return this._parent;var t=function(t){return t.id===e.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var i=n.getChild(),o=n.getAccessory();if(i.some(t)||o.some(t))return this._parent=n,n;r.push.apply(r,Uc(i)),r.push.apply(r,Uc(o))}},e.prototype.forceUpdate=function(e){if(void 0===e&&(e=!0),!this.productId)throw new Error("Can't force-update model without productId");if(this._origin!==rl.SENSE||!this.isRoot)throw new Error("only the root param models in design support force update!");this._changeMap.forceUpdate=e},e}();function fl(e,t,r){var n=r?"accessory":"child";if([Fc.PARAM_ASSEMBLY,Fc.TEMPLATE_ASSEMBLY,Fc.PARAM_FURNITURE,Fc.PARAM_PRIMITIVE].includes(e.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model don't support to append "+n+"!");if(t.type===Fc.TEMPLATE_ASSEMBLY||t.type===Fc.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(t._origin===rl.SENSE||t._origin===rl.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(r&&!t.isRoot)throw new Error("Only root model can be append as accessory!")}!function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(ol||(ol={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW",e[e.CABINET_COPY=4]="CABINET_COPY",e[e.WARDROBE_COPY=5]="WARDROBE_COPY",e[e.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(Al||(Al={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(al||(al={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(sl||(sl={})),function(e){e[e.PUBLIC=0]="PUBLIC",e[e.PROTECTED=1]="PROTECTED",e[e.PRIVATE=2]="PRIVATE",e[e.INNER=4]="INNER"}(ul||(ul={})),function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY"}(cl||(cl={})),function(e){e.PARAM_MODEL_ASSEMBLY="PARAM_MODEL_ASSEMBLY",e.FRAME="FRAME"}(ll||(ll={}));
107
107
  /*! *****************************************************************************
108
108
  Copyright (c) Microsoft Corporation.
109
109
 
@@ -118,7 +118,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
118
118
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
119
119
  PERFORMANCE OF THIS SOFTWARE.
120
120
  ***************************************************************************** */
121
- var gl=function(e,t){return(gl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function fl(e,t){function r(){this.constructor=e}gl(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var hl,pl,dl=function(){return(dl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Il(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Rc(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}!function(e){e[e.Local=0]="Local",e[e.OnLine=1]="OnLine"}(hl||(hl={})),function(e){e.TOP_BAR="TOP_BAR",e.SM="SM"}(pl||(pl={}));var yl,Cl,El,Bl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getAvailableMiniApp=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"getAvailableMiniApp"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.available.app",version:"1.0.0",ACL:al.PRIVATE})],t)}(Dc.ServService);!function(e){e.sense2d="s2d",e.sense3d="s3d"}(yl||(yl={})),function(e){e[e.innerSpace=0]="innerSpace",e[e.defineSelf=1]="defineSelf",e[e.specialCut=2]="specialCut",e[e.partitionTools=3]="partitionTools"}(Cl||(Cl={})),function(e){e.RIGHT_FUNCTION_PANEL="RIGHT_FUNCTION_PANEL",e.DIALOG_CENTER="DIALOG_CENTER",e.FULL_SCREEN="FULL_SCREEN",e.DRAGGABLE_PANEL="DRAGGABLE_PANEL"}(El||(El={})),function(e){e.LEFT_TOP="LEFT_TOP",e.LEFT_BOTTOM="LEFT_BOTTOM",e.RIGHT_TOP="RIGHT_TOP",e.RIGHT_BOTTOM="RIGHT_BOTTOM",e.DEFINE_SELF="DEFINE_SELF"}(Bl||(Bl={}));var vl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.loadMode=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.isOpened=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.close=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.bootstrap=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.bootstrapDev=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"loadMode"),Il([Dc.anno.decl.api()],t.prototype,"isOpened"),Il([Dc.anno.decl.api()],t.prototype,"close"),Il([Dc.anno.decl.event()],t.prototype,"loaded"),Il([Dc.anno.decl.api({ACL:al.PROTECTED})],t.prototype,"bootstrap"),Il([Dc.anno.decl.api({ACL:al.PRIVATE})],t.prototype,"bootstrapDev"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.bootstrap",version:"1.0.0"})],t)}(Dc.ServService);!function(e){e.Undo="undo",e.Redo="redo",e.Clear="clear"}(vl||(vl={}));var ml;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.handleTopBarIconClick=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"handleTopBarIconClick"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.topbar.handle",version:"1.0.0"})],t)})(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getDesignBaseInfo=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api({ACL:al.PROTECTED})],t.prototype,"getDesignBaseInfo"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.design.base.info",version:"1.0.0",ACL:al.PROTECTED})],t)}(Dc.ServService);!function(e){e[e.none=0]="none",e[e.onlyUndo=1]="onlyUndo",e[e.onlyRedo=2]="onlyRedo",e[e.both=3]="both"}(ml||(ml={}));var Ql;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getDocStackState=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.doUndo=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.doRedo=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.event()],t.prototype,"docStackState"),Il([Dc.anno.decl.api()],t.prototype,"getDocStackState"),Il([Dc.anno.decl.event()],t.prototype,"undo"),Il([Dc.anno.decl.api()],t.prototype,"doUndo"),Il([Dc.anno.decl.event()],t.prototype,"redo"),Il([Dc.anno.decl.api()],t.prototype,"doRedo"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.action.shortcut",version:"1.0.0"})],t)})(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.confirm=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"confirm"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.dialog",version:"1.0.0"})],t)}(Dc.ServService);!function(e){e.ok="ok",e.cancel="cancel",e.close="close"}(Ql||(Ql={}));var bl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.open=function(e,t){return Object(Dc.API_UNSUPPORT)()},t.prototype.close=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.event()],t.prototype,"whenSelected"),Il([Dc.anno.decl.api()],t.prototype,"open"),Il([Dc.anno.decl.api()],t.prototype,"close"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.product.select",version:"1.0.0"})],t)})(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.success=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.error=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.info=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.warn=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.loading=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"success"),Il([Dc.anno.decl.api()],t.prototype,"error"),Il([Dc.anno.decl.api()],t.prototype,"info"),Il([Dc.anno.decl.api()],t.prototype,"warn"),Il([Dc.anno.decl.api()],t.prototype,"loading"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.toast",version:"1.0.0"})],t)}(Dc.ServService);!function(e){e.LEFT_PANEL="leftPanel",e.BOTTOM_BAR="bottomBar",e.TOP_BAR="topbar",e.RIGHT_SIDE_VIEWER_PANEL="rightSideViewerPanel",e.RIGHT_SIDE_BOTTOM_CONTAINER="rightSideBottomContainer"}(bl||(bl={}));var _l;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.hideAllMenuItems=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.showAllMenuItems=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.hidePanel=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.showPanel=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.notify()],t.prototype,"hideAllMenuItems"),Il([Dc.anno.decl.notify()],t.prototype,"showAllMenuItems"),Il([Dc.anno.decl.notify()],t.prototype,"hidePanel"),Il([Dc.anno.decl.notify()],t.prototype,"showPanel"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.ui",version:"1.0.0"})],t)}(Dc.ServService);!function(e){e.SCENE_2D="SCENE_2D",e.SCENE_3D="SCENE_3D"}(_l||(_l={}));var Sl,wl,Dl,Rl,Ml,xl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.currentMainView=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.switchMainViewSceneTo=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.event()],t.prototype,"watchMainViewSense"),Il([Dc.anno.decl.api()],t.prototype,"currentMainView"),Il([Dc.anno.decl.notify()],t.prototype,"switchMainViewSceneTo"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.scene",version:"1.0.0"})],t)})(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getSelected=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.select=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.setSelectAbleByCategories=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.setSelectedByCategories=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.event()],t.prototype,"watcher"),Il([Dc.anno.decl.api()],t.prototype,"getSelected"),Il([Dc.anno.decl.api()],t.prototype,"unSelected"),Il([Dc.anno.decl.api()],t.prototype,"select"),Il([Dc.anno.decl.api()],t.prototype,"setSelectAbleByCategories"),Il([Dc.anno.decl.api()],t.prototype,"setSelectedByCategories"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.selected.model",version:"1.0.0"})],t)}(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getParamModelPhotoById=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"getParamModelPhotoById"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.param.model.data.info.service",version:"1.0.0"})],t)}(Dc.ServService);!function(e){e[e.TopToBottom=0]="TopToBottom",e[e.LeftToRight=1]="LeftToRight",e[e.FrontToBack=2]="FrontToBack"}(Sl||(Sl={})),function(e){e[e.LeftBack=0]="LeftBack",e[e.LeftFront=1]="LeftFront",e[e.RightBack=2]="RightBack",e[e.RightFront=3]="RightFront",e[e.TopSide=4]="TopSide",e[e.BottomSide=5]="BottomSide",e[e.LeftSide=6]="LeftSide",e[e.RightSide=7]="RightSide"}(wl||(wl={})),function(e){e[e.BackLeftTop=1]="BackLeftTop",e[e.BackLeftBottom=2]="BackLeftBottom",e[e.FrontLeftTop=3]="FrontLeftTop",e[e.FrontLeftBottom=4]="FrontLeftBottom",e[e.BackRightTop=5]="BackRightTop",e[e.BackRightBottom=6]="BackRightBottom",e[e.FrontRightTop=7]="FrontRightTop",e[e.FrontRightBottom=8]="FrontRightBottom",e[e.FrontTopSide=9]="FrontTopSide",e[e.FrontBottomSide=10]="FrontBottomSide",e[e.FrontLeftSide=11]="FrontLeftSide",e[e.FrontRightSide=12]="FrontRightSide",e[e.BackTopSide=13]="BackTopSide",e[e.BackBottomSide=14]="BackBottomSide",e[e.BackLeftSide=15]="BackLeftSide",e[e.BackRightSide=16]="BackRightSide",e[e.BackAll=17]="BackAll",e[e.FrontAll=18]="FrontAll",e[e.Inside=19]="Inside",e[e.OutSide=20]="OutSide",e[e.All=21]="All"}(Dl||(Dl={})),function(e){e[e.drawer=1]="drawer",e[e.pole=2]="pole"}(Rl||(Rl={})),function(e){e[e.INSIDE=0]="INSIDE",e[e.FULL_COVER=1]="FULL_COVER"}(Ml||(Ml={})),function(e){e[e.no=0]="no",e[e.yes=1]="yes"}(xl||(xl={}));var Pl,Tl,Fl,Ol;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.highlightCornerCut=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.getStructures=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.activeWardrobeMsg=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.updateStructuresMsg=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.cutWardrobeMsg=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.delOneStructureMsg=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.onMiniAppOpen=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.event()],t.prototype,"watcher"),Il([Dc.anno.decl.api()],t.prototype,"highlightCornerCut"),Il([Dc.anno.decl.api()],t.prototype,"getStructures"),Il([Dc.anno.decl.api()],t.prototype,"activeWardrobeMsg"),Il([Dc.anno.decl.api()],t.prototype,"updateStructuresMsg"),Il([Dc.anno.decl.api()],t.prototype,"cutWardrobeMsg"),Il([Dc.anno.decl.api()],t.prototype,"delOneStructureMsg"),Il([Dc.anno.decl.api()],t.prototype,"onMiniAppOpen"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.special.cutting.crud",version:"1.0.0",ACL:al.PRIVATE})],t)})(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),Il([Dc.anno.decl.event()],t.prototype,"onRequestReceived"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.debug",version:"1.0.0",ACL:al.PRIVATE})],t)}(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getSelectedWalls=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.event()],t.prototype,"watcher"),Il([Dc.anno.decl.api()],t.prototype,"getSelectedWalls"),Il([Dc.anno.decl.api()],t.prototype,"unSelected"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.select.wall",version:"1.0.0"})],t)}(Dc.ServService);!function(e){e[e.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",e[e.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT"}(Pl||(Pl={})),function(e){e[e.front=1]="front",e[e.back=2]="back"}(Tl||(Tl={})),function(e){e.FRONT_LEFT="1",e.FRONT_TOP="2",e.FRONT_RIGHT="3",e.FRONT_BOTTOM="4",e.BACK_LEFT="5",e.BACK_TOP="6",e.BACK_RIGHT="7",e.BACK_BOTTOM="8"}(Fl||(Fl={})),function(e){e[e.PARTITION_STYLE=1]="PARTITION_STYLE",e[e.COLOR_PLATE_STYLE=2]="COLOR_PLATE_STYLE",e[e.COLOR_PLATE_MATERIAL=3]="COLOR_PLATE_MATERIAL",e[e.COLOR_PLATE_THICKNESS=4]="COLOR_PLATE_THICKNESS",e[e.COLOR_PLATE_WIDTH=5]="COLOR_PLATE_WIDTH",e[e.LINE_STYLE=6]="LINE_STYLE",e[e.LINE_MATERIAL=7]="LINE_MATERIAL",e[e.WALL_DIRECTION=8]="WALL_DIRECTION",e[e.LINE_POSITION=9]="LINE_POSITION"}(Ol||(Ol={}));var Ll;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getSelectedPartitionWalls=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.generatePartitionWalls=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.editPartitionWalls=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.setIWallPavingDirection=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.setILineSimplePosition=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.event()],t.prototype,"watcher"),Il([Dc.anno.decl.api()],t.prototype,"getSelectedPartitionWalls"),Il([Dc.anno.decl.api()],t.prototype,"generatePartitionWalls"),Il([Dc.anno.decl.api()],t.prototype,"editPartitionWalls"),Il([Dc.anno.decl.api()],t.prototype,"setIWallPavingDirection"),Il([Dc.anno.decl.api()],t.prototype,"setILineSimplePosition"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.partition.model",version:"1.0.0"})],t)})(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getSelectedPartitionProduct=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.getSelectedLConnectorProduct=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"getSelectedPartitionProduct"),Il([Dc.anno.decl.api()],t.prototype,"getSelectedLConnectorProduct"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.partition.product",version:"1.0.0"})],t)}(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.undo=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.redo=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.clear=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"undo"),Il([Dc.anno.decl.api()],t.prototype,"redo"),Il([Dc.anno.decl.api()],t.prototype,"clear"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.partition.document",version:"1.0.0"})],t)}(Dc.ServService);!function(e){e.style="style",e.material="material"}(Ll||(Ll={}));var kl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getSelectedLConnectors=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.editSelectedLConnectors=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.event()],t.prototype,"watcher"),Il([Dc.anno.decl.api()],t.prototype,"getSelectedLConnectors"),Il([Dc.anno.decl.api()],t.prototype,"editSelectedLConnectors"),Il([Dc.anno.decl.api()],t.prototype,"unSelected"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.select.lconnector",version:"1.0.0"})],t)})(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getSelectedColumns=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.event()],t.prototype,"watcher"),Il([Dc.anno.decl.api()],t.prototype,"getSelectedColumns"),Il([Dc.anno.decl.api()],t.prototype,"unSelected"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.select.column",version:"1.0.0",ACL:al.PRIVATE})],t)}(Dc.ServService);!function(e){e[e.right=0]="right",e[e.left=1]="left"}(kl||(kl={}));var Nl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.generateColumnsParamsChanged=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.generateColumns=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"generateColumnsParamsChanged"),Il([Dc.anno.decl.api()],t.prototype,"generateColumns"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.column.generate",version:"1.0.0",ACL:al.PRIVATE})],t)}(Dc.ServService);!function(e){e[e.ALL=0]="ALL",e[e.WALL=1]="WALL",e[e.CELING=2]="CELING",e[e.GROUND=3]="GROUND"}(Nl||(Nl={}));var Gl,Ul,jl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getSelectedRooms=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.clearSelectedRooms=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.openSelectRoom=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.setOpenLinePanel=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.generateLineFormData=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.event()],t.prototype,"watcher"),Il([Dc.anno.decl.event()],t.prototype,"watcherOpen"),Il([Dc.anno.decl.api()],t.prototype,"getSelectedRooms"),Il([Dc.anno.decl.api()],t.prototype,"clearSelectedRooms"),Il([Dc.anno.decl.api()],t.prototype,"openSelectRoom"),Il([Dc.anno.decl.api()],t.prototype,"setOpenLinePanel"),Il([Dc.anno.decl.api()],t.prototype,"generateLineFormData"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.angular.line",version:"1.0.0",ACL:al.PRIVATE})],t)})(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getDefaultParam=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.getPartitionVersion=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"getDefaultParam"),Il([Dc.anno.decl.api()],t.prototype,"getPartitionVersion"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.default.params",version:"1.0.0",ACL:al.PRIVATE})],t)}(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.design.storage.service",version:"1.0.0"})],t)}(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fl(t,e),t.prototype.getKeys=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.getItem=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.getItems=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.setItem=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.removeItem=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.removeItems=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"getKeys"),Il([Dc.anno.decl.api()],t.prototype,"getItem"),Il([Dc.anno.decl.api()],t.prototype,"getItems"),Il([Dc.anno.decl.api()],t.prototype,"setItem"),Il([Dc.anno.decl.api()],t.prototype,"removeItem"),Il([Dc.anno.decl.api()],t.prototype,"removeItems"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.storage.service",version:"1.0.0"})],t)}(Dc.ServService)),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getCachedModelJsonDataByModelId=function(e,t){return Object(Dc.API_UNSUPPORT)()},t.prototype.getModelJsonDataByModelId=function(e,t){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"getCachedModelJsonDataByModelId"),Il([Dc.anno.decl.api()],t.prototype,"getModelJsonDataByModelId"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.model.output",version:"1.0.0",ACL:al.PRIVATE})],t)}(Dc.ServService);!function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE"}(Gl||(Gl={})),function(e){e.TRUE="true",e.FALSE="false"}(Ul||(Ul={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(jl||(jl={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getDesignRoomList=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.getDesignSelectedRoom=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"getDesignRoomList"),Il([Dc.anno.decl.api()],t.prototype,"getDesignSelectedRoom"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.design.floor.room",version:"1.0.0"})],t)}(Dc.ServService);var Vl,Yl,Hl=function(e){return e&&"object"===Rc(e)?e.toJSON():e},Kl=function(e){return e&&"object"===Rc(e)?cl.deserialize(JSON.stringify(e)):e},ql={onRetnTransform:{recv:Kl,send:Hl}},Jl={onCallTransform:{recv:function(e){return dl(dl({},e),{models:e.models.map(Kl)})},send:function(e){return dl(dl({},e),{models:e.models.map(Hl)})}}},Wl=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.newParamModelByCategory=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.newParamModelByBrandGoodId=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.getParamModelByModelId=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.listTopModels=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.save=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.remove=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api(ql)],t.prototype,"newParamModelByCategory"),Il([Dc.anno.decl.api(ql)],t.prototype,"newParamModelByBrandGoodId"),Il([Dc.anno.decl.api(ql)],t.prototype,"getParamModelByModelId"),Il([Dc.anno.decl.api({onRetnTransform:{recv:function(e){return Array.isArray(e)?{data:e.map(Kl)}:dl(dl({},e),{data:e.data.map(Kl)})},send:function(e){return Array.isArray(e)?e.map(Kl):dl(dl({},e),{data:e.data.map(Kl)})}}})],t.prototype,"listTopModels"),Il([Dc.anno.decl.api(Jl)],t.prototype,"save"),Il([Dc.anno.decl.api(Jl)],t.prototype,"remove"),t=Il([Dc.anno.decl({id:"com.custom.design.param-model.service",version:"1.0.0"})],t)}(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getDesignJson=function(e){throw Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"getDesignJson"),t=Il([Dc.anno.decl({id:"com.custom.design.export.service",version:"1.0.0"})],t)}(Dc.ServService),function(e){return e&&"object"===Rc(e)?dl(dl({},e),{parent:e.parent.toJSON()}):e}),zl=function(e){return e&&"object"===Rc(e)?dl(dl({},e),{parent:cl.deserialize(JSON.stringify(e.parent))}):e};(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getSelected=function(){throw Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.event({transform:{recv:zl,send:Wl}})],t.prototype,"selection"),Il([Dc.anno.decl.api({onRetnTransform:{send:Wl,recv:zl}})],t.prototype,"getSelected"),t=Il([Dc.anno.decl({id:"com.custom.inner-space.service",version:"1.0.0"})],t)})(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.current=function(){throw Object(Dc.API_UNSUPPORT)()},t.prototype.enter=function(e){throw Object(Dc.API_UNSUPPORT)()},t.prototype.exit=function(){throw Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"current"),Il([Dc.anno.decl.api()],t.prototype,"enter"),Il([Dc.anno.decl.api()],t.prototype,"exit"),t=Il([Dc.anno.decl({id:"com.custom.mode.service",version:"1.0.0"})],t)}(Dc.ServService);!function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(Vl||(Vl={})),function(e){e[e.ORIGIN=0]="ORIGIN",e[e.CENTER=1]="CENTER",e[e.LEFT_BACK_BOTTOM=2]="LEFT_BACK_BOTTOM",e[e.LEFT_BACK_TOP=3]="LEFT_BACK_TOP",e[e.LEFT_FRONT_BOTTOM=4]="LEFT_FRONT_BOTTOM",e[e.LEFT_FRONT_TOP=5]="LEFT_FRONT_TOP",e[e.RIGHT_BACK_BOTTOM=6]="RIGHT_BACK_BOTTOM",e[e.RIGHT_BACK_TOP=7]="RIGHT_BACK_TOP",e[e.RIGHT_FRONT_BOTTOM=8]="RIGHT_FRONT_BOTTOM",e[e.RIGHT_FRONT_TOP=9]="RIGHT_FRONT_TOP",e[e.BACK_CENTER=10]="BACK_CENTER",e[e.FRONT_CENTER=11]="FRONT_CENTER"}(Yl||(Yl={}));String.fromCharCode(1),/Mac|iPod|iPhone|iPad/.test(navigator.platform),new Map;var Xl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.createHandsFree=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"createHandsFree"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.hands.free.create",version:"1.0.0",ACL:al.PRIVATE})],t)}(Dc.ServService);!function(e){e.top="top",e.left="left",e.right="right",e.bottom="bottom",e.leftTop="leftTop",e.leftBottom="leftBottom",e.rightTop="rightTop",e.rightBottom="rightBottom"}(Xl||(Xl={}));var Zl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.createWineCell=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"createWineCell"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.inner.space.crud",version:"1.0.0",ACL:al.PRIVATE})],t)}(Dc.ServService);!function(e){e[e.include=0]="include",e[e.exclude=1]="exclude"}(Zl||(Zl={}));(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.showModelByCateId=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"showModelByCateId"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.model.toggle.visible",version:"1.0.0"})],t)})(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.remove=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.getParamModelCountByCategory=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.updateAttacheds=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.updateAttachedsNew=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.addAccessoryByBrandGoodId=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.getParamModelRootList=function(e){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.api()],t.prototype,"remove"),Il([Dc.anno.decl.api()],t.prototype,"getParamModelCountByCategory"),Il([Dc.anno.decl.api()],t.prototype,"updateAttacheds"),Il([Dc.anno.decl.api()],t.prototype,"updateAttachedsNew"),Il([Dc.anno.decl.api()],t.prototype,"addAccessoryByBrandGoodId"),Il([Dc.anno.decl.api()],t.prototype,"getParamModelRootList"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.model.crud.service",version:"1.0.0"})],t)}(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}fl(t,e),t.prototype.getSelectedInnerSpace=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Dc.API_UNSUPPORT)()},Il([Dc.anno.decl.event()],t.prototype,"watcher"),Il([Dc.anno.decl.api()],t.prototype,"getSelectedInnerSpace"),Il([Dc.anno.decl.api()],t.prototype,"unSelected"),t=Il([Dc.anno.decl({id:"com.custom.miniapp.service.inner.space",version:"1.0.0"})],t)}(Dc.ServService);var $l=r(208),eg=r.n($l),tg=r(428),rg=r.n(tg),ng=r(532),ig=r(426),og=r(427),Ag=r.n(og);function ag(e){return(ag="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
121
+ var hl=function(e,t){return(hl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function pl(e,t){function r(){this.constructor=e}hl(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var dl,Il,yl=function(){return(yl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Cl(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":xc(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}!function(e){e[e.Local=0]="Local",e[e.OnLine=1]="OnLine"}(dl||(dl={})),function(e){e.TOP_BAR="TOP_BAR",e.SM="SM"}(Il||(Il={}));var El,Bl,vl,ml;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getAvailableMiniApp=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"getAvailableMiniApp"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.available.app",version:"1.0.0",ACL:ul.PRIVATE})],t)}(Mc.ServService);!function(e){e.sense2d="s2d",e.sense3d="s3d"}(El||(El={})),function(e){e[e.innerSpace=0]="innerSpace",e[e.defineSelf=1]="defineSelf",e[e.specialCut=2]="specialCut",e[e.partitionTools=3]="partitionTools"}(Bl||(Bl={})),function(e){e.RIGHT_FUNCTION_PANEL="RIGHT_FUNCTION_PANEL",e.DIALOG_CENTER="DIALOG_CENTER",e.FULL_SCREEN="FULL_SCREEN",e.DRAGGABLE_PANEL="DRAGGABLE_PANEL"}(vl||(vl={})),function(e){e.LEFT_TOP="LEFT_TOP",e.LEFT_BOTTOM="LEFT_BOTTOM",e.RIGHT_TOP="RIGHT_TOP",e.RIGHT_BOTTOM="RIGHT_BOTTOM",e.DEFINE_SELF="DEFINE_SELF"}(ml||(ml={}));var Ql;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.loadMode=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.isOpened=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.close=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.bootstrap=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.bootstrapDev=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"loadMode"),Cl([Mc.anno.decl.api()],t.prototype,"isOpened"),Cl([Mc.anno.decl.api()],t.prototype,"close"),Cl([Mc.anno.decl.event()],t.prototype,"loaded"),Cl([Mc.anno.decl.api({ACL:ul.PROTECTED})],t.prototype,"bootstrap"),Cl([Mc.anno.decl.api({ACL:ul.PRIVATE})],t.prototype,"bootstrapDev"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.bootstrap",version:"1.0.0"})],t)}(Mc.ServService);!function(e){e.Undo="undo",e.Redo="redo",e.Clear="clear"}(Ql||(Ql={}));var bl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.handleTopBarIconClick=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"handleTopBarIconClick"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.topbar.handle",version:"1.0.0"})],t)})(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getDesignBaseInfo=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api({ACL:ul.PROTECTED})],t.prototype,"getDesignBaseInfo"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.design.base.info",version:"1.0.0",ACL:ul.PROTECTED})],t)}(Mc.ServService);!function(e){e[e.none=0]="none",e[e.onlyUndo=1]="onlyUndo",e[e.onlyRedo=2]="onlyRedo",e[e.both=3]="both"}(bl||(bl={}));var _l;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getDocStackState=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.doUndo=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.doRedo=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.event()],t.prototype,"docStackState"),Cl([Mc.anno.decl.api()],t.prototype,"getDocStackState"),Cl([Mc.anno.decl.event()],t.prototype,"undo"),Cl([Mc.anno.decl.api()],t.prototype,"doUndo"),Cl([Mc.anno.decl.event()],t.prototype,"redo"),Cl([Mc.anno.decl.api()],t.prototype,"doRedo"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.action.shortcut",version:"1.0.0"})],t)})(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.confirm=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"confirm"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.dialog",version:"1.0.0"})],t)}(Mc.ServService);!function(e){e.ok="ok",e.cancel="cancel",e.close="close"}(_l||(_l={}));var Sl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.open=function(e,t){return Object(Mc.API_UNSUPPORT)()},t.prototype.close=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.event()],t.prototype,"whenSelected"),Cl([Mc.anno.decl.api()],t.prototype,"open"),Cl([Mc.anno.decl.api()],t.prototype,"close"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.product.select",version:"1.0.0"})],t)})(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.success=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.error=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.info=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.warn=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.loading=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"success"),Cl([Mc.anno.decl.api()],t.prototype,"error"),Cl([Mc.anno.decl.api()],t.prototype,"info"),Cl([Mc.anno.decl.api()],t.prototype,"warn"),Cl([Mc.anno.decl.api()],t.prototype,"loading"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.toast",version:"1.0.0"})],t)}(Mc.ServService);!function(e){e.LEFT_PANEL="leftPanel",e.BOTTOM_BAR="bottomBar",e.TOP_BAR="topbar",e.RIGHT_SIDE_VIEWER_PANEL="rightSideViewerPanel",e.RIGHT_SIDE_BOTTOM_CONTAINER="rightSideBottomContainer"}(Sl||(Sl={}));var wl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.hideAllMenuItems=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.showAllMenuItems=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.hidePanel=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.showPanel=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.notify()],t.prototype,"hideAllMenuItems"),Cl([Mc.anno.decl.notify()],t.prototype,"showAllMenuItems"),Cl([Mc.anno.decl.notify()],t.prototype,"hidePanel"),Cl([Mc.anno.decl.notify()],t.prototype,"showPanel"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.ui",version:"1.0.0"})],t)}(Mc.ServService);!function(e){e.SCENE_2D="SCENE_2D",e.SCENE_3D="SCENE_3D"}(wl||(wl={}));var Dl,Rl,Ml,xl,Pl,Tl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.currentMainView=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.switchMainViewSceneTo=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.event()],t.prototype,"watchMainViewSense"),Cl([Mc.anno.decl.api()],t.prototype,"currentMainView"),Cl([Mc.anno.decl.notify()],t.prototype,"switchMainViewSceneTo"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.scene",version:"1.0.0"})],t)})(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getSelected=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.select=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.setSelectAbleByCategories=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.setSelectedByCategories=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.event()],t.prototype,"watcher"),Cl([Mc.anno.decl.api()],t.prototype,"getSelected"),Cl([Mc.anno.decl.api()],t.prototype,"unSelected"),Cl([Mc.anno.decl.api()],t.prototype,"select"),Cl([Mc.anno.decl.api()],t.prototype,"setSelectAbleByCategories"),Cl([Mc.anno.decl.api()],t.prototype,"setSelectedByCategories"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.selected.model",version:"1.0.0"})],t)}(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getParamModelPhotoById=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"getParamModelPhotoById"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.param.model.data.info.service",version:"1.0.0"})],t)}(Mc.ServService);!function(e){e[e.TopToBottom=0]="TopToBottom",e[e.LeftToRight=1]="LeftToRight",e[e.FrontToBack=2]="FrontToBack"}(Dl||(Dl={})),function(e){e[e.LeftBack=0]="LeftBack",e[e.LeftFront=1]="LeftFront",e[e.RightBack=2]="RightBack",e[e.RightFront=3]="RightFront",e[e.TopSide=4]="TopSide",e[e.BottomSide=5]="BottomSide",e[e.LeftSide=6]="LeftSide",e[e.RightSide=7]="RightSide"}(Rl||(Rl={})),function(e){e[e.BackLeftTop=1]="BackLeftTop",e[e.BackLeftBottom=2]="BackLeftBottom",e[e.FrontLeftTop=3]="FrontLeftTop",e[e.FrontLeftBottom=4]="FrontLeftBottom",e[e.BackRightTop=5]="BackRightTop",e[e.BackRightBottom=6]="BackRightBottom",e[e.FrontRightTop=7]="FrontRightTop",e[e.FrontRightBottom=8]="FrontRightBottom",e[e.FrontTopSide=9]="FrontTopSide",e[e.FrontBottomSide=10]="FrontBottomSide",e[e.FrontLeftSide=11]="FrontLeftSide",e[e.FrontRightSide=12]="FrontRightSide",e[e.BackTopSide=13]="BackTopSide",e[e.BackBottomSide=14]="BackBottomSide",e[e.BackLeftSide=15]="BackLeftSide",e[e.BackRightSide=16]="BackRightSide",e[e.BackAll=17]="BackAll",e[e.FrontAll=18]="FrontAll",e[e.Inside=19]="Inside",e[e.OutSide=20]="OutSide",e[e.All=21]="All"}(Ml||(Ml={})),function(e){e[e.drawer=1]="drawer",e[e.pole=2]="pole"}(xl||(xl={})),function(e){e[e.INSIDE=0]="INSIDE",e[e.FULL_COVER=1]="FULL_COVER"}(Pl||(Pl={})),function(e){e[e.no=0]="no",e[e.yes=1]="yes"}(Tl||(Tl={}));var Fl,Ol,Ll,kl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.highlightCornerCut=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.getStructures=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.activeWardrobeMsg=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.updateStructuresMsg=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.cutWardrobeMsg=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.delOneStructureMsg=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.onMiniAppOpen=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.event()],t.prototype,"watcher"),Cl([Mc.anno.decl.api()],t.prototype,"highlightCornerCut"),Cl([Mc.anno.decl.api()],t.prototype,"getStructures"),Cl([Mc.anno.decl.api()],t.prototype,"activeWardrobeMsg"),Cl([Mc.anno.decl.api()],t.prototype,"updateStructuresMsg"),Cl([Mc.anno.decl.api()],t.prototype,"cutWardrobeMsg"),Cl([Mc.anno.decl.api()],t.prototype,"delOneStructureMsg"),Cl([Mc.anno.decl.api()],t.prototype,"onMiniAppOpen"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.special.cutting.crud",version:"1.0.0",ACL:ul.PRIVATE})],t)})(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),Cl([Mc.anno.decl.event()],t.prototype,"onRequestReceived"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.debug",version:"1.0.0",ACL:ul.PRIVATE})],t)}(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getSelectedWalls=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.event()],t.prototype,"watcher"),Cl([Mc.anno.decl.api()],t.prototype,"getSelectedWalls"),Cl([Mc.anno.decl.api()],t.prototype,"unSelected"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.select.wall",version:"1.0.0"})],t)}(Mc.ServService);!function(e){e[e.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",e[e.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT"}(Fl||(Fl={})),function(e){e[e.front=1]="front",e[e.back=2]="back"}(Ol||(Ol={})),function(e){e.FRONT_LEFT="1",e.FRONT_TOP="2",e.FRONT_RIGHT="3",e.FRONT_BOTTOM="4",e.BACK_LEFT="5",e.BACK_TOP="6",e.BACK_RIGHT="7",e.BACK_BOTTOM="8"}(Ll||(Ll={})),function(e){e[e.PARTITION_STYLE=1]="PARTITION_STYLE",e[e.COLOR_PLATE_STYLE=2]="COLOR_PLATE_STYLE",e[e.COLOR_PLATE_MATERIAL=3]="COLOR_PLATE_MATERIAL",e[e.COLOR_PLATE_THICKNESS=4]="COLOR_PLATE_THICKNESS",e[e.COLOR_PLATE_WIDTH=5]="COLOR_PLATE_WIDTH",e[e.LINE_STYLE=6]="LINE_STYLE",e[e.LINE_MATERIAL=7]="LINE_MATERIAL",e[e.WALL_DIRECTION=8]="WALL_DIRECTION",e[e.LINE_POSITION=9]="LINE_POSITION"}(kl||(kl={}));var Nl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getSelectedPartitionWalls=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.generatePartitionWalls=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.editPartitionWalls=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.setIWallPavingDirection=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.setILineSimplePosition=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.event()],t.prototype,"watcher"),Cl([Mc.anno.decl.api()],t.prototype,"getSelectedPartitionWalls"),Cl([Mc.anno.decl.api()],t.prototype,"generatePartitionWalls"),Cl([Mc.anno.decl.api()],t.prototype,"editPartitionWalls"),Cl([Mc.anno.decl.api()],t.prototype,"setIWallPavingDirection"),Cl([Mc.anno.decl.api()],t.prototype,"setILineSimplePosition"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.partition.model",version:"1.0.0"})],t)})(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getSelectedPartitionProduct=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.getSelectedLConnectorProduct=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"getSelectedPartitionProduct"),Cl([Mc.anno.decl.api()],t.prototype,"getSelectedLConnectorProduct"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.partition.product",version:"1.0.0"})],t)}(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.undo=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.redo=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.clear=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"undo"),Cl([Mc.anno.decl.api()],t.prototype,"redo"),Cl([Mc.anno.decl.api()],t.prototype,"clear"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.partition.document",version:"1.0.0"})],t)}(Mc.ServService);!function(e){e.style="style",e.material="material"}(Nl||(Nl={}));var Gl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getSelectedLConnectors=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.editSelectedLConnectors=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.event()],t.prototype,"watcher"),Cl([Mc.anno.decl.api()],t.prototype,"getSelectedLConnectors"),Cl([Mc.anno.decl.api()],t.prototype,"editSelectedLConnectors"),Cl([Mc.anno.decl.api()],t.prototype,"unSelected"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.select.lconnector",version:"1.0.0"})],t)})(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getSelectedColumns=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.event()],t.prototype,"watcher"),Cl([Mc.anno.decl.api()],t.prototype,"getSelectedColumns"),Cl([Mc.anno.decl.api()],t.prototype,"unSelected"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.select.column",version:"1.0.0",ACL:ul.PRIVATE})],t)}(Mc.ServService);!function(e){e[e.right=0]="right",e[e.left=1]="left"}(Gl||(Gl={}));var Ul;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.generateColumnsParamsChanged=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.generateColumns=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"generateColumnsParamsChanged"),Cl([Mc.anno.decl.api()],t.prototype,"generateColumns"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.column.generate",version:"1.0.0",ACL:ul.PRIVATE})],t)}(Mc.ServService);!function(e){e[e.ALL=0]="ALL",e[e.WALL=1]="WALL",e[e.CELING=2]="CELING",e[e.GROUND=3]="GROUND"}(Ul||(Ul={}));var jl,Vl,Yl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getSelectedRooms=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.clearSelectedRooms=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.openSelectRoom=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.setOpenLinePanel=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.generateLineFormData=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.event()],t.prototype,"watcher"),Cl([Mc.anno.decl.event()],t.prototype,"watcherOpen"),Cl([Mc.anno.decl.api()],t.prototype,"getSelectedRooms"),Cl([Mc.anno.decl.api()],t.prototype,"clearSelectedRooms"),Cl([Mc.anno.decl.api()],t.prototype,"openSelectRoom"),Cl([Mc.anno.decl.api()],t.prototype,"setOpenLinePanel"),Cl([Mc.anno.decl.api()],t.prototype,"generateLineFormData"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.angular.line",version:"1.0.0",ACL:ul.PRIVATE})],t)})(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getDefaultParam=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.getPartitionVersion=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"getDefaultParam"),Cl([Mc.anno.decl.api()],t.prototype,"getPartitionVersion"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.default.params",version:"1.0.0",ACL:ul.PRIVATE})],t)}(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.design.storage.service",version:"1.0.0"})],t)}(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pl(t,e),t.prototype.getKeys=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.getItem=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.getItems=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.setItem=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.removeItem=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.removeItems=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"getKeys"),Cl([Mc.anno.decl.api()],t.prototype,"getItem"),Cl([Mc.anno.decl.api()],t.prototype,"getItems"),Cl([Mc.anno.decl.api()],t.prototype,"setItem"),Cl([Mc.anno.decl.api()],t.prototype,"removeItem"),Cl([Mc.anno.decl.api()],t.prototype,"removeItems"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.storage.service",version:"1.0.0"})],t)}(Mc.ServService)),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getCachedModelJsonDataByModelId=function(e,t){return Object(Mc.API_UNSUPPORT)()},t.prototype.getModelJsonDataByModelId=function(e,t){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"getCachedModelJsonDataByModelId"),Cl([Mc.anno.decl.api()],t.prototype,"getModelJsonDataByModelId"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.model.output",version:"1.0.0",ACL:ul.PRIVATE})],t)}(Mc.ServService);!function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE"}(jl||(jl={})),function(e){e.TRUE="true",e.FALSE="false"}(Vl||(Vl={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(Yl||(Yl={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getDesignRoomList=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.getDesignSelectedRoom=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"getDesignRoomList"),Cl([Mc.anno.decl.api()],t.prototype,"getDesignSelectedRoom"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.design.floor.room",version:"1.0.0"})],t)}(Mc.ServService);var Hl,Kl,ql=function(e){return e&&"object"===xc(e)?e.toJSON():e},Jl=function(e){return e&&"object"===xc(e)?gl.deserialize(JSON.stringify(e)):e},Wl={onRetnTransform:{recv:Jl,send:ql}},zl={onCallTransform:{recv:function(e){return yl(yl({},e),{models:e.models.map(Jl)})},send:function(e){return yl(yl({},e),{models:e.models.map(ql)})}}},Xl=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.newParamModelByCategory=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.newParamModelByBrandGoodId=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.getParamModelByModelId=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.listTopModels=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.save=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.remove=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api(Wl)],t.prototype,"newParamModelByCategory"),Cl([Mc.anno.decl.api(Wl)],t.prototype,"newParamModelByBrandGoodId"),Cl([Mc.anno.decl.api(Wl)],t.prototype,"getParamModelByModelId"),Cl([Mc.anno.decl.api({onRetnTransform:{recv:function(e){return Array.isArray(e)?{data:e.map(Jl)}:yl(yl({},e),{data:e.data.map(Jl)})},send:function(e){return Array.isArray(e)?e.map(Jl):yl(yl({},e),{data:e.data.map(Jl)})}}})],t.prototype,"listTopModels"),Cl([Mc.anno.decl.api(zl)],t.prototype,"save"),Cl([Mc.anno.decl.api(zl)],t.prototype,"remove"),t=Cl([Mc.anno.decl({id:"com.custom.design.param-model.service",version:"1.0.0"})],t)}(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getDesignJson=function(e){throw Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"getDesignJson"),t=Cl([Mc.anno.decl({id:"com.custom.design.export.service",version:"1.0.0"})],t)}(Mc.ServService),function(e){return e&&"object"===xc(e)?yl(yl({},e),{parent:e.parent.toJSON()}):e}),Zl=function(e){return e&&"object"===xc(e)?yl(yl({},e),{parent:gl.deserialize(JSON.stringify(e.parent))}):e};(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getSelected=function(){throw Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.event({transform:{recv:Zl,send:Xl}})],t.prototype,"selection"),Cl([Mc.anno.decl.api({onRetnTransform:{send:Xl,recv:Zl}})],t.prototype,"getSelected"),t=Cl([Mc.anno.decl({id:"com.custom.inner-space.service",version:"1.0.0"})],t)})(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.current=function(){throw Object(Mc.API_UNSUPPORT)()},t.prototype.enter=function(e){throw Object(Mc.API_UNSUPPORT)()},t.prototype.exit=function(){throw Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"current"),Cl([Mc.anno.decl.api()],t.prototype,"enter"),Cl([Mc.anno.decl.api()],t.prototype,"exit"),t=Cl([Mc.anno.decl({id:"com.custom.mode.service",version:"1.0.0"})],t)}(Mc.ServService);!function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(Hl||(Hl={})),function(e){e[e.ORIGIN=0]="ORIGIN",e[e.CENTER=1]="CENTER",e[e.LEFT_BACK_BOTTOM=2]="LEFT_BACK_BOTTOM",e[e.LEFT_BACK_TOP=3]="LEFT_BACK_TOP",e[e.LEFT_FRONT_BOTTOM=4]="LEFT_FRONT_BOTTOM",e[e.LEFT_FRONT_TOP=5]="LEFT_FRONT_TOP",e[e.RIGHT_BACK_BOTTOM=6]="RIGHT_BACK_BOTTOM",e[e.RIGHT_BACK_TOP=7]="RIGHT_BACK_TOP",e[e.RIGHT_FRONT_BOTTOM=8]="RIGHT_FRONT_BOTTOM",e[e.RIGHT_FRONT_TOP=9]="RIGHT_FRONT_TOP",e[e.BACK_CENTER=10]="BACK_CENTER",e[e.FRONT_CENTER=11]="FRONT_CENTER"}(Kl||(Kl={}));String.fromCharCode(1),/Mac|iPod|iPhone|iPad/.test(navigator.platform),new Map;var $l;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.createHandsFree=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"createHandsFree"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.hands.free.create",version:"1.0.0",ACL:ul.PRIVATE})],t)}(Mc.ServService);!function(e){e.top="top",e.left="left",e.right="right",e.bottom="bottom",e.leftTop="leftTop",e.leftBottom="leftBottom",e.rightTop="rightTop",e.rightBottom="rightBottom"}($l||($l={}));var eg;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.createWineCell=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"createWineCell"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.inner.space.crud",version:"1.0.0",ACL:ul.PRIVATE})],t)}(Mc.ServService);!function(e){e[e.include=0]="include",e[e.exclude=1]="exclude"}(eg||(eg={}));(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.showModelByCateId=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"showModelByCateId"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.model.toggle.visible",version:"1.0.0"})],t)})(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.remove=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.getParamModelCountByCategory=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.updateAttacheds=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.updateAttachedsNew=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.addAccessoryByBrandGoodId=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.getParamModelRootList=function(e){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.api()],t.prototype,"remove"),Cl([Mc.anno.decl.api()],t.prototype,"getParamModelCountByCategory"),Cl([Mc.anno.decl.api()],t.prototype,"updateAttacheds"),Cl([Mc.anno.decl.api()],t.prototype,"updateAttachedsNew"),Cl([Mc.anno.decl.api()],t.prototype,"addAccessoryByBrandGoodId"),Cl([Mc.anno.decl.api()],t.prototype,"getParamModelRootList"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.model.crud.service",version:"1.0.0"})],t)}(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}pl(t,e),t.prototype.getSelectedInnerSpace=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(Mc.API_UNSUPPORT)()},Cl([Mc.anno.decl.event()],t.prototype,"watcher"),Cl([Mc.anno.decl.api()],t.prototype,"getSelectedInnerSpace"),Cl([Mc.anno.decl.api()],t.prototype,"unSelected"),t=Cl([Mc.anno.decl({id:"com.custom.miniapp.service.inner.space",version:"1.0.0"})],t)}(Mc.ServService);var tg=r(208),rg=r.n(tg),ng=r(428),ig=r.n(ng),og=r(532),Ag=r(426),ag=r(427),sg=r.n(ag);function ug(e){return(ug="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
122
122
  /*!
123
123
  * @qunhe/custom-miniapp-api-core v0.2.4
124
124
  * (c) 2022
@@ -137,7 +137,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
137
137
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
138
138
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
139
139
  PERFORMANCE OF THIS SOFTWARE.
140
- ***************************************************************************** */var sg=function(e,t){return(sg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function ug(e,t){function r(){this.constructor=e}sg(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function cg(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ag(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}var lg,gg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ug(t,e),t.prototype.request=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.get=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.delete=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.post=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.put=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.encryptedRequest=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.encryptedGet=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.encryptedDelete=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.encryptedPost=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.encryptedPut=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.gzipRequest=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.gzipGet=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.gzipPost=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.gzipPut=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.pbGzipGet=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.pbGzipPost=function(e){return Object(Dc.API_UNSUPPORT)()},cg([Dc.anno.decl.api()],t.prototype,"request",null),cg([Dc.anno.decl.api()],t.prototype,"get",null),cg([Dc.anno.decl.api()],t.prototype,"delete",null),cg([Dc.anno.decl.api()],t.prototype,"post",null),cg([Dc.anno.decl.api()],t.prototype,"put",null),cg([Dc.anno.decl.api()],t.prototype,"encryptedRequest",null),cg([Dc.anno.decl.api()],t.prototype,"encryptedGet",null),cg([Dc.anno.decl.api()],t.prototype,"encryptedDelete",null),cg([Dc.anno.decl.api()],t.prototype,"encryptedPost",null),cg([Dc.anno.decl.api()],t.prototype,"encryptedPut",null),cg([Dc.anno.decl.api()],t.prototype,"gzipRequest",null),cg([Dc.anno.decl.api()],t.prototype,"gzipGet",null),cg([Dc.anno.decl.api()],t.prototype,"gzipPost",null),cg([Dc.anno.decl.api()],t.prototype,"gzipPut",null),cg([Dc.anno.decl.api()],t.prototype,"pbGzipGet",null),cg([Dc.anno.decl.api()],t.prototype,"pbGzipPost",null),t=cg([Dc.anno.decl({id:"com.custom.miniapp.inner.service.http.proxy.client",version:"1.0.0",ACL:al.INNER})],t)}(Dc.ServService),fg=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ug(t,e),t.prototype.getAllAvailableService=function(){return Object(Dc.API_UNSUPPORT)()},cg([Dc.anno.decl.api()],t.prototype,"getAllAvailableService",null),t=cg([Dc.anno.decl({id:"com.custom.miniapp.inner.service.app.available.service",version:"1.0.0",ACL:al.INNER})],t)}(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ug(t,e),t.prototype.lockModelBySplit=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.fittingDesignHasChanged=function(){return Object(Dc.API_UNSUPPORT)()},cg([Dc.anno.decl.api()],t.prototype,"lockModelBySplit",null),cg([Dc.anno.decl.notify()],t.prototype,"fittingDesignHasChanged",null),t=cg([Dc.anno.decl({id:"com.custom.miniapp.inner.service.lock.model",version:"1.0.0",ACL:al.INNER})],t)}(Dc.ServService)),hg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ug(t,e),t.prototype.getIntersectedById=function(e){return Object(Dc.API_UNSUPPORT)()},cg([Dc.anno.decl.api()],t.prototype,"getIntersectedById",null),t=cg([Dc.anno.decl({id:"com.custom.miniapp.inner.service.model.intersected",version:"1.0.0",ACL:al.INNER})],t)}(Dc.ServService);(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ug(t,e),t.prototype.getPackageInfo=function(){return Object(Dc.API_UNSUPPORT)()},cg([Dc.anno.decl.event()],t.prototype,"onRequestReceived",void 0),cg([Dc.anno.decl.api()],t.prototype,"getPackageInfo",null),t=cg([Dc.anno.decl({id:"com.custom.miniapp.service.packageInfo",version:"1.0.0",ACL:al.PRIVATE})],t)})(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ug(t,e),t.prototype.getFitRule=function(e){return Object(Dc.API_UNSUPPORT)()},cg([Dc.anno.decl.event()],t.prototype,"onBorderResultReceived",void 0),cg([Dc.anno.decl.api()],t.prototype,"getFitRule",null),t=cg([Dc.anno.decl({id:"com.custom.miniapp.service.borderResult",version:"1.0.0",ACL:al.PRIVATE})],t)}(Dc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ug(t,e),t.prototype.getSwitchInfo=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.getSaasConfig=function(){return Object(Dc.API_UNSUPPORT)()},t.prototype.getKMSConfig=function(){return Object(Dc.API_UNSUPPORT)()},cg([Dc.anno.decl.api()],t.prototype,"getSwitchInfo",null),cg([Dc.anno.decl.api()],t.prototype,"getSaasConfig",null),cg([Dc.anno.decl.api()],t.prototype,"getKMSConfig",null),t=cg([Dc.anno.decl({id:"com.custom.miniapp.service.ConfigInfo",version:"1.0.0",ACL:al.PRIVATE})],t)}(Dc.ServService);!function(e){e[e.info=1]="info",e[e.warning=2]="warning",e[e.error=3]="error"}(lg||(lg={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ug(t,e),t.prototype.getInternalLog=function(e){return Object(Dc.API_UNSUPPORT)()},cg([Dc.anno.decl.api()],t.prototype,"getInternalLog",null),cg([Dc.anno.decl.event()],t.prototype,"floorLevelInfo",void 0),t=cg([Dc.anno.decl({id:"com.custom.miniapp.inner.service.local.log",version:"1.0.0"})],t)}(Dc.ServService);var pg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ug(t,e),t.prototype.logApiCalledInfo=function(e){return Object(Dc.API_UNSUPPORT)()},t.prototype.logApiError=function(e,t){return Object(Dc.API_UNSUPPORT)()},cg([Dc.anno.decl.api()],t.prototype,"logApiCalledInfo",null),cg([Dc.anno.decl.api()],t.prototype,"logApiError",null),t=cg([Dc.anno.decl({id:"com.custom.miniapp.inner.service.track.log",version:"1.0.0",ACL:al.INNER})],t)}(Dc.ServService);function dg(e){return(dg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
140
+ ***************************************************************************** */var cg=function(e,t){return(cg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function lg(e,t){function r(){this.constructor=e}cg(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function gg(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ug(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}var fg,hg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lg(t,e),t.prototype.request=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.get=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.delete=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.post=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.put=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.encryptedRequest=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.encryptedGet=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.encryptedDelete=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.encryptedPost=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.encryptedPut=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.gzipRequest=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.gzipGet=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.gzipPost=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.gzipPut=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.pbGzipGet=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.pbGzipPost=function(e){return Object(Mc.API_UNSUPPORT)()},gg([Mc.anno.decl.api()],t.prototype,"request",null),gg([Mc.anno.decl.api()],t.prototype,"get",null),gg([Mc.anno.decl.api()],t.prototype,"delete",null),gg([Mc.anno.decl.api()],t.prototype,"post",null),gg([Mc.anno.decl.api()],t.prototype,"put",null),gg([Mc.anno.decl.api()],t.prototype,"encryptedRequest",null),gg([Mc.anno.decl.api()],t.prototype,"encryptedGet",null),gg([Mc.anno.decl.api()],t.prototype,"encryptedDelete",null),gg([Mc.anno.decl.api()],t.prototype,"encryptedPost",null),gg([Mc.anno.decl.api()],t.prototype,"encryptedPut",null),gg([Mc.anno.decl.api()],t.prototype,"gzipRequest",null),gg([Mc.anno.decl.api()],t.prototype,"gzipGet",null),gg([Mc.anno.decl.api()],t.prototype,"gzipPost",null),gg([Mc.anno.decl.api()],t.prototype,"gzipPut",null),gg([Mc.anno.decl.api()],t.prototype,"pbGzipGet",null),gg([Mc.anno.decl.api()],t.prototype,"pbGzipPost",null),t=gg([Mc.anno.decl({id:"com.custom.miniapp.inner.service.http.proxy.client",version:"1.0.0",ACL:ul.INNER})],t)}(Mc.ServService),pg=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}lg(t,e),t.prototype.getAllAvailableService=function(){return Object(Mc.API_UNSUPPORT)()},gg([Mc.anno.decl.api()],t.prototype,"getAllAvailableService",null),t=gg([Mc.anno.decl({id:"com.custom.miniapp.inner.service.app.available.service",version:"1.0.0",ACL:ul.INNER})],t)}(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lg(t,e),t.prototype.lockModelBySplit=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.fittingDesignHasChanged=function(){return Object(Mc.API_UNSUPPORT)()},gg([Mc.anno.decl.api()],t.prototype,"lockModelBySplit",null),gg([Mc.anno.decl.notify()],t.prototype,"fittingDesignHasChanged",null),t=gg([Mc.anno.decl({id:"com.custom.miniapp.inner.service.lock.model",version:"1.0.0",ACL:ul.INNER})],t)}(Mc.ServService)),dg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lg(t,e),t.prototype.getIntersectedById=function(e){return Object(Mc.API_UNSUPPORT)()},gg([Mc.anno.decl.api()],t.prototype,"getIntersectedById",null),t=gg([Mc.anno.decl({id:"com.custom.miniapp.inner.service.model.intersected",version:"1.0.0",ACL:ul.INNER})],t)}(Mc.ServService);(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}lg(t,e),t.prototype.getPackageInfo=function(){return Object(Mc.API_UNSUPPORT)()},gg([Mc.anno.decl.event()],t.prototype,"onRequestReceived",void 0),gg([Mc.anno.decl.api()],t.prototype,"getPackageInfo",null),t=gg([Mc.anno.decl({id:"com.custom.miniapp.service.packageInfo",version:"1.0.0",ACL:ul.PRIVATE})],t)})(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}lg(t,e),t.prototype.getFitRule=function(e){return Object(Mc.API_UNSUPPORT)()},gg([Mc.anno.decl.event()],t.prototype,"onBorderResultReceived",void 0),gg([Mc.anno.decl.api()],t.prototype,"getFitRule",null),t=gg([Mc.anno.decl({id:"com.custom.miniapp.service.borderResult",version:"1.0.0",ACL:ul.PRIVATE})],t)}(Mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}lg(t,e),t.prototype.getSwitchInfo=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.getSaasConfig=function(){return Object(Mc.API_UNSUPPORT)()},t.prototype.getKMSConfig=function(){return Object(Mc.API_UNSUPPORT)()},gg([Mc.anno.decl.api()],t.prototype,"getSwitchInfo",null),gg([Mc.anno.decl.api()],t.prototype,"getSaasConfig",null),gg([Mc.anno.decl.api()],t.prototype,"getKMSConfig",null),t=gg([Mc.anno.decl({id:"com.custom.miniapp.service.ConfigInfo",version:"1.0.0",ACL:ul.PRIVATE})],t)}(Mc.ServService);!function(e){e[e.info=1]="info",e[e.warning=2]="warning",e[e.error=3]="error"}(fg||(fg={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}lg(t,e),t.prototype.getInternalLog=function(e){return Object(Mc.API_UNSUPPORT)()},gg([Mc.anno.decl.api()],t.prototype,"getInternalLog",null),gg([Mc.anno.decl.event()],t.prototype,"floorLevelInfo",void 0),t=gg([Mc.anno.decl({id:"com.custom.miniapp.inner.service.local.log",version:"1.0.0"})],t)}(Mc.ServService);var Ig=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lg(t,e),t.prototype.logApiCalledInfo=function(e){return Object(Mc.API_UNSUPPORT)()},t.prototype.logApiError=function(e,t){return Object(Mc.API_UNSUPPORT)()},gg([Mc.anno.decl.api()],t.prototype,"logApiCalledInfo",null),gg([Mc.anno.decl.api()],t.prototype,"logApiError",null),t=gg([Mc.anno.decl({id:"com.custom.miniapp.inner.service.track.log",version:"1.0.0",ACL:ul.INNER})],t)}(Mc.ServService);function yg(e){return(yg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
141
141
  /*!
142
142
  * @qunhe/custom-miniapp-sdk v0.21.4
143
143
  * (c) 2022
@@ -156,4 +156,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
156
156
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
157
157
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
158
158
  PERFORMANCE OF THIS SOFTWARE.
159
- ***************************************************************************** */var Ig,yg=function(e,t){return(yg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Cg(e,t){function r(){this.constructor=e}yg(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function Eg(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":dg(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}function Bg(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function vg(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Bg(arguments[t]));return e}!function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.DOOR_WINDOW="DW",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY",e.DOOR_WINDOW_COPY="DW_COPY"}(Ig||(Ig={}));var mg,Qg,bg,_g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Cg(t,e),t.prototype.getParamModelDataByIds=function(e,t){return Object(Dc.API_UNSUPPORT)()},t.prototype.getTopParamModels=function(e){return Object(Dc.API_UNSUPPORT)()},Eg([Dc.anno.decl.api()],t.prototype,"getParamModelDataByIds",null),Eg([Dc.anno.decl.api()],t.prototype,"getTopParamModels",null),t=Eg([Dc.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:al.INNER})],t)}(Dc.ServService),Sg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Cg(t,e),t.prototype.toJSON=function(){return{paramPackages:vg(this.paramPackages.values()),hardwares:vg(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(e){var t=Bg(e,2);t[0];var r=t[1],n=new rg.a;return Object(Ot.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:vg(this.displayInfos.values()),wireFrames:Object(Ot.fromPairs)(vg(this.wireGeometrysMap.entries()).map((function(e){return[e[0],e[1].vertices]})))}},t.prototype.serialize=function(){return JSON.stringify(this.toJSON())},t.prototype.unSerialize=function(e){var t=this,r="string"==typeof e?JSON.parse(e):e,n=Object(Ot.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(e){var t=new rg.a;if(Object(Ot.extend)(t,e),t.meshModels=t.meshModels.map((function(e){var t=e.displayMaterial,r=new Ag.a,n=new rn.a;return Object(Ot.extend)(n,e.geometry),r.texture=e.texture,r.displayMaterial=t?Object(ng.toPopBufferMtl)(t):void 0,r.geometry=n,r})),t.furnitureModel){var r=new ig.FurnitureModel;Object(Ot.extend)(r,t.furnitureModel),r.size=new je.a(r.size),r.position=new je.a(r.position),r.rotate=new je.a(r.rotate),r.scale=new je.a(r.scale),t.furnitureModel=r}return t}))),r.wireFrames&&Object(Ot.each)(r.wireFrames,(function(e,r){t.addWireGeometrysMap(r,e)})),this.addCustomResources(n)},t}(eg.a);!function(e){e[e.willExit=0]="willExit"}(mg||(mg={})),function(e){e[e.exit=0]="exit"}(Qg||(Qg={})),function(e){e[e.personalLibrary=1]="personalLibrary",e[e.enterpriseLibrary=2]="enterpriseLibrary"}(bg||(bg={}));var wg=r(245),Dg=r.n(wg),Rg=r(287),Mg=r.n(Rg),xg=r(1129),Pg=r.n(xg),Tg=r(358),Fg=r.n(Tg),Og=r(722),Lg=r.n(Og),kg=r(1130),Ng=r.n(kg),Gg=r(726),Ug=r.n(Gg),jg=r(727),Vg=r.n(jg),Yg=r(207),Hg=r.n(Yg),Kg=r(112),qg=r.n(Kg),Jg=r(187),Wg=r.n(Jg),zg=r(531),Xg=r.n(zg),Zg=r(1131),$g=r.n(Zg),ef=r(721),tf=r.n(ef),rf=r(720),nf=r.n(rf),of=r(357),Af=r.n(of),af=r(242),sf=r.n(af),uf=r(731),cf=r.n(uf),lf=r(719),gf=r.n(lf),ff=r(1132),hf=r.n(ff),pf=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[ii.a,Kn.a,Fg.a,Te.a,Lg.a,Oe.a,Ng.a,Hg.a,qg.a,Wg.a,Xg.a,ke.a,Jn.a,zn.a,Zn.a,$g.a,tf.a,nf.a,Ge.a,Af.a,sf.a,cf.a,uf.LineIndex,ei.a,gf.a,hf.a,_r.a,je.a,ArrayBuffer,LA.Vector3,Mg.a,Pg.a,Ss.ParamStore,Ug.a,Vg.a,Ag.a,rn.a,ig.FurnitureModel,Map,LA.SkyBackground]:[];Object(wg.inject)({isKnownImmutableInstance:function(e){return pf.some((function(t){return e instanceof t}))}});Dg.a;var df=r(211);function If(e){return(If="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ef(e,t){return(Ef=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=mf(e);if(t){var i=mf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vf(this,r)}}function vf(e,t){return!t||"object"!==If(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mf(e){return(mf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qf,bf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ef(e,t)}(o,e);var t,r,n,i=Bf(o);function o(){var e;return yf(this,o),(e=i.apply(this,arguments)).rootState=new wu,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new Bc(this,this.rootState);e.init(),e.run()}}])&&Cf(t.prototype,r),n&&Cf(t,n),o}(df.BasePlugin);bf.dependencies=[Si.AppServicePlugin];var _f,Sf,wf,Df=function(e){if(!Qf)throw new Error("please new Application before call method");return Qf.getCustomMiniAppService(e)},Rf=r(249),Mf=r(108),xf=r(429);function Pf(e){wf=e}function Tf(e){return(Tf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ff(e){return function(e){if(Array.isArray(e))return Of(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Of(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Of(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Of(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Lf(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function kf(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Nf(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){kf(o,n,i,A,a,"next",e)}function a(e){kf(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Gf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jf(e,t){return(jf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Hf(e);if(t){var i=Hf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Yf(this,r)}}function Yf(e,t){return!t||"object"!==Tf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Hf(e){return(Hf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jf(e,t)}(o,e);var t,r,n,i=Vf(o);function o(){var e;return Gf(this,o),(e=i.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0,hardwarelist:[],casbinModelIdMap:{}},e.lastCurrentCustomDataArgs=[],e.getCurrentBaseDesignInfo=Nf(s.a.mark((function t(){var r,n;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.state.designInfo)){t.next=3;break}return t.abrupt("return",r);case 3:return n=Df(Rf.MiniAppDesignBaseInfoService),t.next=6,n.getDesignBaseInfo();case 6:return r=t.sent,e.state.designInfo=r,t.abrupt("return",r);case 9:case"end":return t.stop()}}),t)}))),e.getCurrentCustomData=function(){var t=Nf(s.a.mark((function t(r){var n,i;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.state.currentCustomData,r){t.next=3;break}return t.abrupt("return",n);case 3:if(i=Object(Ot.castArray)(r),!Object(Ot.difference)(i,e.lastCurrentCustomDataArgs).length&&n){t.next=11;break}return t.next=8,iv(r);case 8:n=t.sent,t.next=12;break;case 11:return t.abrupt("return",n);case 12:return e.lastCurrentCustomDataArgs=i,e.state.currentCustomData=n,t.abrupt("return",n);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.loadFittingHardwareToSense=function(){var t=Nf(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Object(Ot.uniq)(Object(Ot.flatten)(Object(Ot.map)(r.hardware,(function(e){return e.map((function(e){return e.brandGoodId}))})))),e.state.casbinModelIdMap={},n.length){t.next=4;break}return t.abrupt("return");case 4:return i=e.getStateManager().core,o=i.design,A=i.pad,t.next=8,Promise.allSettled(Object(Ot.map)(n,function(){var e=Nf(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lv(t);case 2:return r=e.sent,e.abrupt("return",[t,r]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 8:return a=t.sent,t.next=11,gv(n);case 11:for(p in u=t.sent,c=Object(Ot.mapValues)(Object(Ot.keyBy)(Object(Ot.filter)(a,(function(e){return"fulfilled"===e.status})).map((function(e){return e.value})),(function(e){return e[0]})),(function(e){return e[1]})),l=o.getCustom(),g=[],f={},h=function(e){var t=r.hardware[e],n=A.findModelOrAssemblyModelById(e);if(n){var i=n.getConcatenatedMatrix(),o=n.getSize(),a=(new ke.a).makeTranslation(new je.a(-o.x/2,o.y/2,-o.z/2)),s=i.clone().multiply(a),l=Object(Ot.map)(t,(function(e){var t=c[e.brandGoodId],r=u[e.brandGoodId]||{x:0,y:0,z:0};if(t){var i=t.paramModelData,o=Lf(t,["paramModelData"]),A=e.rotate,a=(new mt).parse(i);Object(Mf.attach)(a,Object(Mf.toAttachedMap)(o)),a.setIsAppendHardware(!0),a.setLinkedIds(e.linkedIds),a.setHardwareData(e),a.linkParamModelId=n.id;var l=s.clone().multiply((new ke.a).compose(new je.a(e.position),new Oe.a(A.x,A.y,A.z),new je.a(e.scale)).multiply((new ke.a).setPosition(new je.a(r)))),g=Yn.a.decompose(l),h=g.rotation,p=g.position,d=g.scale,I=new je.a(p);return a.setPosition({x:I.x,y:I.y,z:I.z}),a.setRotation({x:h.x,y:h.y,z:h.z}),a.setScale(d),a.assignUniqueId(),f[e.id]=a.id,a}})).filter((function(e){return!!e}));g.push.apply(g,Ff(l))}else Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!")},r.hardware)h(p);if(!g.length){t.next=23;break}return t.next=21,_f.updateAttacheds(g);case 21:l.addParamModels.apply(l,g),e.state.casbinModelIdMap=f;case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return t=o,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&Uf(t.prototype,r),n&&Uf(t,n),o}(_i.AXR);function qf(e){return(qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zf(e,t){return(zf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$f(e);if(t){var i=$f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Zf(this,r)}}function Zf(e,t){return!t||"object"!==qf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $f(e){return($f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var eh,th,rh,nh,ih,oh,Ah,ah,sh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zf(e,t)}(o,e);var t,r,n,i=Xf(o);function o(){var e;return Jf(this,o),(e=i.apply(this,arguments)).paramModelConstructor=mt,e}return t=o,(r=[{key:"parseParamModelAssemblies",value:function(e){var t=this;return e.forEach((function(e){var r=(new xt).parse(e,t,{isRootWorldMatrix:!0});t.addParamModelAssembly(r)})),this}}])&&Wf(t.prototype,r),n&&Wf(t,n),o}(Sg),uh=r(75),ch=Symbol("fitting-data"),lh=Symbol("groove-fitting-entity"),gh=Symbol("intersect-data"),fh=Symbol("param-model-hint-entity"),hh=Symbol("fitting-hint-entity"),ph=Symbol("plank-outline-hint-entity");!function(e){e.FAIL="fail",e.SUCCESS="success",e.LOADING="loading"}(eh||(eh={})),function(e){e[e.READY=0]="READY",e[e.LOADING=1]="LOADING",e[e.FAILED=2]="FAILED",e[e.INVALID=3]="INVALID",e[e.SUCCESS=4]="SUCCESS"}(th||(th={})),function(e){e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.FAILED=2]="FAILED",e[e.SUCCESS=3]="SUCCESS"}(rh||(rh={})),function(e){e.SCENE_ID="cp"}(nh||(nh={})),function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(ih||(ih={})),function(e){e.selectBlank="sb",e.renderModeChange="r",e.doorVisibilityChange="d"}(oh||(oh={})),function(e){e[e.opaqueModel=1]="opaqueModel",e[e.translucentModel=.4]="translucentModel",e[e.transparentModel=0]="transparentModel"}(Ah||(Ah={})),function(e){e.SHADING="0",e.OUTLINE_WITH_SHADING="1",e.TRANSLUCENT="2",e.OUTLINE_AND_TRANSLUCENT="3"}(ah||(ah={}));var dh,Ih=[];function yh(e){return(yh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ch(e){return function(e){if(Array.isArray(e))return Eh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Eh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Eh(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Eh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Bh(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function vh(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Bh(o,n,i,A,a,"next",e)}function a(e){Bh(o,n,i,A,a,"throw",e)}A(void 0)}))}}function mh(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Qh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _h(e,t){return(_h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Dh(e);if(t){var i=Dh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wh(this,r)}}function wh(e,t){return!t||"object"!==yh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dh(e){return(Dh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.design="design",e.series="series"}(dh||(dh={}));var Rh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_h(e,t)}(o,e);var t,r,n,i=Sh(o);function o(){var e;return Qh(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({main:th.READY,design:th.READY,series:th.READY}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionLoad=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sf.getParamModelDataByBrandGoodId(t);case 2:return n=e.sent,i=n.paramModelData,o=mh(n,["paramModelData"]),A=(new mt).parse(i),Object(Mf.attach)(A,Object(Mf.toAttachedMap)(o)),e.next=9,_f.updateAttacheds([A]);case 9:return r.core.design.getCustom().addParamModels(A),r.core.fittingDesign.setFittings(Ih),e.next=13,Object(uh.put)(this.$actionLoad.done.message({params:t,result:th.SUCCESS}));case 13:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.custom,i=t.needAttach,o=n.getParamModels(),A=n.getParamModelAssemblies(),!i){e.next=6;break}return e.next=6,Promise.all(o.map(function(){var e=vh(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sf.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(Mf.attach)(t,Object(Mf.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:if(r.core.design.setCustom(n),a=o.filter((function(e){return!e.getAssembly()})),!i){e.next=12;break}return u=[].concat(Ch(a),Ch(A)),e.next=12,_f.updateAttacheds(u);case 12:return e.next=14,Object(uh.put)(this.$actionAddModelToSense.done.message({params:{custom:n,needAttach:i},result:th.SUCCESS}));case 14:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.map((function(e){var t=e.paramModelData,r=mh(e,["paramModelData"]),n=(new mt).parse(t,new sh);return Object(Mf.attach)(n,Object(Mf.toAttachedMap)(r)),n})),e.next=3,_f.updateAttacheds(i);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,Ch(i)),e.next=6,Object(uh.put)(this.$actionAddParamModelToSense.done.message({params:t,result:th.SUCCESS}));case 6:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelAssemblyToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.core.design.getCustom(),i=new sh,o=t.map((function(e){return(new xt).parse(e,i)})),A=i.getParamModels(),e.next=6,Promise.all(A.map(function(){var e=vh(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sf.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(Mf.attach)(t,Object(Mf.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.next=8,_f.updateAttacheds(Ch(o));case 8:return n.addParamModelAssemblies.apply(n,Ch(o)),n.addParamModels.apply(n,Ch(A)),e.next=12,Object(uh.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:t,result:th.SUCCESS}));case 12:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&bh(t.prototype,r),n&&bh(t,n),o}(_i.AXR);function Mh(e){return(Mh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ph(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Th(e,t)}function Th(e,t){return(Th=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Lh(e);if(t){var i=Lh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Oh(this,r)}}function Oh(e,t){return!t||"object"!==Mh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Lh(e){return(Lh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}_i.AXR;var kh=function(e){Ph(r,e);var t=Fh(r);function r(){return xh(this,r),t.apply(this,arguments)}return r}(_i.AXRPartial),Nh=(_i.AXRManager,Math.sqrt(2)),Gh=Math.PI/6,Uh=Math.PI/3+Math.PI;function jh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uh,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Gh,n=e.getPosition(),i=e.getSize(),o=n.clone(),A=i.length()*Nh,a=new je.a(Math.cos(r)*Math.cos(t),Math.cos(r)*Math.sin(t),Math.sin(r)).mul(A).applyMatrix4(e.getMatrix());return{lookAt:o,position:a}}var Vh,Yh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,t=arguments.length>1?arguments[1]:void 0;return new Promise((function(r){setTimeout(r,e,t)}))};function Hh(e){var t,r,n,i=function(e){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];e.call.apply(e,[this].concat(r))}};return{promise:new Promise((function(o,A){t=i(o),r=i(A),"number"==typeof e&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(e,"ms")))}),e))})),resolve:t,reject:r}}function Kh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kh(Object(r),!0).forEach((function(t){Jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Jh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wh(e){return e["@type"]===l.THROUGH_SHELL}function zh(e){var t=e.elements;return(new kA.a.Matrix4).set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}function Xh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zh(e,t){var r,n=e.getSize(),i=(new ke.a).getInverse(e.getConcatenatedMatrix()),o=t.clone().applyMatrix4(zh(i)),A=o.x,a=o.y,s=o.z,u=(Xh(r={},Vh.TOP,Math.abs(s-n.z/2)),Xh(r,Vh.LEFT,Math.abs(A+n.x/2)),Xh(r,Vh.BACK,Math.abs(a+n.y/2)),Xh(r,Vh.RIGHT,Math.abs(A-n.x/2)),Xh(r,Vh.FRONT,Math.abs(a-n.y/2)),Xh(r,Vh.BOT,Math.abs(s+n.z/2)),r),c=Object.entries(u).reduce((function(e,t){return t[1]<e[1]?t:e}));return c[1]<.01?+c[0]:Vh.UNKNOWN}function $h(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}!function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.TOP=0]="TOP",e[e.LEFT=1]="LEFT",e[e.BACK=2]="BACK",e[e.RIGHT=3]="RIGHT",e[e.FRONT=4]="FRONT",e[e.BOT=5]="BOT"}(Vh||(Vh={}));var ep=function(){var e,t=(e=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=my(),n=r.baseDesignInfo,e.next=3,n.getCurrentBaseDesignInfo();case 3:return i=e.sent,o=i.designId,A=i.levelid,a={modelid:null!=t?t:"",designid:o,levelid:A,toolType:0},u=n.getStateManager().core.design.getCustom(),t||((c=u.getParamModelAssemblies()).length?a.modelid=c[0].id:(l=u.getParamModels().filter((function(e){return!e.isAppendHardware}))).length&&(a.modelid=l[0].id)),e.next=11,n.getCurrentCustomData(null!=t?t:a.modelid);case 11:return g=e.sent,f=g.toolType,a.toolType=f,e.abrupt("return",a);case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){$h(o,n,i,A,a,"next",e)}function a(e){$h(o,n,i,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}(),tp=r(243);function rp(e){return function(e){if(Array.isArray(e))return np(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return np(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return np(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function np(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ip(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new sh;r.parseParamModels(e.paramModels).parseParamModelGroups(e.paramModelGroups).parseParamModelAssemblies(e.paramModelCombinations);var n=r.getParamModelAssemblies(),i=(t=rp(r.getParamModels())).concat.apply(t,rp(n.map((function(e){return e.getParamModels()}))));return i=i.filter((function(e){return!e.isAccessory()})),Object(Ot.uniqBy)(tp.ParamModelUtils.collectAccessories(i),"id").forEach((function(e){e.toLocalMatrix()})),{paramModels:i,paramModelAssemblies:n}}function op(e){return(op="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ap(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ap(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Ap(o,n,i,A,a,"next",e)}function a(e){Ap(o,n,i,A,a,"throw",e)}A(void 0)}))}}function sp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function up(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cp(e,t){return(cp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fp(e);if(t){var i=fp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gp(this,r)}}function gp(e,t){return!t||"object"!==op(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fp(e){return(fp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function hp(e){return function(e){if(Array.isArray(e))return pp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return pp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pp(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dp(e){var t=e.map((function(e){return e.subModels&&e.subModels.length?dp(e.subModels):[]})).flat();return t.push.apply(t,hp(e)),t}var Ip=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cp(e,t)}(g,e);var t,r,n,i,o,A,a,u,c,l=lp(g);function g(){var e;return sp(this,g),(e=l.apply(this,arguments)).state=e.stateCreator.create({loading:eh.FAIL,allSubModels:[],result:void 0,currModelId:""}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSetModelId=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.currModelId!==t&&(e.result=void 0,e.allSubModels=[]),e.currModelId=t}))})),e.$actionLoadParamModelJsonData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p,d,I,y;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.modelId,n=t.defer,i=t.hasFitting,o=void 0!==i&&i,A=t.force,a=void 0!==A&&A,u=t.templateId,c=this.state.state,l=c.currModelId,g=c.result,f=c.currTemplateId,r){e.next=4;break}throw new Error("not selected model!");case 4:if(h=r===l,p=f===u,d=this.$actionLoadParamModelJsonData,e.prev=7,I=h&&!a&&p?g:void 0,!o||I){e.next=13;break}return e.next=12,ov(r,u);case 12:I=e.sent;case 13:if(I){e.next=18;break}return JB.delete(r),e.next=17,Av(r,u);case 17:I=e.sent;case 18:if(I){e.next=20;break}throw new Error("输入json数据出现异常");case 20:return y=h&&!u?dp(I.paramModel):this.state.state.allSubModels,h&&my().scene.$actionToggleSelectModel.dispatch(!0),e.next=24,d.done.dispatch({params:t,result:{ossContent:I,allSubModels:y}});case 24:e.next=31;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,d.failed.dispatch({params:t});case 30:n&&n.reject(e.t0);case 31:case"end":return e.stop()}}),e,this,[[7,26]])}))),t.done.every((function(e){var t=e.params.defer;t&&t.resolve(e.result.ossContent)})),t.started.produce(e.$reducerState,(function(e,t){e.loading=eh.LOADING})),t.done.produce(e.$reducerState,(function(e,t){var r=t.result,n=r.ossContent,i=r.allSubModels,o=t.params,A=o.templateId,a=o.modelId===e.currModelId;e.loading=eh.SUCCESS,e.result=a?n:e.result,e.allSubModels=a?i:e.allSubModels,e.currTemplateId=A})),t.failed.produce(e.$reducerState,(function(e,t){e.loading=eh.FAIL}))})),e}return t=g,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"viewParamModelById",value:(c=ap(s.a.mark((function e(t){var r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(Ot.isArray)(t)?t[0]:t,this.$actionSetModelId.dispatchResolve(r),(n=my().scene).cameraController.$actionInit.dispatch(),this.resetView(),(i=this.getAxr(Hd).fittingDesignSense).initFittingDesign(),function(){var e=ap(s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Hh(),i.$actionLoadFittingDesign.started.dispatch({defer:t,params:{modelid:r}}),e.prev=2,e.next=5,t.promise;case 5:n=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.log(e.t0);case 11:return e.prev=11,e.next=14,c.$actionLoadParamModelJsonData.started.dispatchResolve({modelId:r,hasFitting:!!n});case 14:return e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[2,8,11,15]])})));return function(){return e.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),e.next=12,this.getAxr(Kf).getCurrentCustomData(r);case 12:return o=e.sent,A=new sh,o.context&&A.unSerialize(o.context),a=ip(o,A),(u=new ze).addParamModels.apply(u,hp(a.paramModels)),u.addParamModelAssemblies.apply(u,hp(a.paramModelAssemblies)),e.next=21,this.getAxr(Rh).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!o.context});case 21:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=ap(s.a.mark((function e(){var t,r,n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getStateManager().core.design.getCustom(),r=t.getParamModels().filter((function(e){return!e.isAppendHardware})),n=t.getParamModelAssemblies(),i=this.state.state.currModelId,(0!==r.length||0!==n.length)&&i){e.next=6;break}throw new Error("No custom model in the scene!");case 6:return t.clearAllParamModels(),e.next=9,iv(this.state.state.currModelId);case 9:return o=e.sent,A=new sh,o.context&&A.unSerialize(o.context),a=ip(o,A),t.addParamModels.apply(t,hp(a.paramModels)),t.addParamModelAssemblies.apply(t,hp(a.paramModelAssemblies)),e.next=17,this.getAxr(Rh).$actionAddModelToSense.started.dispatchResolve({custom:t,needAttach:!o.context});case 17:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(a=ap(s.a.mark((function e(){var t,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Df(Rf.MiniAppSelectModelService),e.next=3,null==t?void 0:t.getSelected();case 3:if(!(null==(r=e.sent)?void 0:r.length)){e.next=9;break}return e.next=7,this.viewParamModelById(Object(Ot.map)(r,"id").filter((function(e){return!!e})));case 7:e.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"getParamModelJsonData",value:(A=ap(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.state.state,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r.currModelId:A,u=n.force,c=void 0!==u&&u,l=n.templateId,c){e.next=14;break}return f=Hh(),this.getAxr(Hd).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:f,params:{modelid:a}}),e.prev=5,e.next=8,f.promise;case 8:g=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.log(e.t0);case 14:return h=Hh(o),this.$actionLoadParamModelJsonData.started.dispatch({defer:h,modelId:a,hasFitting:!!g,force:c,templateId:l}),e.abrupt("return",h.promise);case 17:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(e){return A.apply(this,arguments)})},{key:"validateModelStable",value:function(e){var t=this.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(t){for(var r=[t],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var i=r.shift();i.getType()===jn.ParamModelType.PARAM_PRIMITIVE&&i.getLegal()?(n.total++,i.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(i.id))):r.push.apply(r,hp(i.getChildNodes()))}return n}}},{key:"getTopModelList",value:(o=ap(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Df(_g),e.next=3,r.getTopParamModels(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(i=ap(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(Ot.castArray)(t),n=Df(Rf.MiniAppParamModelDataInfoService),i=[],o=r.length-1;case 4:if(!(o>=0)){e.next=10;break}return e.next=7,n.getParamModelPhotoById(r[o]).then((function(e){i.push(e)}));case 7:--o,e.next=4;break;case 10:return e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"resetView",value:function(){var e=this.getStateManager().core,t=e.design.getCustom();t.clearAllParamModels();var r=t.getParamModelAssemblies();r.length&&r.map((function(e){return t.removeParamModelAssembly(e)})),e.fittingDesign.setIntersects([]),e.fittingDesign.setPlankFaceHintModels([]),e.fittingDesign.setFittingHintModels([]),e.fittingDesign.setPlankOutlineHintModels([])}}])&&up(t.prototype,r),n&&up(t,n),g}(_i.AXR);function yp(e){return(yp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ep(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cp(Object(r),!0).forEach((function(t){Bp(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Bp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vp(e){return function(e){if(Array.isArray(e))return mp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return mp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mp(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qp(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function bp(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Qp(o,n,i,A,a,"next",e)}function a(e){Qp(o,n,i,A,a,"throw",e)}A(void 0)}))}}function _p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wp(e,t,r){return(wp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=xp(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Dp(e,t){return(Dp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=xp(e);if(t){var i=xp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Mp(this,r)}}function Mp(e,t){return!t||"object"!==yp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xp(e){return(xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pp={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},Tp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dp(e,t)}(o,e);var t,r,n,i=Rp(o);function o(){var e;return _p(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({autoSave:!0,designLoading:eh.FAIL,design:Object(Ot.cloneDeep)(Pp)}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.getAxr(Rh);case 1:return i=n.$actionAddModelToSense.done.messageType(),o=this.$actionRestoreFittingDesign.messageType(),e.next=6,Object(uh.take)([i,o]);case 6:A=r.core,a=A.fittingDesign,u=A.design,a.setFittings([]),a.setGrooveFittings([]),u.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),c=this.state.state.design,this.fittingAddDataToFittingDesignSense(c),this.getAxr(Kf).loadFittingHardwareToSense({hardware:c.hardwares}),e.next=1;break;case 16:case"end":return e.stop()}}),e,this)})))})),e.$actionEnableAutoSave=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.autoSave=t}))})),e.initFittingDesign=function(){e.$actionRestoreFittingDesign.dispatch(Object(Ot.cloneDeep)(Pp))},e.getConnectedFittingDesign=function(){var t=bp(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h=arguments;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],i=e.state.state.design,r){t.next=4;break}return t.abrupt("return",Object(Ot.cloneDeep)(i));case 4:if(o={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){t.next=26;break}A=i.hardwares||{},t.t0=s.a.keys(A);case 8:if((t.t1=t.t0()).done){t.next=18;break}if(c=t.t1.value,!A.hasOwnProperty(c)){t.next=16;break}if(!(l=Object(Ot.find)(A[c]||[],(function(e){return e.id===r})))){t.next=16;break}return u=c,a=l,t.abrupt("break",18);case 16:t.next=8;break;case 18:if(a&&u){t.next=20;break}throw new Error("当前五金不存在!");case 20:g=a.linkedIds,f=function(e){return g.includes(e.id)},o.holes[u]=Object(Ot.filter)(i.holes[u],f),o.grooves[u]=Object(Ot.filter)(i.grooves[u],f),t.next=27;break;case 26:Object(Ot.keys)(o).forEach((function(e){i[e]&&i[e][r]&&(o[e][r]=Object(Ot.cloneDeep)(i[e][r]))}));case 27:return t.abrupt("return",o);case 28:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.fittingAddDataToFittingDesignSense=function(){var t=bp(s.a.mark((function t(r){var n,i,o,A,a,u,l,g,f,h,p,d;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Yh(1);case 2:n=e.stateManager.core,i=n.fittingDesign,o=n.pad,A=my().fittingDesign.senseSetting.getSenseSettings(),a=Object(Ot.pick)(A,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),u=r.holes,l=void 0===u?{}:u,g=r.grooves,f=void 0===g?{}:g,h=r.hardwareGrooves,p=void 0===h?{}:h,d={findRelativeModel:o.findModelOrAssemblyModelById,transformModel:Nn},i.addFittings([].concat(vp(Sc(l,Ep(Ep({},d),{},{type:c.HOLE,defaultConfig:a}))),vp(Sc(f,Ep(Ep({},d),{},{type:c.GROOVE,defaultConfig:a}))))),i.addGrooveFittings(Sc(p,Ep(Ep({},d),{},{type:c.HARDWARE_GROOVE,transformModel:bi,defaultConfig:a})));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.appendFittingDataToFittingDesign=function(){var t=bp(s.a.mark((function t(r,n){var i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.state.state,A=o.design,a=o.autoSave,u=!r.id||r.id===A.id,c=Pp,l=n.timeout,g=n.save,f=void 0===g?a:g,h={id:null!==(i=r.id)&&void 0!==i?i:A.id,holes:Ep(Ep({},u?A.holes:c.holes),r.holes||{}),grooves:Ep(Ep({},u?A.grooves:c.grooves),r.grooves||{}),hardwares:Ep(Ep({},u?A.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:Ep(Ep({},u?A.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(Ot.pull)(Object(Ot.keys)(h),"id").forEach((function(e){var t=h[e];Object(Ot.keys)(t).forEach((function(e){0===t[e].length&&delete t[e]}))})),!f){t.next=12;break}return p=Hh(l),e.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),t.abrupt("return",p.promise);case 12:e.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),e.$actionRestoreFittingDesign=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.design=t}))})),e.$actionLoadFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.$actionLoadFittingDesign,i=t.params,e.next=4,ep(i.modelid);case 4:return o=e.sent,e.prev=5,e.next=8,zB(Ep(Ep({},i),o));case 8:A=e.sent,n.done.dispatch({params:t,result:{designData:A,modelId:o.modelid}}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),n.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[5,12]])}))),e.done.every((function(e,t){var r=this.$actionRestoreFittingDesign,n=e.result.designData?e.result.designData:Object(Ot.cloneDeep)(Pp),i=this.getAxr(Ip).state.state.currModelId;e.result.modelId===i&&r.dispatch(n);var o=e.params.defer;o&&o.resolve(e.result.designData)})),e.failed.every((function(e,t){var r,n=this.getAxr(Ip).state.state.currModelId;(null===(r=e.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var i=e.params.defer;i&&i.reject(new Error("load fitting design error"))}))})),e.$actionClearFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(Ip).state.state.currModelId,i=t.modelId,o=void 0===i?n:i,e.next=4,ep(o);case 4:return A=e.sent,a=this.$actionClearFittingDesign,e.prev=6,e.next=9,tv(A);case 9:a.done.dispatch({params:t,result:void 0}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),a.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[6,12]])}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this.getAxr(Ip).state.state.currModelId,(null!==(n=t.params.modelId)&&void 0!==n?n:i)===i&&this.initFittingDesign(),(o=t.params.defer)&&o.resolve();case 5:case"end":return e.stop()}}),e,this)}))),e.failed.every(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return e.stop()}}),e)})))})),e.$actionSaveFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.design,n=void 0===r?this.state.state.design:r,e.next=3,ep(n.id);case 3:return i=e.sent,o=this.$actionSaveFittingDesign,e.prev=5,e.next=8,ev(Ep(Ep({},n),{},{id:i.modelid}),i);case 8:o.done.dispatch({params:t,result:void 0}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),o.failed.dispatch({params:t,result:e.t0});case 14:case"end":return e.stop()}}),e,this,[[5,11]])}))),e.failed.every(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("save failed!"));case 2:case"end":return e.stop()}}),e)}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.params.design,i=this.getAxr(Ip).state.state.currModelId,!n||n.id&&n.id!==i||this.$actionRestoreFittingDesign.dispatch(n),(o=t.params.defer)&&setTimeout((function(){o.resolve()}));case 5:case"end":return e.stop()}}),e,this)})))})),e}return t=o,(r=[{key:"init",value:function(){wp(xp(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&Sp(t.prototype,r),n&&Sp(t,n),o}(kh);function Fp(e){return(Fp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Op(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kp(e,t){return(kp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Np(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Up(e);if(t){var i=Up(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Gp(this,r)}}function Gp(e,t){return!t||"object"!==Fp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Up(e){return(Up=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kp(e,t)}(o,e);var t,r,n,i=Np(o);function o(){var e;return Op(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{}}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateFittingHintConf=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setFittingHint",value:function(e){this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"clearFittingHint",value:function(e){var t=e?Object(Ot.omit)(this.state.state.option,e):{};this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"rerenderToSense",value:function(){var e=this.state.state.option,t=this.stateManager.core,r=t.design,n=t.fittingDesign,i=r.getCustom().getParamModels(),o=n.getFittings(),A=n.getGrooveFittings(),a=Object(Ot.map)(e,(function(e,t){var r=i.find((function(e){return e.id===t&&e.isAppendHardware}))||o.find((function(e){return e.id===t}))||A.find((function(e){return e.id===t}));if(r)return new lr({linkModel:r,hintOutline:e.outline})})).filter((function(e){return!!e}));n.setFittingHintModels(a)}}])&&Lp(t.prototype,r),n&&Lp(t,n),o}(kh);function Vp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Yp=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__changeMap={}}var t,r,n;return t=e,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({field:"isHidden"},this.isHidden,e),this.isHidden=e}},{key:"__trackUpdateField",value:function(e,t,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,i=e.field;t===r||n.some((function(e){return e.field===i}))||n.push({field:i})}}])&&Vp(t.prototype,r),n&&Vp(t,n),e}();function Hp(e){var t,r=new Yp;if(r.id=e.id,e instanceof mt){if(!e.isAppendHardware)return;t=c.HARDWARE,r.isHidden=e.getInvisible(),r.originalData=e.hardwareData}else r.isHidden=!e.visible,t=e.type,r.originalData=e.fittingData;return r.linkParamModelId=e.linkParamModelId,r.modelType=t,r}function Kp(e){return(Kp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qp(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Wp(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Jp(e){return function(e){if(Array.isArray(e))return zp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Wp(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wp(e,t){if(e){if("string"==typeof e)return zp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zp(e,t):void 0}}function zp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $p(e,t){return($p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ed(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=rd(e);if(t){var i=rd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return td(this,r)}}function td(e,t){return!t||"object"!==Kp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rd(e){return(rd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$p(e,t)}(o,e);var t,r,n,i=ed(o);function o(){return Xp(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getAllFittingModels",value:function(e){var t=new Set;if(e){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(e);if(!r)return[];for(var n=[r];n.length;){var i=n.shift();t.add(i.id),n.push.apply(n,Jp((null==i?void 0:i.getChildNodes())||[]))}}var o=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),A=this.stateManager.core.fittingDesign.getFittings(),a=this.stateManager.core.fittingDesign.getGrooveFittings(),s=[].concat(Jp(o),Jp(A),Jp(a));return t.size>0&&(s=s.filter((function(e){return t.has(e.linkParamModelId)}))),s.map((function(e){return Hp(e)}))}},{key:"findHardwareParamModels",value:function(e){var t,r=[],n=qp(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.isAppendHardware&&r.push(i),r.push.apply(r,Jp(this.findHardwareParamModels(i.getChildNodes())))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"save",value:function(e){var t,r=[],n=[],i=qp(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.modelType===c.HARDWARE?r.push(o):n.push(o)}}catch(e){i.e(e)}finally{i.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(e){var t=this.stateManager.core.pad;e.forEach((function(e){var r=t.findModelOrAssemblyModelById(e.id);if(r){var n=e.__changeMap.update;(void 0===n?[]:n).forEach((function(t){"isHidden"===t.field&&r.setInvisible(e.getHidden())})),e.__changeMap.update=[]}})),NB().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(e){var t=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getFittingHintModels();e.forEach((function(e){var i;e.modelType===c.HARDWARE_GROOVE?i=r.find((function(t){return t.id===e.id})):e.modelType!==c.HOLE&&e.modelType!==c.GROOVE||(i=t.find((function(t){return t.id===e.id})));var o=n.find((function(t){return t.linkModel.id===e.id}));if(i){var A=e.__changeMap.update;(void 0===A?[]:A).forEach((function(t){"isHidden"===t.field&&(null==i||i.setVisible(!e.getHidden()),null==o||o.setVisible(!e.getHidden()))})),e.__changeMap.update=[]}}))}}])&&Zp(t.prototype,r),n&&Zp(t,n),o}(kh);function id(e){return(id="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function od(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Ad(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ad(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ad(Object(r),!0).forEach((function(t){sd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ad(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function sd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ud(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function cd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ld(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gd(e,t){return(gd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pd(e);if(t){var i=pd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hd(this,r)}}function hd(e,t){return!t||"object"!==id(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pd(e){return(pd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gd(e,t)}(a,e);var t,r,n,i,o,A=fd(a);function a(){var e;return cd(this,a),(e=A.apply(this,arguments)).state=e.stateCreator.create({intersectedLoading:eh.FAIL,intersectedResult:void 0,intersectedVisible:!1}),e.$reducerState=e.reducerCreator.create(e.state),e._getParamModelIntersectedCallback=[],e.$actionLoadParamModelIntersectedData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t,r){var n,i,o,A,a,u,c,l,g;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ep(t.modelId);case 2:return n=e.sent,i=Df(hg),o=t.modelId,A=void 0===o?n.modelid:o,a=t.defer,u=ud(t,["modelId","defer"]),c=my().viewParamModel.state.state.currModelId===A,l=this.$actionLoadParamModelIntersectedData,e.prev=7,e.next=10,i.getIntersectedById(ad({modelId:A},u));case 10:if(g=e.sent,!c){e.next=14;break}return e.next=14,l.done.dispatch({params:t,result:{result:g,modelId:A}});case 14:a&&a.resolve(g),e.next=22;break;case 17:return e.prev=17,e.t0=e.catch(7),e.next=21,l.failed.dispatch({params:t});case 21:a&&a.reject(e.t0);case 22:case"end":return e.stop()}}),e,this,[[7,17]])}))),t.done.every((function(t,r){var n=t.params.defer,i=my().viewParamModel.state.state.currModelId;n&&n.resolve(t.result.result),t.result.modelId===i&&e.$actionAddIntersectedDataToSense.dispatch(t.result.result)})),t.failed.every((function(t,r){e._getParamModelIntersectedCallback.forEach((function(e){e.reject(new Error("load json error!"))}))})),t.started.produce(e.$reducerState,(function(e,t){e.intersectedLoading=eh.LOADING})),t.done.produce(e.$reducerState,(function(e,t){e.intersectedLoading=eh.SUCCESS,e.intersectedResult=t.result.result})),t.failed.produce(e.$reducerState,(function(e,t){e.intersectedLoading=eh.FAIL}))})),e.$actionAddIntersectedDataToSense=e.unitCreator.sync((function(t){t.every((function(t,r){var n=r.core,i=n.fittingDesign,o=n.pad,A=e.state.state.intersectedVisible,a=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),s=a.intersectedColor,u=a.intersectedBodyColor,c=a.intersectedThroughColor,g=a.grooveIntersectedColor,h=a.grooveIntersectedBodyColor;i.setIntersects([]);var p=t.option,d=void 0===p?{}:p,I=t.intersectedGroups,y=Object(Ot.map)(I,(function(e){var t=!0===d.references?1:0,r=e.intersecteds[t],n=r["@type"],i=e.intersectType;if(void 0!==d.plankFaceIds){var A=Wh(r)?null:r.plankFaceId;if(!d.plankFaceIds.includes(A))return!1}var a=o.findModelOrAssemblyModelById(r.linkedModelId);if(a){var p=gi(e,r,a),I=new Map([[f.BOTH_PLANK,new Map([[l.FACE,s],[l.SHELL,u],[l.THROUGH_SHELL,c]])],[f.PLANK_FURNITURE,new Map([[l.FACE,g],[l.SHELL,h]])]]).get(i).get(n);return p.setViewColor(I),p}})).filter((function(e){return!!e}));i.setIntersects(y),A||r.kaf.invisibleManager.hide("scene3d",gh,y.map((function(e){return e.id})))}))})),e.$actionToggleShowIntersected=e.unitCreator.sync((function(t){t.latest((function(e,t){var r=t.core.fittingDesign;e?t.kaf.invisibleManager.display("scene3d",gh,r.getIntersects().map((function(e){return e.id}))):t.kaf.invisibleManager.hide("scene3d",gh,r.getIntersects().map((function(e){return e.id})))})),t.produce(e.$reducerState,(function(e,t){e.intersectedVisible=t}))})),e.toggleShowIntersectGroupData=function(t){var r=e.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");e.$actionAddIntersectedDataToSense.dispatch(ad(ad({},r),{},{option:t}))},e}return t=a,(r=[{key:"getParamModelIntersectedData",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=my().viewParamModel.state.state.currModelId,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r:A,u=ud(n,["timeout","modelId"]),c=Hh(o),this.$actionLoadParamModelIntersectedData.started.dispatch(ad(ad({modelId:a},u),{},{defer:c})),this._getParamModelIntersectedCallback.push(c),l=function(){var e=g._getParamModelIntersectedCallback.indexOf(c);g._getParamModelIntersectedCallback.splice(e,1)},e.abrupt("return",c.promise.then((function(e){return l(),e})).catch((function(e){return l(),Promise.reject(e)})));case 7:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){od(o,r,n,A,a,"next",e)}function a(e){od(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&ld(t.prototype,r),n&&ld(t,n),a}(kh);function Id(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Id(Object(r),!0).forEach((function(t){Cd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Id(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Cd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ed(e,t){var r=t.x/2,n=t.y/2,i=t.z/2,o=[{x:-r,y:-n,z:i},{x:r,y:-n,z:i},{x:r,y:n,z:i},{x:-r,y:n,z:i}],A=o.map((function(e){return yd(yd({},e),{},{z:-e.z})}));switch(e){case 0:return o;case 1:return[o[0],A[0],A[3],o[3]];case 2:return[o[0],A[0],A[1],o[1]];case 3:return[o[1],A[1],A[2],o[2]];case 4:return[o[2],A[2],A[3],o[3]];case 5:return A}return[]}function Bd(e){return(Bd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function md(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Qd(e,t){return(Qd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Sd(e);if(t){var i=Sd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _d(this,r)}}function _d(e,t){return!t||"object"!==Bd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Sd(e){return(Sd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wd={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},Dd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qd(e,t)}(o,e);var t,r,n,i=bd(o);function o(){var e;return vd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{},defaultConfig:wd}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateDefaultOption=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.defaultConfig=Object(Ot.extend)({},e.defaultConfig,t)}))})),e.$actionUpdateHintOption=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setDefaultHintConfig",value:function(e){this.$actionUpdateDefaultOption.dispatch(e)}},{key:"setModelHint",value:function(e){var t=this,r=Object(Ot.mapValues)(e,(function(e){return function(e,t){var r={};return Object(Ot.isObject)(e.hintOutline)?r.hintOutline=e.hintOutline:!0===e.hintOutline&&(r.hintOutline=t.outline),e.hintPlankFace&&e.hintPlankFace.length&&(r.hintPlankFace=e.hintPlankFace.map((function(e){var r="color"in e?e:t.plankFace,n=r.color,i=r.opacity;return Object(Ot.isArray)(e.plankFaceId)?e.plankFaceId.map((function(e){return{color:n,opacity:i,plankFaceId:e}})):{plankFaceId:e.plankFaceId,color:n,opacity:i}})).flat()),r}(e,t.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(e){var t=e?Object(Ot.omit)(this.state.state.option,e):{};this.setModelHint(t)}},{key:"rerenderToSense",value:function(){var e=this.stateManager.core,t=e.fittingDesign,r=e.pad,n=this.state.state.option,i=Object(Ot.map)(n,(function(e,t){var n=r.findModelOrAssemblyModelById(t);if(n)return function(e,t){var r={linkModel:t};if(e.hintPlankFace&&e.hintPlankFace.length){var n=t.getSize();r.plankFaces=e.hintPlankFace.map((function(e){var t=Fn(e.plankFaceId,je.a).mul(.1),r=Ed(e.plankFaceId,n).map((function(e){var r=new je.a(e).add(t);return{x:r.x,y:r.y,z:r.z}}));return yd(yd({},e),{},{points:r})}))}if(e.hintOutline&&(r.hintOutline=e.hintOutline),r.plankFaces||r.hintOutline)return new bn(r)}(e,n)})).filter((function(e){return!!e}));t.setPlankFaceHintModels(i)}}])&&md(t.prototype,r),n&&md(t,n),o}(kh);function Rd(e){return(Rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Md(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Pd(e,t){return(Pd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Td(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Od(e);if(t){var i=Od(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Fd(this,r)}}function Fd(e,t){return!t||"object"!==Rd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Od(e){return(Od=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ld=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pd(e,t)}(o,e);var t,r,n,i=Td(o);function o(){var e;return Md(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,intersectedThroughColor:9498256,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:De,holeOpacity:1,grooveOpacity:1}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSenseSetting=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){t.renderIgnoreCategory&&(t.renderIgnoreCategory=Object(Ot.castArray)(t.renderIgnoreCategory)),Object(Ot.extend)(e,t)}))})),e}return t=o,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&xd(t.prototype,r),n&&xd(t,n),o}(kh);function kd(e){return(kd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ud(e,t){return(Ud=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Yd(e);if(t){var i=Yd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Vd(this,r)}}function Vd(e,t){return!t||"object"!==kd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yd(e){return(Yd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ud(e,t)}(o,e);var t,r,n,i=jd(o);function o(){var e;return Nd(this,o),(e=i.apply(this,arguments)).fittingDesignSense=e.partialCreator.create(Tp),e.intersected=e.partialCreator.create(dd),e.senseSetting=e.partialCreator.create(Ld),e.fittingModel=e.partialCreator.create(nd),e.plankFaceHint=e.partialCreator.create(Dd),e.fittingHint=e.partialCreator.create(jp),e}return t=o,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&Gd(t.prototype,r),n&&Gd(t,n),o}(_i.AXR),Kd=r(718),qd=r.n(Kd);function Jd(e){return(Jd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Xd(e,t){return(Xd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=eI(e);if(t){var i=eI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $d(this,r)}}function $d(e,t){return!t||"object"!==Jd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function eI(e){return(eI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xd(e,t)}(o,e);var t,r,n,i=Zd(o);function o(){return Wd(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({type:v.ATTRIBUTE,attr:"isHidden"},this.isHidden,e),this.isHidden=e}}])&&zd(t.prototype,r),n&&zd(t,n),o}(ce);function rI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function nI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rI(Object(r),!0).forEach((function(t){iI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function iI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var oI={x:0,y:0,z:0},AI={x:0,y:0,z:0};function aI(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,i=t.category,o=t.origin,A=new tI,a=!(e instanceof mt)||e.isRoot(),s=n||a?e:e.getRoot(),u=s instanceof mt;A.id=s.id,A.isRoot=!u||s.isRoot(),A.isHidden=!!s.getInvisible();var c=b.ASSEMBLY;if(u?c=b.COMMON:e.isTemplateAssembly()&&(c=b.TEMPLATE_ASSEMBLY),A.modelType=c,A.position=A.isRoot?oI:s.getPosition(),A.rotation=A.isRoot?AI:s.getRotation(),A.size="function"==typeof s.getScaledSize?s.getScaledSize():s.getSize(),A.params=uI(s),A.category=i||s.getCategory().categoryId,u){var l=s.getModel();A.productId=null==l?void 0:l.obsBrandGoodId}return n&&(A.root=n),A.isRoot&&(A._origin=o),A.children=(u?s.getChildren():s.getParamModels()).map((function(e){return aI(e,t,r,n||A)})),A.accessories=(u?s.getAccessories():[]).map((function(e){return aI(e,t,r,n||A)})),r.set(A.id,A),s!==e&&r.has(e.id)?r.get(e.id):A}function sI(e,t){var r=e.isRoot?e:e.root;if(!r)return{};var n=r._changeMap,i=t.getUnSafeParamModelFromParamModelLite(r);if(!i)return{};var o=i.getCustom(),A=n.cloned;return A&&(i=i.clone(!1)),i=function e(t,r,n,i){var o=t._changeMap;if(o.cloned&&o.deleted)return;if(o.deleted)return n.dispose(),n;var A=o.update,a=void 0===A?[]:A,s=o.addNodes,u=void 0===s?[]:s,c=i?nI({},i):{parentModelLite:t,parentModel:n,rootModelLite:t,rootModel:n};a.forEach((function(e){if(e.type===v.ATTRIBUTE)switch(e.attr){case"position":n.setPosition(t.getPosition());break;case"rotate":n.setRotation(t.getRotation());break;case"isHidden":n.setInvisible(t.getHidden()),function(e){var t=e.getInvisible();my().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===e.id&&r.setVisible(!t)}))}(n)}if(e.type===v.STORE){var i=n.getParamStore().getParam(e.attr),o=t.getParam(e.attr);if(i&&o){var A=o.getValue();[jn.ParamType.MATERIAL,jn.ParamType.SHAPE].includes(i.getType())&&(A=r.getUnSafeObsBrandGoodToBrandGoodId(A)),A&&i.setValue(A),o.getPrimitiveOverride()!==i.getPrimitiveOverride()&&i.setPrimitiveOverride(o.getPrimitiveOverride())}}})),u.forEach((function(i){var o=i.type,A=i.linkId,a=(o===Q.CHILD?t.getChild():t.getAccessory()).find((function(e){return e.id===A}));if(a){var s=r.getUnSafeParamModelFromParamModelLite(a);s&&((a._changeMap.cloned||a._origin!==C.SENSE)&&(s=s.clone(!1)),o===Q.CHILD?(s.setIsAppend(!0),s.setAppendType(qd.a.CENTER),n.addChild(s)):n.addAccessory(s),e(a,r,s,nI(nI({},c),{},{parentModel:n,parentModelLite:t})),(a._changeMap.cloned||a._origin!==C.SENSE)&&s.assignUniqueId())}}));var l=function(i){return function(o){if(!u.some((function(e){return e.type===i&&e.linkId===o.id}))){var A=i===Q.ACCESSORY?n.getAccessories():n.getChildren(),a=o._changeMap.originId||o.id,s=A.find((function(e){return e.id===a}));s&&e(o,r,s,nI(nI({},c),{},{parentModel:n,parentModelLite:t}))}}};return t.getChild().forEach(l(Q.CHILD)),t.getAccessory().forEach(l(Q.ACCESSORY)),n}(r,t,i),A&&i&&i.assignUniqueId(),{create:A,custom:o,model:i}}function uI(e){var t=new Map;return e.getParamStore().forEach((function(e,r){t.set(r,function(e){var t=new ne;if(t.data={type:e.getType(),displayName:e.getDisplayName(),name:e.getName(),value:e.getValue(),max:e.getMax(),min:e.getMin(),editable:e.getEditable(),optionValues:e.getOptionValues(),recommendValues:e.getRecommendValues(),primitiveOverride:e.getPrimitiveOverride(),step:e.getStep()},[_.MATERIAL,_.SHAPE].includes(t.getType())){var r=e.getProduct();t.data.value=r?r.obsBrandGoodId:""}return t}(e))})),t}var cI=r(125),lI=r.n(cI),gI={maxAge:6e5,max:20},fI=(ah.SHADING,ah.OUTLINE_WITH_SHADING,ah.TRANSLUCENT,ah.OUTLINE_AND_TRANSLUCENT,[Ve.ParamModelType.PARAM_ENTITY,Ve.ParamModelType.PARAM_FURNITURE,Ve.ParamModelType.PARAM_PRIMITIVE]);function hI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hI(Object(r),!0).forEach((function(t){dI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function dI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function II(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function yI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){II(o,n,i,A,a,"next",e)}function a(e){II(o,n,i,A,a,"throw",e)}A(void 0)}))}}lI()(function(){var e=yI(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=uc(),e.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:t});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),pI({promise:!0},gI));function CI(){return(CI=yI(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,uc().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function EI(){return(EI=yI(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,uc().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var BI=lI()((function(e){return CI.apply(this,arguments)}),pI(pI({},gI),{},{promise:!0})),vI=lI()((function(e){return EI.apply(this,arguments)}),pI(pI({},gI),{},{promise:!0}));function mI(e){return function(e){if(Array.isArray(e))return QI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return QI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return QI(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function QI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function _I(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var SI=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cached=new Map}var t,r,n,i,o;return t=e,(r=[{key:"setProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(t);r||(r=new Map,this.cached.set(t,r)),r.set(e.brandGoodId,e.obsBrandGoodId),r.set(e.obsBrandGoodId,e.brandGoodId)}},{key:"getToggledBrandGood",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(t=this.cached.get(r))||void 0===t?void 0:t.get(e)}},{key:"removeCachedModel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(e)}},{key:"safeGetToggleBrandGood",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u=this,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(Ot.castArray)(t),i=[],o=[],A=new Map,n.forEach((function(e){var t=u.getToggledBrandGood(e,r);t?A.set(e,t):/^[0-9]$/.test(e.toString())?o.push(e):i.push(e)})),a=function(e){return[].concat(mI(e.hardwares||[]),mI(e.textures||[]),mI(e.virtualModels||[]),mI(e.paramModelProducts||[]),mI(e.moldings||[]))},!i.length){e.next=12;break}return e.next=10,BI(i).then(a);case 10:e.sent.forEach((function(e){u.setProduct(e,r)}));case 12:if(!o.length){e.next=17;break}return e.next=15,vI(o).then(a);case 15:e.sent.forEach((function(e){u.setProduct(e,r)}));case 17:return[].concat(i,o).forEach((function(e){var t=u.getToggledBrandGood(e,r);t&&A.set(e,t)})),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){bI(o,r,n,A,a,"next",e)}function a(e){bI(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&_I(t.prototype,r),n&&_I(t,n),e}();function wI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function DI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){wI(o,n,i,A,a,"next",e)}function a(e){wI(o,n,i,A,a,"throw",e)}A(void 0)}))}}function RI(e){return function(e){if(Array.isArray(e))return MI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return MI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return MI(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var TI=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new SI;xI(this,e),this.callback=t,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var t,r,n,i;return t=e,(r=[{key:"getParamModelFromId",value:function(e){if(this.cached.has(e))return this.cached.get(e);var t=this.callback(e);return t?(this.cached.set(e,t),t):void 0}},{key:"getUnSafeParamModel",value:function(e){return this.cached.get(e)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(e){return this.brandGoodsTranslate.getToggledBrandGood(e)}},{key:"addParamModelLite",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=this.models).push.apply(e,RI(r.map((function(e){return e.root||e}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(e){var t,r=e.root||e;switch(e._origin||r._origin){case C.BRANDGOOD:case C.CATEGORY:break;case C.SENSE:var n=r._changeMap.originId||r.id;t=this.getUnSafeParamModel(n)}if(!t||r===e)return t;for(var i,o=e._changeMap.originId||e.id,A=[t];i=A.pop();){if(i.id===o)return i;A.push.apply(A,RI(i.getChildNodes()))}}},{key:"attach",value:(i=DI(s.a.mark((function e(){var t,r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(i=t.pop())){e.next=18;break}A=(o=i)._changeMap,a=o._origin,e.t0=a,e.next=e.t0===C.SENSE?8:e.t0===C.CATEGORY||e.t0===C.BRANDGOOD||e.t0===C.TEMPLATE_ID?11:12;break;case 8:return u=A.originId||i.id,r.modelIds.push(u),e.abrupt("break",12);case 11:return e.abrupt("break",12);case 12:if(!A.deleted){e.next=14;break}return e.abrupt("continue",3);case 14:A.update&&A.update.forEach((function(e){if(i&&e.type===v.STORE&&i.hasParam(e.attr)){var t=i.getParam(e.attr);t&&[_.MATERIAL,_.SHAPE].includes(t.getType())&&t.getValue()&&n.push(t.getValue())}})),t.push.apply(t,RI(i.getChild()).concat(RI(i.getAccessory()))),e.next=3;break;case 18:return e.next=20,Promise.allSettled(RI(Object(Ot.uniq)(r.modelIds).map(function(){var e=DI(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.getParamModelFromId(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 20:return e.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&PI(t.prototype,r),n&&PI(t,n),e}(),FI=r(732);function OI(e){return(OI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function LI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function NI(e,t,r){return(NI="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=VI(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function GI(e,t){return(GI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function UI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=VI(e);if(t){var i=VI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jI(this,r)}}function jI(e,t){return!t||"object"!==OI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function VI(e){return(VI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var YI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&GI(e,t)}(o,e);var t,r,n,i=UI(o);function o(){var e;return LI(this,o),(e=i.apply(this,arguments)).$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(Rh),e.next=3,Object(uh.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==th.SUCCESS){e.next=13;break}return e.next=6,Object(uh.put)(this.$actionSetCamera.message(!0));case 6:return e.next=9,Object(uh.take)(this.$actionSyncCamera.messageType());case 9:return e.next=11,Object(uh.put)(this.$actionSetCamera.message(!1));case 11:e.next=6;break;case 13:case"end":return e.stop()}}),e,this)})))})),e.$actionSyncCamera=e.unitCreator.sync((function(e){})),e.$actionSetCamera=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.core.design.getCustom(),i=n.getParamModels(),o=n.getParamModelAssemblies(),(A=r.scene3D).updateEnableCameraAnimation(!1),a=i.length?Object(FI.computeAssemblyBox)(i.map((function(e){return e.getBox3()})),i[0].getMatrix4()):Object(FI.computeAssemblyBox)(o.map((function(e){return e.getBox3()})),o[0].getMatrix4()),u=jh(a),A.updateInitCameraAttributes(u),t?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 9:case"end":return e.stop()}}),e)})))})),e}return t=o,(r=[{key:"init",value:function(){NI(VI(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&kI(t.prototype,r),n&&kI(t,n),o}(kh);function HI(e){return(HI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function KI(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=JI(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function qI(e){return function(e){if(Array.isArray(e))return WI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||JI(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function JI(e,t){if(e){if("string"==typeof e)return WI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?WI(e,t):void 0}}function WI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function XI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){zI(o,n,i,A,a,"next",e)}function a(e){zI(o,n,i,A,a,"throw",e)}A(void 0)}))}}function ZI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $I(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ey(e,t,r){return(ey="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=iy(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function ty(e,t){return(ty=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ry(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=iy(e);if(t){var i=iy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ny(this,r)}}function ny(e,t){return!t||"object"!==HI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function iy(e){return(iy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ty(e,t)}(u,e);var t,r,n,i,o,A,a=ry(u);function u(){var e;return ZI(this,u),(e=a.apply(this,arguments)).cameraController=e.partialCreator.create(YI),e.state=e.stateCreator.create({renderMode:LA.RenderMode.SHADING,translucent:!1,selectable:!0}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionMergeState=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){Object.assign(e,t)}))})),e.$actionToggleRenderMode=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=LA.RenderMode.SHADING,i=!1,e.t0=t.mode,e.next=e.t0===ah.SHADING?5:e.t0===ah.OUTLINE_WITH_SHADING?7:e.t0===ah.TRANSLUCENT?9:e.t0===ah.OUTLINE_AND_TRANSLUCENT?11:14;break;case 5:return n=LA.RenderMode.SHADING,e.abrupt("break",14);case 7:return n=LA.RenderMode.OUTLINE_WITH_SHADING,e.abrupt("break",14);case 9:return i=!0,e.abrupt("break",14);case 11:return n=LA.RenderMode.OUTLINE_WITH_SHADING,i=!0,e.abrupt("break",14);case 14:return e.next=16,Object(uh.put)(this.$actionMergeState.message({renderMode:n,translucent:i}));case 16:NB().viewer.toggleShowModelOutline(n===LA.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),NB().viewer.triggerReducer(),this.emit(oh.renderModeChange);case 20:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderBorder=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?LA.RenderMode.OUTLINE_WITH_SHADING:LA.RenderMode.SHADING,e.next=3,Object(uh.put)(this.$actionMergeState.message({renderMode:n}));case 3:NB().viewer.toggleShowModelOutline(n===LA.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),this.emit(oh.renderModeChange);case 6:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderTranslucent=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(uh.put)(this.$actionMergeState.message({translucent:t}));case 2:NB().viewer.triggerReducer(),this.emit(oh.renderModeChange);case 4:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleSelectModel=e.unitCreator.sync((function(e){e.every(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(uh.put)(this.$actionMergeState.message({selectable:t}));case 2:case"end":return e.stop()}}),e,this)})))})),e}return t=u,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var e=this;ey(iy(u.prototype),"init",this).call(this),NB().viewer.registerReducer((function(t,r,n){n.opacity=e.state.state.translucent?Ah.translucentModel:Ah.opaqueModel})),NB().viewer.registerReducer((function(e,t,r){r.visible=!e.getInvisible()}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(e){return!e.isAppendHardware}))}},{key:"getAllCustomModels",value:(A=XI(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getAllParamModels(),e.abrupt("return",t.map((function(e){return aI(e,{origin:C.SENSE})})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=XI(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(t))){e.next=3;break}return e.abrupt("return",aI(r,{origin:C.SENSE}));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=XI(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t,n=this.getStateManager().core.pad,(i=new TI(n.findModelOrAssemblyModelById)).addParamModelLite.apply(i,qI(r)),e.next=6,i.attach();case 6:return e.next=8,Promise.all(r.map((function(e){return sI(e,i)})));case 8:o=e.sent,A=[],a=[],u=KI(o);try{for(u.s();!(c=u.n()).done;)(l=c.value).create&&l.custom&&l.model&&A.push(l),!l.create&&l.model&&a.push(l.model)}catch(e){u.e(e)}finally{u.f()}(A.length||a.length)&&A.length&&A.forEach((function(e){var t;null===(t=e.custom)||void 0===t||t.addParamModels(e.model)})),NB().viewer.triggerReducer();case 15:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})}])&&$I(t.prototype,r),n&&$I(t,n),u}(_i.AXR);function Ay(e){return(Ay="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ay(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ay(Object(r),!0).forEach((function(t){uy(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ay(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function uy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ly(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ly(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ly(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function gy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function hy(e,t,r){return(hy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=yy(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function py(e,t){return(py=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=yy(e);if(t){var i=yy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Iy(this,r)}}function Iy(e,t){return!t||"object"!==Ay(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yy(e){return(yy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cy={rawSelected:[],selectedData:[],selectedDataV2:[]},Ey=function(e,t){var r=e.entityId+"%%"+e.entityType.toString(),n=t.entityId+"%%"+t.entityType.toString();return r>n?1:r===n?0:-1},By=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&py(e,t)}(o,e);var t,r,n,i=dy(o);function o(){var e;return gy(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create(Cy).mutable(),e.onModelsChange=function(){var t=e.selected.map((function(t){return e.stateManager.core.pad.findModel(t.entityId)})).filter((function(e){return!!e})),r=e.state.state.selectedData;t.length===r.length&&Object(Ot.unzip)([t,r]).every((function(e){var t=cy(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return sy(sy({},e),{},{selectedData:t})})),e.emit(o.EVENT_SELECT_CHANGED))},e.onModelChangeV2=function(){setTimeout((function(){e.onModelsChange()}),0);var t=e.stateManager.core,r=t.pad,n=t.fittingDesign,i=n.getFittings(),A=n.getGrooveFittings(),a=e.rawSelected.map((function(e){switch(e.entityType){case dA:return r.findModelEx(e.entityId,du);case pA:return r.findParamModelAssembly(e.entityId);case ch:return i.find((function(t){return t.id===e.entityId}));case lh:return A.find((function(t){return t.id===e.entityId}));default:return}})).filter((function(e){return!!e})),s=e.state.state.selectedDataV2;s.length===a.length&&Object(Ot.unzip)([s,a]).every((function(e){var t=cy(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return sy(sy({},e),{},{selectedDataV2:a})})),e.emit(o.EVENT_SELECT_CHANGED_V2))},e._onSelectionChange=function(){e.onStateChange()},e}return t=o,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(e){this.selectionStateManager.select(e)}},{key:"unSelect",value:function(e){this.selectionStateManager.unSelect(e)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){hy(yy(o.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),hy(yy(o.prototype),"release",this).call(this)}},{key:"onEnable",value:function(e){hy(yy(o.prototype),"onEnable",this).call(this,e),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Wa.UPDATE,this._onSelectionChange),this.stateManager.core.pad.on(Iu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),Tt.on(Mt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(e){this.stateManager.core.pad.off(Iu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),Tt.off(Mt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return Cy})),this.selectionStateManager.off(Wa.UPDATE,this._onSelectionChange),this.rawSelected=[],this.selected=[],hy(yy(o.prototype),"onDisable",this).call(this,e)}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value;if(e.sort(Ey),this.rawSelected!==e){this.rawSelected=e;var t=this.resolveSelected(e)||[];this.selectedIsChanged(this.selected,t)&&(this.selected=t),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(e){return e.filter((function(e){return e.entityType===dA}))}},{key:"selectedIsChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),n=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),i=0,o=n.length;i<o;++i)if(r[i]!==n[i])return!0;return!1}}])&&fy(t.prototype,r),n&&fy(t,n),o}(_i.AXR);By.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",By.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var vy={entry:Rh,scene:oy,select:By,fittingDesign:Hd,baseDesignInfo:Kf,viewParamModel:Ip};function my(){return NB().axr.axrs}var Qy=Object(hA.getConnector)(),by=Qy.connect,_y=Qy.setRootState;function Sy(e,t,r){return by((function(){return e(my(),NB().getStateManager())}),t,r)}var wy=r(1133),Dy=r.n(wy);function Ry(e){return(Ry="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function My(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Py(e,t,r){return t&&xy(e.prototype,t),r&&xy(e,r),e}function Ty(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fy(e,t)}function Fy(e,t){return(Fy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ky(e);if(t){var i=ky(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ly(this,r)}}function Ly(e,t){return!t||"object"!==Ry(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ky(e){return(ky=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ny=Symbol("layout"),Gy=Sy((function(e){return{status:e.entry.state}}),(function(e){return{status:e.status.main}}),function(e){Ty(r,e);var t=Oy(r);function r(){return My(this,r),t.apply(this,arguments)}return Py(r,[{key:"render",value:function(){return this.state.views.map((function(e){return e.content}))}}]),r}(Si.MountPoint)),Uy=function(e){Ty(r,e);var t=Oy(r);function r(){return My(this,r),t.apply(this,arguments)}return Py(r,[{key:"render",value:function(){return Di.a.createElement(Gy,{mountPointId:Ny})}}]),r}(Di.a.PureComponent);function jy(e){return(jy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ky(e,t)}function Ky(e,t){return(Ky=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Wy(e);if(t){var i=Wy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jy(this,r)}}function Jy(e,t){return!t||"object"!==jy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wy(e){return(Wy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zy=Sy((function(e,t){return{scene3D:t.scene3D}}),(function(e){var t=e.scene3D;return{cameraType:t.cameraType,cameraAttributes:t.cameraAttributes,initCameraAttributes:t.initCameraAttributes,perspectiveCameraMode:t.perspectiveCameraMode,perspectiveCameraFov:t.perspectiveCameraFov,groundGridConfig:t.groundGridConfig,enableCameraAnimation:t.enableCameraAnimation,renderMode:t.renderMode}}),function(e){Hy(r,e);var t=qy(r);function r(){return Yy(this,r),t.apply(this,arguments)}return r}(Si.Scene3D)),Xy=Sy((function(){return{}}),(function(){return{}}),function(e){Hy(o,e);var t,r,n,i=qy(o);function o(){var e;return Yy(this,o),(e=i.apply(this,arguments)).onInit=function(e){var t=e.viewer.config;t.autoInstance.enabled.set(!0),t.popMeshMerge.enabled.set(!0),t.background.active.set(LA.BackgroundMode.SolidColorBackground),t.background.solid.color.set(new LA.Color(ih.sceneBG)),t.ground.enabled.set(!1),t.postEffect.planarShadow.enabled.set(!1),t.postEffect.taa.enabled.set(!1),t.staticFrameCache.enabled.set(!1),t.isExtraCopyBeforeScreenEnabled.set(!1),t.postEffect.ao.enabled.set(!1),NB().viewer.onScene3DInit(e)},e.onGrabStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateGrabing(!0)},e.onGrabEnd=function(){e.props.rootState.scene3D.updateGrabing(!1)},e.onZoomStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateZooming(!0)},e.onZoomEnd=function(){e.props.rootState.scene3D.updateZooming(!1)},e.onCameraAnimationEnd=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1)},e}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.rootState.scene3D,r=e.containerId,n=e.size;return Di.a.createElement(zy,{onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:t.updateScale,onCameraAttributesChange:t.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd})}}])&&Vy(t.prototype,r),n&&Vy(t,n),o}(Di.a.PureComponent));function Zy(e){return(Zy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tC(e,t){return(tC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=iC(e);if(t){var i=iC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nC(this,r)}}function nC(e,t){return!t||"object"!==Zy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function iC(e){return(iC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oC=Sy((function(e,t){return{scene3D:t.scene3D}}),(function(e){return{size:e.scene3D.size}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tC(e,t)}(o,e);var t,r,n,i=rC(o);function o(){var e;return $y(this,o),(e=i.apply(this,arguments)).rootRef=Di.a.createRef(),e.updateLayout=Object(Ot.throttle)((function(){var t=e.rootRef.current;if(t){var r=t.getBoundingClientRect();e.props.rootState.scene3D.updateSize(new _r.a(r.width,r.height))}}),200),e}return t=o,(r=[{key:"componentDidMount",value:function(){this.updateLayout(),window.addEventListener("resize",this.updateLayout)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateLayout),this.updateLayout.cancel()}},{key:"render",value:function(){var e=this.props,t=e.size,r=e.className;return Di.a.createElement("div",{ref:this.rootRef,id:nh.SCENE_ID,className:r},Di.a.createElement(Xy,{containerId:nh.SCENE_ID,size:new u.Vector2d(t.x,t.y)}))}}])&&eC(t.prototype,r),n&&eC(t,n),o}(Di.a.PureComponent));r(2093);function AC(e){return(AC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uC(e,t){return(uC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function cC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=gC(e);if(t){var i=gC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return lC(this,r)}}function lC(e,t){return!t||"object"!==AC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gC(e){return(gC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fC=Sy((function(){return{}}),(function(){return{}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uC(e,t)}(o,e);var t,r,n,i=cC(o);function o(){return aC(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return Di.a.createElement(Si.ViewMounter,{mountPointId:Ny},Di.a.createElement(oC,{key:"s3",className:Dy.a.scene3D}))}}])&&sC(t.prototype,r),n&&sC(t,n),o}(Di.a.PureComponent));function hC(e,t){return(hC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=IC(e);if(t){var i=IC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return dC(this,r)}}function dC(e,t){return!t||"object"!==yC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function IC(e){return(IC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function yC(e){return(yC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var CC,EC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":yC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},BC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":yC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},vC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hC(e,t)}(r,e);var t=pC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=ch,n.entityId=e.id,n}return r}(Si.Entity);vC=EC([Object(Si.provideEntityAPIs)([new Si.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model.type;if(t===c.GROOVE)return mC(e);if(t===c.HOLE)return QC(e)}(e)},update:function(t){var r=e.$model,n=r.position,i=r.visible;t.position.set(n.x,n.y,n.z),t.visible=i,t.material&&(t.material.visible=i)}}})),new Si.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),BC("design:paramtypes",["function"==typeof(CC=void 0!==Qr&&Qr)?CC:Object])],vC);var mC=function(e){var t=e.$model,r=t.position,n=t.size,i=t.rotate,o=t.visible,A=t.viewColor,a=t.opacity,s=new LA.BoxGeometry(n.x,n.y,n.z),u=new LA.MeshBasicMaterial({color:A,opacity:a,visible:o,transparent:!0}),c=new LA.Mesh(s,u);return c.position.set(r.x,r.y,r.z),c.rotation.set(i.x,i.y,i.z),c.visible=o,c},QC=function(e){var t=e.$model,r=t.position,n=t.visible,i=t.rotate,o=t.height,A=t.viewColor,a=t.opacity,s=t.fittingData.diameter/2,u=new LA.CylinderGeometry(s,s,o),c=new LA.MeshBasicMaterial({color:A,opacity:a,visible:n,transparent:!0}),l=new LA.Mesh(u,c);return l.position.set(r.x,r.y,r.z),l.rotation.set(i.x,i.y,i.z),l};function bC(e,t){if(e.length!==t.length)return[];for(var r=e.length,n=[],i=0;i<r-1;i++)n.push(e[i].x,e[i].y,e[i].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i+1].x,t[i+1].y,t[i+1].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z);return n}function _C(e){return function(e){if(Array.isArray(e))return SC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return SC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return SC(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wC(e,t){return(wC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function DC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=MC(e);if(t){var i=MC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return RC(this,r)}}function RC(e,t){return!t||"object"!==xC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function MC(e){return(MC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xC(e){return(xC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var PC,TC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":xC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},FC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":xC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},OC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wC(e,t)}(r,e);var t=DC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=lh,n.entityId=e.id,n}return r}(Si.Entity);function LC(e){var t=e.matrix,r=e.points,n=e.depth,i=e.color,o=e.side,A=e.position,a=e.opacity,s=new LA.LineBasicMaterial,u=new LA.MeshBasicMaterial({transparent:!0,opacity:a}),c=new LA.Mesh(void 0,u),l=new LA.Line(void 0,s),g=new LA.Group;return c.setAttribute("transparent-line-origin",!1),l.setAttribute("transparent-line-origin",!1),g.add(c),g.setAttribute("outline",!1),g.setAttribute("shadowCaster",!1),u.setValues({color:i,side:o}),g.applyMatrix(t),g.position.set(A.x,A.y,A.z),function(e){var t=e.area,r=e.outline,n=e.points,i=e.height,o=e.holes,A=!!r;if(!n||0===n.length)return;var a=n[0],s=new LA.Shape,u=A?new LA.Geometry:null;s.moveTo(a.x,a.y),n.forEach((function(e){s.lineTo(e.x,e.y),A&&u.vertices.push(new LA.Vector3(e.x,e.y,i))})),s.lineTo(a.x,a.y),o&&(s.holes=o);A&&(u.vertices.push(new LA.Vector3(a.x,a.y,i)),r.geometry&&r.geometry.dispose(),r.geometry=u);var c=new LA.ShapeGeometry(s);t.geometry&&t.geometry.dispose();t.geometry=c,t.position.set(0,0,i)}({area:c,points:r,height:n}),g}function kC(e){var t=new u.BBox3d;return[].concat(_C(e.getTopRenderPoints()),_C(e.getBottomRenderPoints())).forEach((function(e){t.addPoint(new u.Point3d(e))})),new Te.a(new je.a({x:t.width,y:t.height,z:t.depth}),new je.a(t.center),new je.a({x:0,y:0,z:0}))}function NC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GC(e,t){return(GC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function UC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=VC(e);if(t){var i=VC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jC(this,r)}}function jC(e,t){return!t||"object"!==YC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function VC(e){return(VC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function YC(e){return(YC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}OC=TC([Object(Si.provideEntityAPIs)([new Si.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=new LA.Group,r=e.pointToGlobalMatrix(),n=e.depth,i=e.viewColor,o=e.opacity,A=e.visible,a=void 0!==A&&A,s=e.path.getAllPolygonPoints(),c=new ke.a;c.fromString(r.toArray().join(","));var l=zh(c),g=Yn.a.decompose(c).position,f=LC({matrix:l,depth:0,points:s,color:i,side:LA.Side.FrontSide,position:g,opacity:o}),h=LC({matrix:l,depth:-n,points:s,color:i,side:LA.Side.BackSide,position:g,opacity:o}),p=[].concat(_C(s),[s[0]]),d=function(e){var t=e.matrix,r=e.side,n=e.position,i=e.color,o=e.opacity,A=new LA.MeshBasicMaterial({opacity:o,transparent:!0}),a=new LA.Mesh(new LA.BufferGeometry,A);if(A.setValues({side:r,color:i}),a.setAttribute("transparent-line-origin",!0),a.setAttribute("outline",!1),a.setAttribute("shadowCaster",!1),a.geometry instanceof LA.BufferGeometry){var s=bC(e.topPoints,e.bottomPoints);a.geometry.addAttribute("position",new LA.Float32BufferAttribute(s,3)),a.geometry.dispose()}return a.applyMatrix(t),a.position.set(n.x,n.y,n.z),a}({position:g,matrix:l,topPoints:p.map((function(e){return new u.Point3d(e.x,e.y,0)})),bottomPoints:p.map((function(e){return new u.Point3d(e.x,e.y,-n)})),color:i,side:LA.Side.DoubleSide,opacity:o});return t.add(f),t.add(h),t.add(d),[f,h,d,t].forEach((function(e){e.visible=a})),t}(e.$model)},update:function(t){var r=e.$model.visible;t.traverse((function(e){e.visible=r,e instanceof LA.Mesh&&e.material&&Object(Ot.castArray)(e.material).forEach((function(e){e.visible=r}))})),t.visible=r}}})),new Si.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:kC(this.$model)}}))]),FC("design:paramtypes",["function"==typeof(PC=void 0!==en&&en)?PC:Object])],OC);var HC,KC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":YC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},qC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":YC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},JC=Si.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,WC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&GC(e,t)}(o,e);var t,r,n,i=UC(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=hh,t.entityId=e.id,t}return t=o,(r=[{key:"createOutlineMesh",value:function(){var e=this.$model.hintOutline,t=e.color,r=e.opacity,n=this.$model.visible,i=function(e){var t=new LA.Geometry,r=e.getVertices().map((function(e){var t=e;return new LA.Vector3(t.x,t.y,t.z)}));e.getIndices().forEach((function(e){t.vertices.push(r[e.x],r[e.y])})),t.computeBoundingBox();var n=t.getBoundingBox().getCenter(new LA.Vector3);return t.vertices=t.vertices.map((function(e){return function(e,t){var r=t.clone().sub(e);return e.clone().add(r)}(n,e)})),t}(this.getGeometry()),o=new LA.LineBasicMaterial({color:t,opacity:r,transparent:!0}),A=new LA.LineSegments(i,o);return A.computeLineDistances(),A.renderOrder=999,A.setAttribute("outline",!1),A.setAttribute("transparent-line-origin",!0),A.setAttribute("shadowCaster",!1),A.visible=n,o.visible=n,A}},{key:"getGeometry",value:function(){var e,t=this.$model.linkModel;return e=t instanceof Ve.CoreParamModel?t.getConcatenatedBox3():t instanceof Qr?t.boundingBox:kC(t),JC(e)}}])&&NC(t.prototype,r),n&&NC(t,n),o}(Si.Entity),zC=WC=KC([Object(Si.provideEntityAPIs)([new Si.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createOutlineMesh()},update:function(t){var r=e.$model.visible;t.visible=r,t.material.visible=r}}}))]),qC("design:paramtypes",["function"==typeof(HC=void 0!==lr&&lr)?HC:Object])],WC);function XC(e){var t=new LA.BufferGeometry;if(t.index=new LA.BufferAttribute(new Uint16Array(e.indices),1),t.addAttribute("position",new LA.BufferAttribute(new Float32Array(e.vertices),3)),t.addAttribute("uv",new LA.BufferAttribute(new Float32Array(e.textures),2)),e.normals){var r=new Float32Array(e.normals);t.addAttribute("normal",new LA.BufferAttribute(r,3))}else t.computeVertexNormals();return t}function ZC(e,t){return(ZC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=tE(e);if(t){var i=tE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return eE(this,r)}}function eE(e,t){return!t||"object"!==rE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tE(e){return(tE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rE(e){return(rE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var nE,iE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":rE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},oE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":rE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},AE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ZC(e,t)}(r,e);var t=$C(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=gh,n.entityId=e.id,n}return r}(Si.Entity),aE=AE=iE([Object(Si.provideEntityAPIs)([new Si.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.geometryModel,n=t.viewColor,i=t.originPoints,o=new LA.Group,A=XC(r),a=new LA.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:LA.Side.DoubleSide}),s=new LA.Mesh(A,a);s.renderOrder=998,o.add(s),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&o.add(i.map((function(e){var t=new LA.Mesh(sE,uE);return t.position.set(e.x,e.y,e.z),t.renderOrder=999,t})));return o}(e)},update:function(){}}}))]),oE("design:paramtypes",["function"==typeof(nE=void 0!==In&&In)?nE:Object])],AE),sE=new LA.SphereBufferGeometry(3),uE=new LA.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function cE(e){return function(e){if(Array.isArray(e))return lE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return lE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function gE(e,t){return(gE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pE(e);if(t){var i=pE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hE(this,r)}}function hE(e,t){return!t||"object"!==dE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pE(e){return(pE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function dE(e){return(dE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var IE,yE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":dE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},CE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":dE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},EE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gE(e,t)}(r,e);var t=fE(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=fh,n.entityId=e.id,n}return r}(Si.Entity),BE=EE=yE([Object(Si.provideEntityAPIs)([new Si.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.plankFaces,n=t.linkModel,i=t.hintOutline,o=n.getConcatenatedMatrix(),A=new LA.Group;r&&r.forEach((function(e){var t=XC(fi(e,o)),r=new LA.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:e.color,opacity:e.opacity,transparent:!0,side:LA.Side.DoubleSide}),n=new LA.Mesh(t,r);n.renderOrder=998,A.add(n)}));if(i){var a=n.getSize(),s=n.getWireFrames();if(!s){var u=Ed(0,a),c=Ed(5,a);s=[].concat(cE(Object(Ot.zip)(u,[].concat(cE(u.slice(1)),[u[0]]))),cE(Object(Ot.zip)(c,[].concat(cE(c.slice(1)),[c[0]]))),cE(Object(Ot.zip)(u,c))).flat().map((function(e){return[e.x,e.y,e.z]})).flat()}var l=Object(Ot.chunk)(s,3).map((function(e){return new je.a(e[0],e[1],e[2]).applyMatrix4(o)})).map((function(e){return[e.x,e.y,e.z]})).flat(),g=new XA({points:l,visible:!0,color:parseInt(i.color.replace(/^#/,""),16)});A.add(g)}return A}(e)},update:function(){}}}))]),CE("design:paramtypes",["function"==typeof(IE=void 0!==bn&&bn)?IE:Object])],EE);function vE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mE(e,t){return(mE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_E(e);if(t){var i=_E(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bE(this,r)}}function bE(e,t){return!t||"object"!==SE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _E(e){return(_E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function SE(e){return(SE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var wE,DE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":SE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},RE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":SE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ME=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mE(e,t)}(o,e);var t,r,n,i=QE(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=ph,t.entityId=e.id,t}return t=o,(r=[{key:"createMesh",value:function(){var e=this.$model,t=e.points,r=e.viewColor,n=e.opacity,i=e.visible,o=e.linkModel,A=e.height;if(o){var a=t.map((function(e){return new u.Point3d(e.x,e.y,A/2)})),s=t.map((function(e){return new u.Point3d(e.x,e.y,-A/2)})),c=new LA.MeshBasicMaterial({opacity:n,transparent:!0}),l=new LA.Mesh(new LA.BufferGeometry,c);if(c.setValues({side:LA.Side.DoubleSide,color:r}),l.setAttribute("transparent-line-origin",!0),l.setAttribute("outline",!1),l.setAttribute("shadowCaster",!1),l.geometry instanceof LA.BufferGeometry){var g=bC(a,s);l.geometry.addAttribute("position",new LA.Float32BufferAttribute(g,3)),l.geometry.dispose()}var f=o.getConcatenatedMatrix(),h=new je.a(0,0,0).applyMatrix4(f);return l.position.set(h.x,h.y,h.z),l.visible=i,c.visible=i,l.rotation.setFromRotationMatrix(zh(f)),l}}}])&&vE(t.prototype,r),n&&vE(t,n),o}(Si.Entity),xE=ME=DE([Object(Si.provideEntityAPIs)([new Si.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createMesh()},update:function(t){var r=e.$model,n=r.visible,i=r.viewColor,o=r.opacity;t.visible=n,t.material.setValues({opacity:o,color:i}),t.material.visible=n}}}))]),RE("design:paramtypes",["function"==typeof(wE=void 0!==Tn&&Tn)?wE:Object])],ME);var PE=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getDesignDoc=t,this.createFittingEntities=Si.__unstable__.flatEntitiesCreator((function(e){return new vC(e)})),this.createIntersectEntities=Si.__unstable__.flatEntitiesCreator((function(e){return new aE(e)})),this.createGrooveFittingEntities=Si.__unstable__.flatEntitiesCreator((function(e){return new OC(e)})),this.createPlankFaceHintEntities=Si.__unstable__.flatEntitiesCreator((function(e){return new BE(e)})),this.careateFittingHintEntities=Si.__unstable__.flatEntitiesCreator((function(e){return new zC(e)})),this.careatePlankOutlineHintEntities=Si.__unstable__.flatEntitiesCreator((function(e){return new xE(e)})),this.getFittingEntities=function(){var e=r.getDesignDoc();return e?r.createFittingEntities(e.getFittings()):[]},this.getGrooveFittingEntities=function(){var e=r.getDesignDoc();return e?r.createGrooveFittingEntities(e.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var e=r.getDesignDoc();return e?r.createIntersectEntities(e.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var e=r.getDesignDoc();return e?r.createPlankFaceHintEntities(e.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var e=r.getDesignDoc();return e?r.careateFittingHintEntities(e.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var e=r.getDesignDoc();return e?r.careatePlankOutlineHintEntities(e.getPlankOutlineHintModels()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities]};function TE(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return FE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return FE(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function FE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function OE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var LE=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){t.pressMap.forEach((function(e,r){t.pressMap.set(r,!1)}))},this.onKeyDown=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)||t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!0)},this.onKeyUp=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)&&(t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!1))},this.active()}var t,r,n;return t=e,(r=[{key:"addKeyboardKeyListener",value:function(e){var t=this,r=Object(Ot.castArray)(e);if(r.some((function(e){return!t.isValidKeyboardKey(e)})))throw new Error("keyboard-key is invalid");var n,i=TE(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.pressMap.set(o,!1)}}catch(e){i.e(e)}finally{i.f()}}},{key:"removeKeyboardKeyListener",value:function(e){var t,r=TE(Object(Ot.castArray)(e));try{for(r.s();!(t=r.n()).done;){var n=t.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"active",value:function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mouseenter",this.resetPressStatus),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mouseenter",this.resetPressStatus),this.disabled=!0,this.resetPressStatus()}},{key:"checkIsPress",value:function(e){var t=this;return Object(Ot.castArray)(e).every((function(e){return t.pressMap.get(e)}))}},{key:"getKeyBoardKey",value:function(e){return e.key.toLowerCase()}},{key:"isPrevent",value:function(e){if(this.disabled)return!0;var t=e.target;if(!t)return!1;if("INPUT"===t.tagName){var r=t.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===t.tagName||"TEXTAREA"===t.tagName}},{key:"isValidKeyboardKey",value:function(e){return xe.includes(e)}}])&&OE(t.prototype,r),n&&OE(t,n),e}(),kE=new Map([[jn.ParamModelCategory.FRAME,[jn.ParamModelCategory.DRAWER,jn.ParamModelCategory.SWING_DOOR,jn.ParamModelCategory.PARAM_FURNITURE,jn.ParamModelCategory.FASCIA_BOARD,jn.ParamModelCategory.SPECIAL_FRAME,jn.ParamModelCategory.EMBED_FRAME_W,jn.ParamModelCategory.POLE_W,jn.ParamModelCategory.SEGMENT_DOOR_CONTAINER,jn.ParamModelCategory.BOARD,jn.ParamModelCategory.DRAWER,jn.ParamModelCategory.SPACE_GROUP,jn.ParamModelCategory.SINGLE_SLIDING_DOOR,jn.ParamModelCategory.FRAME,jn.ParamModelCategory.SLIDING_DOOR_BOARD,jn.ParamModelCategory.PARAM_FURNITURE_PART,jn.ParamModelCategory.SANITARY_COMPONENT,jn.ParamModelCategory.DOOR_LEAF,jn.ParamModelCategory.DECORATIVE_MOLDING_C,jn.ParamModelCategory.DECORATIVE_MOLDING_W,jn.ParamModelCategory.HANDS_FREE,jn.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[jn.ParamModelCategory.SHOWER_ROOM,[jn.ParamModelCategory.DRAWER,jn.ParamModelCategory.SWING_DOOR,jn.ParamModelCategory.PARAM_FURNITURE,jn.ParamModelCategory.FASCIA_BOARD,jn.ParamModelCategory.SPECIAL_FRAME,jn.ParamModelCategory.EMBED_FRAME_W,jn.ParamModelCategory.POLE_W,jn.ParamModelCategory.SEGMENT_DOOR_CONTAINER,jn.ParamModelCategory.BOARD,jn.ParamModelCategory.DRAWER,jn.ParamModelCategory.SPACE_GROUP,jn.ParamModelCategory.SINGLE_SLIDING_DOOR,jn.ParamModelCategory.FRAME,jn.ParamModelCategory.PARAM_FURNITURE_PART,jn.ParamModelCategory.SANITARY_COMPONENT,jn.ParamModelCategory.DOOR_LEAF,jn.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[jn.ParamModelCategory.DRAWER,jn.ParamModelCategory.SWING_DOOR,jn.ParamModelCategory.PARAM_FURNITURE,jn.ParamModelCategory.FASCIA_BOARD,jn.ParamModelCategory.SPECIAL_FRAME,jn.ParamModelCategory.EMBED_FRAME_W,jn.ParamModelCategory.BOARD,jn.ParamModelCategory.SPACE_GROUP,jn.ParamModelCategory.POLE_W,jn.ParamModelCategory.SINGLE_SLIDING_DOOR,jn.ParamModelCategory.SLIDING_DOOR_BOARD,jn.ParamModelCategory.DRAWER,jn.ParamModelCategory.RAIL,jn.ParamModelCategory.DOOR_LEAF]],[jn.ParamModelCategory.SLIDING_DOOR_C,[jn.ParamModelCategory.RAIL,jn.ParamModelCategory.SINGLE_SLIDING_DOOR]],[jn.ParamModelCategory.SPACE_GROUP,[jn.ParamModelCategory.DRAWER,jn.ParamModelCategory.SWING_DOOR,jn.ParamModelCategory.PARAM_FURNITURE,jn.ParamModelCategory.FASCIA_BOARD,jn.ParamModelCategory.SEGMENT_DOOR_CONTAINER,jn.ParamModelCategory.BOARD,jn.ParamModelCategory.SPECIAL_BOARD,jn.ParamModelCategory.SPACE_GROUP]],[jn.ParamModelCategory.SINGLE_SLIDING_DOOR,[jn.ParamModelCategory.SLIDING_DOOR_CORE,jn.ParamModelCategory.DOOR_WAIST_LINE]],[jn.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[jn.ParamModelCategory.SWING_DOOR]],[jn.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[jn.ParamModelCategory.BOARD]],[jn.ParamModelCategory.SWING_DOOR,[jn.ParamModelCategory.DOOR_CORE,jn.ParamModelCategory.DOOR_WAIST_LINE,jn.ParamModelCategory.DECORATIVE_MOLDING,jn.ParamModelCategory.BOARD]],[jn.ParamModelCategory.DRAWER,[jn.ParamModelCategory.DRAWER_PANEL,jn.ParamModelCategory.SWING_DOOR,jn.ParamModelCategory.BOARD]],[jn.ParamModelCategory.PARAM_FURNITURE,[jn.ParamModelCategory.FURNITURE_LEG]],[jn.ParamModelCategory.KADA,[jn.ParamModelCategory.BYOBU,jn.ParamModelCategory.BYOBU_FRAME,jn.ParamModelCategory.BYOBU_PANEL]]]);function NE(e){return function(e){if(Array.isArray(e))return GE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return GE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function UE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var jE=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=Qe.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new LE,this.memoGetHintModelLite=lI()((function(e){return t.isFittingLikeModel(e)?Hp(e):t.getParamModelLite(e)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var t,r,n;return t=e,(r=[{key:"isAccessory",value:function(e){var t;if(this.isAccessoryCache.has(e.id))return this.isAccessoryCache.get(e.id);var r=null===(t=null==e?void 0:e.getParent)||void 0===t?void 0:t.call(e),n=(kE.get(r?r.getCategory().getRoot():void 0)||[]).some((function(t){return e.getCategory().belongsTo(t)}));return this.isAccessoryCache.set(e.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(e,t){for(var r,n,i=this,o=[],A=t;A&&A!==e;)o.unshift(A),A=(null===(r=A.getParent)||void 0===r?void 0:r.call(A))||(null===(n=A.getAssembly)||void 0===n?void 0:n.call(A));return o.find((function(e){return i.isAccessory(e)}))||t}},{key:"getParamModelLite",value:function(e){var t=(e.isRoot()?e:e.getRoot()).getAssembly();return t?aI(e,{origin:C.SENSE},void 0,aI(t,{origin:C.SENSE})):aI(e,{origin:C.SENSE})}},{key:"topModelModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i,o,A,a=e.isRoot()?e:e.getRoot(),s=a.getAssembly(),u=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,c=!1;if(u&&(o=YB(u))&&!this.isFittingLikeModel(o)&&(u.entityType===dA?A=(A=o.isRoot()?o:o.getRoot()).getAssembly()||A:(c=!0,A=o),i=A===a||A===s),i){for(var l=!1,g=!1,f=o instanceof Ve.CoreParamModel?o.getParent():void 0,h=e;h;){if(h===o){l=!0;break}if(h===f){g=!0;break}h=(null===(r=h.getParent)||void 0===r?void 0:r.call(h))||(null===(n=h.getAssembly)||void 0===n?void 0:n.call(h))}if(t===be.CLICK)return l?o:g?this.getAccessoryAtFirstLevel(f,e):A instanceof Ve.CoreParamModelAssembly?(o.isRoot()?o:o.getRoot())===a?this.getAccessoryAtFirstLevel(a,e):a:this.getAccessoryAtFirstLevel(a,e);if(t===be.DB_CLICK)return l?c?a:this.getAccessoryAtFirstLevel(o,e):this.getAccessoryAtFirstLevel(a,e)}else{if(t===be.CLICK)return s||a;if(t===be.DB_CLICK)return s?a:this.getAccessoryAtFirstLevel(a,e)}}},{key:"accessoryModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i=e.isRoot()?e:e.getRoot(),o=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=o&&YB(o),a=!1;if(A&&!this.isFittingLikeModel(A)&&(a=(A.isRoot()?A:A.getRoot())===i),a){for(var s=!1,u=!1,c=null==A?void 0:A.getParent(),l=e;l;){if(l===A){s=!0;break}if(l===c){u=!0;break}l=(null===(r=l.getParent)||void 0===r?void 0:r.call(l))||(null===(n=l.getAssembly)||void 0===n?void 0:n.call(l))}if(t===be.CLICK)return s?A:this.getAccessoryAtFirstLevel(u?c:i,e);if(t===be.DB_CLICK){if(s)return this.getAccessoryAtFirstLevel(A,e);var g=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(g,e)}}else{if(t===be.CLICK)return this.getAccessoryAtFirstLevel(i,e);if(t===be.DB_CLICK){var f=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(f,e)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(e){var t,r;if(this.isFittingLikeModel(e))return e;var n,i,o=e.isRoot()?e:e.getRoot(),A=o.getAssembly(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,s=!1;if(a&&(n=YB(a))&&!this.isFittingLikeModel(n)&&(s=(i=a.entityType===dA?(i=n.isRoot()?n:n.getRoot()).getAssembly()||i:n)===o||i===A),n&&s){for(var u=!1,c=!1,l=n instanceof Ve.CoreParamModel?n.getParent():void 0,g=e;g;){if(g===n){u=!0;break}if(g===l){c=!0;break}g=(null===(t=g.getParent)||void 0===t?void 0:t.call(g))||(null===(r=g.getAssembly)||void 0===r?void 0:r.call(g))}return u?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof Ve.CoreParamModelAssembly?o:this.getAccessoryAtFirstLevel(n,e):c?this.getAccessoryAtFirstLevel(l,e):this.designMode===Qe.TOP_MODEL&&o!==n&&o!==n.getRoot()?o:this.getAccessoryAtFirstLevel(o,e)}return this.designMode===Qe.TOP_MODEL?o.getAssembly()||o:this.getAccessoryAtFirstLevel(o,e)}},{key:"setCurSelectEntity",value:function(e){this.curSelectEntity=e}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(e){this.curHintEntity=e}},{key:"getCurHintEntity",value:function(){return this.curHintEntity}},{key:"clearPrevModeSelectEntity",value:function(){this.prevModeSelectEntity.length&&(this.prevModeSelectEntity=[])}},{key:"getDesignMode",value:function(){return this.designMode}},{key:"setDesignMode",value:function(e,t){this.designMode=e,e===Qe.CUSTOM?(this.customModeFindSelectModel=null==t?void 0:t.findSelectModel,this.customModeFindHintModel=null==t?void 0:t.findHintModel,!this.pressManager.disabled&&this.pressManager.dispose()):(this.customModeFindSelectModel=void 0,this.customModeFindHintModel=void 0,this.pressManager.disabled&&this.pressManager.active(),this.prevModeSelectEntity=this.prevModeSelectEntity.concat(this.curSelectEntity&&Object(Ot.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(e){var t=HB[e.type];return{entityId:e.id,entityType:t}}},{key:"customModeSelectModel",value:function(e,t){var r,n;n=this.isFittingLikeModel(e)?Hp(e):this.getParamModelLite(e);var i=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,t);return Object(Ot.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(e){var t,r=this,n=this.memoGetHintModelLite(e),i=null===(t=this.customModeFindHintModel)||void 0===t?void 0:t.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(Ot.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(e){return e instanceof en||e instanceof Qr||e instanceof mt&&Boolean(e.isAppendHardware)}},{key:"getSelectEntity",value:function(e,t){var r;if(this.isMultiSelect&&this.designMode!==Qe.CUSTOM){switch(this.designMode){case Qe.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Qe.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Qe.PRODUCT:r=e}if(!r)return;var n=VB(r),i=Object(Ot.castArray)(this.curSelectEntity).filter((function(e){return e}));this.prevModeSelectEntity.length&&i.push.apply(i,NE(this.prevModeSelectEntity));var o=i[0]&&YB(i[0]);if(o&&this.isFittingLikeModel(o)!==this.isFittingLikeModel(r))return n;var A=i.filter((function(e){return e.entityId!==n.entityId}));return A.length!==i.length?A:[].concat(NE(A),[n])}if(!Array.isArray(this.curSelectEntity)||!this.curSelectEntity.length){switch(this.designMode){case Qe.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Qe.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Qe.PRODUCT:r=e;break;case Qe.CUSTOM:return this.customModeSelectModel(e,t)}return VB(r||e)}}},{key:"getHintEntity",value:function(e){var t;switch(this.designMode){case Qe.TOP_MODEL:case Qe.ACCESSORY:t=this.topModelModeAndAccessoryModeHint(e);break;case Qe.PRODUCT:t=e;break;case Qe.CUSTOM:return this.customModeHintModel(e)}var r=this.curSelectEntity&&Object(Ot.castArray)(this.curSelectEntity)||[];if(!([].concat(NE(r),NE(this.prevModeSelectEntity)).findIndex((function(e){return e.entityId===t.id}))>-1))return VB(t)}},{key:"registerMultiSelectShortcut",value:function(e){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=e,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&UE(t.prototype,r),n&&UE(t,n),e}();function VE(e){return(VE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function YE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function KE(e,t){return(KE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=WE(e);if(t){var i=WE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return JE(this,r)}}function JE(e,t){return!t||"object"!==VE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function WE(e){return(WE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&KE(e,t)}(o,e);var t,r,n,i=qE(o);function o(){return YE(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"pickRayTarget",value:function(e){return e&&YB(e)}},{key:"selection",get:function(){return NB().getStateManager().kaf.selection}},{key:"hint",get:function(){return NB().getStateManager().kaf.kaf2.hint}},{key:"designModeCtx",get:function(){return NB().designModeContext}}])&&HE(t.prototype,r),n&&HE(t,n),o}(Si.ToolModule.Feature);function XE(e){return(XE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ZE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $E(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eB(e,t){return(eB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=nB(e);if(t){var i=nB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rB(this,r)}}function rB(e,t){return!t||"object"!==XE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nB(e){return(nB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var iB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eB(e,t)}(o,e);var t,r,n,i=tB(o);function o(){var e;return ZE(this,o),(e=i.apply(this,arguments)).isMouseDown=!1,e}return t=o,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(e){if(!this.isMouseDown){var t=this.context.pick(e.sceneId,e.event),r=this.pickRayTarget(null==t?void 0:t.entity);if(Tt.eventNames().includes(Mt.PLANK_FACE_HOVER)&&r instanceof Ve.CoreParamModel){var n=t.entity,i=n.point,o={modelId:n.entityId,id:Zh(r,i)};Tt.emit(Mt.PLANK_FACE_HOVER,o)}if(r){var A=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),Qe.CUSTOM,this.hint.hint(A)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&$E(t.prototype,r),n&&$E(t,n),o}(zE);function oB(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return AB(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return AB(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function AB(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function aB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sB(e,t){return(sB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=lB(e);if(t){var i=lB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return cB(this,r)}}function cB(e,t){return!t||"object"!==gB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lB(e){return(lB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gB(e){return(gB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":gB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},hB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":gB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},pB=Si.__INTERNAL__.Highlighters.WireGeometry,dB=Si.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,IB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sB(e,t)}(o,e);var t,r,n,i=uB(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this)).models=e,r.createFittingModelBox=t,r}return t=o,(r=[{key:"getGeometry",value:function(){var e,t=new pB,r=oB(this.models);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=void 0;i=n instanceof Ve.CoreParamModel||n instanceof Ve.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var o=dB(i);t.append(o)}}catch(e){r.e(e)}finally{r.f()}return t}}])&&aB(t.prototype,r),n&&aB(t,n),o}(Si.Entity),yB=IB=fB([Object(Si.provideEntityAPIs)([new Si.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),hB("design:paramtypes",[Array,Function])],IB);function CB(e){return(CB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function EB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function BB(e,t){return(BB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=QB(e);if(t){var i=QB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return mB(this,r)}}function mB(e,t){return!t||"object"!==CB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function QB(e){return(QB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&BB(e,t)}(o,e);var t,r,n,i=vB(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this))._init(),e}return t=o,(r=[{key:"_init",value:function(){var e=this,t={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(t){var r=t.map((function(e){return YB(e)}));return new yB(r.filter((function(e){return e})),e.createFittingModelBox)}};this.selection.addMultiSelectionConfig(t)}},{key:"createFittingModelBox",value:function(e){return e instanceof Qr?e.boundingBox:kC(e)}},{key:"onClick",value:function(e){this.triggerClick(e,be.CLICK)}},{key:"onDblClick",value:function(e){this.designModeCtx.isMultiSelect||this.triggerClick(e,be.DB_CLICK)}},{key:"triggerClick",value:function(e,t){var r=this.context.pick(e.sceneId,e.event),n=this.pickRayTarget(null==r?void 0:r.entity);if(Tt.eventNames().includes(Mt.PLANK_FACE_CLICK)&&n instanceof Ve.CoreParamModel){var i=r.entity,o=i.point,A={modelId:i.entityId,id:Zh(n,o)};Tt.emit(Mt.PLANK_FACE_CLICK,A)}if(n){var a=this.designModeCtx.getSelectEntity(n,t);this.designModeCtx.getDesignMode()===Qe.CUSTOM?a&&this.selection.select(a):(this.selection.select(a),this.designModeCtx.setCurSelectEntity(a))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&EB(t.prototype,r),n&&EB(t,n),o}(zE);function _B(e){return(_B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function SB(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wB(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?SB(Object(r),!0).forEach((function(t){DB(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SB(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function DB(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function MB(e,t,r){return(MB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=FB(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function xB(e,t){return(xB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function PB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=FB(e);if(t){var i=FB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return TB(this,r)}}function TB(e,t){return!t||"object"!==_B(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function FB(e){return(FB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var OB,LB=new _i.SingletonRef,kB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xB(e,t)}(o,e);var t,r,n,i=PB(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:fC,axrs:vy,singleton:LB},e)).stateManager=t,r.viewer=new us,r.designModeContext=new jE,r}return t=o,(r=[{key:"init",value:function(){MB(FB(o.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var e=this.stateManager;e.initState(),_y(e);var t=this.getDependentPlugin(Si.AppServicePlugin),r=this.getDependentPlugin(bf);e.kaf=t.stateManager,e.core=r.stateManager}},{key:"initNet",value:function(){MB(FB(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new gc),this.client=new xu(this.net)}},{key:"initApp",value:function(){var e=this,t=this.stateManager,r=t.core,n=r.design,i=r.pad,o=this.getDependentPlugin(Si.AppServicePlugin);this.viewer.config(o,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return e.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(e,t){for(var r=t.point,n=i.findModelOrAssemblyModelById(e.entityId);n&&!fI.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:dA,point:r}:wB(wB({},e),{},{point:r})},paramModelSymbol:dA,filterParamModel:function(t){return!e.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(t.getCategory().categoryId)}}),this.viewer.registerReducer((function(e,t,r){r.interactionPriority=e.isAppendHardware?2:0})),o.registerEntityDocument(new PE((function(){return t.core.fittingDesign}))),t.kaf.toolbox.addIdleToolFeature((function(){return new bB})),t.kaf.toolbox.addIdleToolFeature((function(){return new iB})),o.setLayout(Uy)}}])&&RB(t.prototype,r),n&&RB(t,n),o}(_i.PluginApplication),NB=LB.instance;function GB(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UB(e,t){var r=new Map;return function(){var n,i=t.apply(void 0,arguments);if(r.has(i))n=r.get(i);else if(n=e.apply(void 0,arguments),Object(Ot.isObject)(n)&&Object(Ot.isFunction)(n.then)&&Object(Ot.isFunction)(n.catch)){var o=Promise.resolve(n);r.set(i,o),o.finally((function(){r.delete(i)}))}return n}}function jB(e){return e instanceof mt?dA:e instanceof xt?pA:e instanceof Qr?ch:e instanceof en?lh:void 0}function VB(e){return{entityId:e.id,entityType:jB(e)}}function YB(e){var t=e.entityId,r=e.entityType,n=NB().getStateManager().core,i=n.fittingDesign,o=n.pad;switch(r){case dA:return o.findModelOrAssemblyModelById(t);case pA:return o.findParamModelAssembly(t);case lh:return i.getGrooveFittings().find((function(e){return e.id===t}));case ch:return i.getFittings().find((function(e){return e.id===t}));default:return}}var HB=(GB(OB={},Me.PARAM_MODEL,dA),GB(OB,Me.PARAM_MODEL_ASSEMBLY,pA),GB(OB,Me.HOLE,ch),GB(OB,Me.GROOVE,ch),GB(OB,Me.HARDWARE_GROOVE,lh),GB(OB,Me.HARDWARE,dA),OB);function KB(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function qB(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){KB(o,n,i,A,a,"next",e)}function a(e){KB(o,n,i,A,a,"throw",e)}A(void 0)}))}}var JB=new Map;function WB(e){return["designid","levelid","modelid","toolType"].map((function(t){return e[t]||""})).join(":")}var zB=UB(function(){var e=qB(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=uc(),n=WB(t),!JB.has(n)){e.next=4;break}return e.abrupt("return",JB.get(n));case 4:return e.next=6,r.get("/cos/api/fitting-design",{params:t});case 6:return i=e.sent,JB.set(n,i.data.d),e.abrupt("return",i.data.d);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),WB);function XB(){var e=Df(fg);"function"==typeof e.fittingDesignHasChanged&&e.fittingDesignHasChanged().catch((function(){}))}var ZB,$B,ev=function(){var e=qB(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=uc(),i=WB(r),e.prev=2,e.next=5,n.post("/cos/api/fitting-design",t,{params:r});case 5:JB.set(i,t),XB(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t,r){return e.apply(this,arguments)}}(),tv=function(){var e=qB(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=uc(),n=WB(t),e.prev=2,e.next=5,r.delete("/cos/api/fitting-design",{params:t});case 5:JB.has(n)&&JB.delete(n),XB(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();function rv(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function nv(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){rv(o,n,i,A,a,"next",e)}function a(e){rv(o,n,i,A,a,"throw",e)}A(void 0)}))}}!function(e){e.UNKNOWN="UNKNOWN",e.PENDING="PENDING",e.RUNNING="RUNNING",e.SAVING="SAVING",e.SUCCESS="SUCCESS",e.FAIL="FAIL",e.CANCEL="CANCEL",e.TIMEOUT="TIMEOUT"}(ZB||(ZB={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW"}($B||($B={}));var iv=function(){var e=nv(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(Ot.castArray)(t),n=Df(_g),e.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ov=UB(function(){var e=nv(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Df(Rf.MiniAppParamModelJsonDataService),e.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")})),Av=UB(function(){var e=nv(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Df(Rf.MiniAppParamModelJsonDataService),e.abrupt("return",n.getModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")}));function av(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uv(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function cv(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){uv(o,n,i,A,a,"next",e)}function a(e){uv(o,n,i,A,a,"throw",e)}A(void 0)}))}}var lv=lI()(function(){var e=cv(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=uc(),e.next=3,r.gzipGet("/dcs-model/api/c/parammodeldata",{params:{obsbgid:t,cache:!0}});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?av(Object(r),!0).forEach((function(t){sv(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):av(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({promise:!0},gI)),gv=lI()(function(){var e=cv(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=uc(),e.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:t});case 3:return i=e.sent,e.abrupt("return",(null===(r=i.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(Ot.mapValues)(i.data.d.modelCenterMap,(function(e){return JSON.parse(e)})):{});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var fv=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function hv(e){return(hv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pv(Object(r),!0).forEach((function(t){Iv(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pv(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Iv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yv(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Cv(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){yv(o,n,i,A,a,"next",e)}function a(e){yv(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Ev(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vv(e,t){return(vv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bv(e);if(t){var i=bv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qv(this,r)}}function Qv(e,t){return!t||"object"!==hv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bv(e){return(bv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _v=function(){return my().fittingDesign.fittingDesignSense},Sv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vv(e,t)}(c,e);var t,r,n,i,o,A,a,u=mv(c);function c(){return Ev(this,c),u.apply(this,arguments)}return t=c,(r=[{key:"toggleAutoSave",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];_v().$actionEnableAutoSave.dispatch(e)}},{key:"isAutoSave",value:function(){return _v().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(a=Cv(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(my().viewParamModel.state.state.currModelId!==t||_v().state.state.design.id!==t)){e.next=3;break}return e.abrupt("return",this.getConnectedFittingDesign());case 3:return e.next=5,ep(t);case 5:return r=e.sent,e.abrupt("return",zB(dv(dv({},r),{},{modelid:t})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return _v().getConnectedFittingDesign(e,t)}},{key:"validateFittingDesign",value:function(e,t){var r=my().entry.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(!r)return{validated:!1};var n=my().fittingDesign.senseSetting.getSenseSettings();return{validated:function(e){if(!e.isClosedPath())return!1;for(var t=e.points,r=e.lines,n=t.length,i=0;i<n;i++){var o={type:ci.POINT,val:t[i]},A={type:ci.LINE,val:r[i]};if(!Bi(o.val))return!1;if(!vi(A.val))return!1;if(!Qi(o,A))return!1;for(var a=i+1;a<n;a++){var s={type:ci.POINT,val:t[a]},u={type:ci.LINE,val:r[a]};if(!Qi(o,s))return!1;if(!Qi(o,u))return!1;if(!Qi(A,s))return!1;if(!Qi(A,u))return!1}}return!0}(bi(e,r,Object(Ot.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(A=Cv(s.a.mark((function e(t){var r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},e.abrupt("return",_v().appendFittingDataToFittingDesign(t,r));case 2:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"saveDesign",value:(o=Cv(s.a.mark((function e(t){var r,n,i,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=r.timeout,i=Hh(n),_v().$actionSaveFittingDesign.started.dispatch({defer:i,design:t}),e.abrupt("return",i.promise);case 5:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"clearDesign",value:(i=Cv(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t||{}).timeout,i=void 0===n?5e4:n,o=r.modelId,A=Hh(i),_v().$actionClearFittingDesign.started.dispatch({defer:A,modelId:o}),e.abrupt("return",A.promise);case 4:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&Bv(t.prototype,r),n&&Bv(t,n),c}(fv);function wv(e){return(wv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mv(e,t){return(Mv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Tv(e);if(t){var i=Tv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Pv(this,r)}}function Pv(e,t){return!t||"object"!==wv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tv(e){return(Tv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fv=(new Kn.a).setFromCenterAndSize(new je.a(0,0,0),new je.a(200,200,100)),Ov=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mv(e,t)}(o,e);var t,r,n,i=xv(o);function o(){return Dv(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"resetDistanceAndLookAt",value:function(){var e=this.state,t=e.initCameraAttributes,r=t.position,n=t.lookAt,i=e.cameraAttributes.position,o=n.clone().sub(r).length(),A=n.clone().add(i.clone().sub(n).normalize().mul(o));this.updateCameraAttributes({position:A,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return Fv}}])&&Rv(t.prototype,r),n&&Rv(t,n),o}(Si.Scene3DStateManager);function Lv(e){return(Lv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nv(e,t){return(Nv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=jv(e);if(t){var i=jv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Uv(this,r)}}function Uv(e,t){return!t||"object"!==Lv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jv(e){return(jv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nv(e,t)}(r,e);var t=Gv(r);function r(){return kv(this,r),t.apply(this,arguments)}return r}(Si.types.combine({scene3D:Ov})),Yv=window.document.createElement("script");Yv.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(Yv);function Hv(e){return(Hv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jv(e,t){return(Jv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xv(e);if(t){var i=Xv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zv(this,r)}}function zv(e,t){return!t||"object"!==Hv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xv(e){return(Xv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jv(e,t)}(o,e);var t,r,n,i=Wv(o);function o(){var e;return Kv(this,o),(e=i.apply(this,arguments)).rootState=new Vv,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new kB(this,this.rootState);e.init(),e.run()}}])&&qv(t.prototype,r),n&&qv(t,n),o}(df.BasePlugin);function $v(e){return($v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function em(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rm(e,t){return(rm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=om(e);if(t){var i=om(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return im(this,r)}}function im(e,t){return!t||"object"!==$v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function om(e){return(om=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Zv.dependencies=[Si.AppServicePlugin,bf];var Am=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rm(e,t)}(o,e);var t,r,n,i=nm(o);function o(){return em(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleModelViewIntersected",value:function(e){my().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(e)}},{key:"toggleModelViewedIntersected",value:function(e){my().fittingDesign.intersected.toggleShowIntersectGroupData(e)}}])&&tm(t.prototype,r),n&&tm(t,n),o}(fv);function am(e){return(am="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function um(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){sm(o,n,i,A,a,"next",e)}function a(e){sm(o,n,i,A,a,"throw",e)}A(void 0)}))}}function cm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gm(e,t){return(gm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pm(e);if(t){var i=pm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hm(this,r)}}function hm(e,t){return!t||"object"!==am(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pm(e){return(pm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gm(e,t)}(u,e);var t,r,n,i,o,A,a=fm(u);function u(){return cm(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"getAllCustomModels",value:(A=um(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",my().scene.getAllCustomModels());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=um(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",my().scene.getCustomModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=um(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",my().scene.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&lm(t.prototype,r),n&&lm(t,n),u}(fv);function Im(e){return(Im="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ym(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Em(e,t){return(Em=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=mm(e);if(t){var i=mm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vm(this,r)}}function vm(e,t){return!t||"object"!==Im(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mm(e){return(mm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Em(e,t)}(o,e);var t,r,n,i=Bm(o);function o(){return ym(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setFittingHint",value:function(e){my().fittingDesign.fittingHint.setFittingHint(e)}},{key:"clearFittingHint",value:function(e){my().fittingDesign.fittingHint.clearFittingHint(e)}}])&&Cm(t.prototype,r),n&&Cm(t,n),o}(fv);function bm(e){return(bm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _m(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Sm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){_m(o,n,i,A,a,"next",e)}function a(e){_m(o,n,i,A,a,"throw",e)}A(void 0)}))}}function wm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Rm(e,t){return(Rm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Pm(e);if(t){var i=Pm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xm(this,r)}}function xm(e,t){return!t||"object"!==bm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pm(e){return(Pm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Tm,Fm,Om=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rm(e,t)}(a,e);var t,r,n,i,o,A=Mm(a);function a(){return wm(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getAllFittingModels",value:(o=Sm(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",my().fittingDesign.fittingModel.getAllFittingModels(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=Sm(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",my().fittingDesign.fittingModel.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&Dm(t.prototype,r),n&&Dm(t,n),a}(fv);function Lm(e){return(Lm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function km(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Gm(e,t){return(Gm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Um(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Vm(e);if(t){var i=Vm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jm(this,r)}}function jm(e,t){return!t||"object"!==Lm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vm(e){return(Vm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.View3D="view3d",e.Roamer="roamer"}(Tm||(Tm={})),function(e){e.UP="UP",e.DOWN="DOWN",e.LEFT="LEFT",e.RIGHT="RIGHT",e.FRONT="FRONT",e.BACK="BACK"}(Fm||(Fm={}));var Ym=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gm(e,t)}(o,e);var t,r,n,i=Um(o);function o(){return km(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleCameraMode",value:function(e){var t;switch(e){case Tm.View3D:t=Si.PerspectiveCameraMode.View3D;break;case Tm.Roamer:t=Si.PerspectiveCameraMode.Roamer}NB().getStateManager().scene3D.updatePerspectiveCameraMode(t)}},{key:"moveCamera",value:function(e){var t,r=NB().getStateManager().scene3D;switch(e){case Fm.UP:case Fm.FRONT:t=Si.ArrowType.UP;break;case Fm.DOWN:case Fm.BACK:t=Si.ArrowType.DOWN;break;case Fm.LEFT:t=Si.ArrowType.LEFT;break;case Fm.RIGHT:t=Si.ArrowType.RIGHT}if(t){if(e===Fm.UP||e===Fm.DOWN)return void r.onQEPress(t);r.onWASDPress(t)}}}])&&Nm(t.prototype,r),n&&Nm(t,n),o}(fv);function Hm(e){return(Hm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Km(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jm(e,t){return(Jm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xm(e);if(t){var i=Xm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zm(this,r)}}function zm(e,t){return!t||"object"!==Hm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xm(e){return(Xm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jm(e,t)}(o,e);var t,r,n,i=Wm(o);function o(){return Km(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDefaultHint",value:function(e){my().fittingDesign.plankFaceHint.setDefaultHintConfig(e)}},{key:"setModelHint",value:function(e){my().fittingDesign.plankFaceHint.setModelHint(e)}},{key:"clearModelHint",value:function(e){my().fittingDesign.plankFaceHint.clearModelHint(e)}}])&&qm(t.prototype,r),n&&qm(t,n),o}(fv);function $m(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function eQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){$m(o,n,i,A,a,"next",e)}function a(e){$m(o,n,i,A,a,"throw",e)}A(void 0)}))}}function tQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nQ(e,t){return(nQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=AQ(e);if(t){var i=AQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return oQ(this,r)}}function oQ(e,t){return!t||"object"!==aQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function AQ(e){return(AQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function aQ(e){return(aQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var sQ,uQ,cQ=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":aQ(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},lQ=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":aQ(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},gQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nQ(e,t)}(a,e);var t,r,n,i,o,A=iQ(a);function a(){return tQ(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getParamData",value:(o=eQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",my().viewParamModel.getParamModelJsonData(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamIntersected",value:(i=eQ(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,my().fittingDesign.intersected.getParamModelIntersectedData(t);case 2:return r=e.sent,e.abrupt("return",(n=r,{intersectedGroups:Object(Ot.map)(n.intersectedGroups,(function(e){return qh(qh({},e),{},{intersecteds:Object(Ot.map)(e.intersecteds,(function(e){return Object(Ot.omit)(e,["shell"])}))})}))}));case 4:case"end":return e.stop()}var n}),e)}))),function(e){return i.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.ignoreCategory||(e.ignoreCategory=De),my().viewParamModel.getTopModelList(e)}},{key:"getParamModelPhotoById",value:function(e){return my().viewParamModel.getParamModelPhotoData(e)}}])&&rQ(t.prototype,r),n&&rQ(t,n),a}(fv);function fQ(e){return(fQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dQ(e,t){return(dQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function IQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=CQ(e);if(t){var i=CQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yQ(this,r)}}function yQ(e,t){return!t||"object"!==fQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function CQ(e){return(CQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}cQ([me.observeAsyncApiDeco({serviceName:"ModelService"}),lQ("design:type",Function),lQ("design:paramtypes",["function"!=typeof!1&&Object]),lQ("design:returntype","function"==typeof(sQ="undefined"!=typeof Promise&&Promise)?sQ:Object)],gQ.prototype,"getParamData",null),cQ([me.observeAsyncApiDeco({serviceName:"ModelService"}),lQ("design:type",Function),lQ("design:paramtypes",["function"!=typeof!1&&Object]),lQ("design:returntype","function"==typeof(uQ="undefined"!=typeof Promise&&Promise)?uQ:Object)],gQ.prototype,"getParamIntersected",null);var EQ,BQ,vQ=function(){return my().select},mQ=function(){return my().baseDesignInfo};!function(e){e[e.NULL=0]="NULL",e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(EQ||(EQ={})),function(e){e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(BQ||(BQ={}));var QQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dQ(e,t)}(o,e);var t,r,n,i=IQ(o);function o(){var e;return hQ(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.__generateEntity=function(e){return Object(Ot.castArray)(e).map((function(e){var t={__sceneId:nh.SCENE_ID,entityId:e.id,entityType:dA};return e.type===BQ.CASBIN&&(t.entityId=mQ().state.casbinModelIdMap[e.id]),t}))},e.onSelectedChanged=function(){Tt.emit(Mt.SELECTION_SERVICE_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){var e=vQ().state.state.selectedData,t=my().viewParamModel.state.state.allSubModels;if(e.length){var r=e[0].$model;if(r&&r instanceof mt&&r.isAppendHardware)return{data:[r.hardwareData],type:EQ.CASBIN};var n=Object(Ot.map)(e,"id"),i=t.filter((function(e){return n.includes(e.id)}));if(n.length)return{data:i,type:EQ.MODEL}}return{data:[],type:EQ.NULL}}},{key:"select",value:function(e){var t=this.__generateEntity(e);vQ().select(t)}},{key:"unSelect",value:function(e){if(e){var t=this.__generateEntity(e);vQ().unSelect(t)}else vQ().select([])}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,vQ().on(By.EVENT_SELECT_CHANGED,this.onSelectedChanged))}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),Tt.on(Mt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"off",value:function(e){Tt.off(Mt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),Tt.once(Mt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"__onDestroy",value:function(){vQ().off(By.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&pQ(t.prototype,r),n&&pQ(t,n),o}(fv);function bQ(e){return(bQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wQ(e,t){return(wQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function DQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=MQ(e);if(t){var i=MQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return RQ(this,r)}}function RQ(e,t){return!t||"object"!==bQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function MQ(e){return(MQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xQ=function(){return my().select},PQ=function(){return NB().designModeContext},TQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wQ(e,t)}(o,e);var t,r,n,i=DQ(o);function o(){var e;return _Q(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.plankFaceClickEvent={on:function(e){Tt.on(Mt.PLANK_FACE_CLICK,e)},once:function(e){Tt.once(Mt.PLANK_FACE_CLICK,e)},off:function(e){Tt.off(Mt.PLANK_FACE_CLICK,e)}},e.plankFaceHoverEvent={on:function(e){Tt.on(Mt.PLANK_FACE_HOVER,e)},once:function(e){Tt.once(Mt.PLANK_FACE_HOVER,e)},off:function(e){Tt.off(Mt.PLANK_FACE_HOVER,e)}},e.onSelectedChanged=function(){Tt.emit(Mt.SELECTION_SERVICE_V2_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){return xQ().state.state.selectedDataV2.map(this._genElement).filter((function(e){return!!e}))}},{key:"select",value:function(e){var t=Object(Ot.castArray)(e).map(this._genEntityFromElement);xQ().select(t),PQ().setCurSelectEntity(t)}},{key:"unSelect",value:function(e){if(e){var t=Object(Ot.castArray)(e).map(this._genEntityFromElement);xQ().unSelect(t);var r=PQ().getCurSelectEntity();r&&(Array.isArray(r)?PQ().setCurSelectEntity(Object(Ot.difference)(r,t)):t.includes(r)&&PQ().setCurSelectEntity(void 0))}else xQ().select(),PQ().setCurSelectEntity(void 0)}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),Tt.on(Mt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"off",value:function(e){Tt.off(Mt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),Tt.once(Mt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,xQ().on(By.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(e){return{entityId:e.id,entityType:HB[e.type]}}},{key:"_genElement",value:function(e){var t;if(e instanceof mt?t=e.isAppendHardware?Me.HARDWARE:Me.PARAM_MODEL:e instanceof xt?t=Me.PARAM_MODEL_ASSEMBLY:e instanceof en?t=Me.HARDWARE_GROOVE:e instanceof Qr&&(t=e.type===c.HOLE?Me.HOLE:Me.GROOVE),t)return{id:e.id,type:t}}},{key:"__onDestroy",value:function(){xQ().off(By.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&SQ(t.prototype,r),n&&SQ(t,n),o}(fv);function FQ(e){return(FQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function LQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){OQ(o,n,i,A,a,"next",e)}function a(e){OQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function kQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GQ(e,t){return(GQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function UQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=VQ(e);if(t){var i=VQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jQ(this,r)}}function jQ(e,t){return!t||"object"!==FQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function VQ(e){return(VQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var YQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&GQ(e,t)}(u,e);var t,r,n,i,o,A,a=UQ(u);function u(){return kQ(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"viewSelected",value:(A=LQ(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",my().viewParamModel.viewSelectedParamModel());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"viewModelById",value:(o=LQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",my().viewParamModel.viewParamModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"resetPerspective",value:function(){var e=NB().getStateManager().scene3D;e.updateEnableCameraAnimation(!0),e.reset()}},{key:"toggleModelBorder",value:function(e){my().scene.$actionToggleRenderBorder.dispatch(e)}},{key:"toggleModelTransparent",value:function(e){my().scene.$actionToggleRenderTranslucent.dispatch(e)}},{key:"setting",value:function(e){my().fittingDesign.senseSetting.$actionSenseSetting.dispatch(e)}},{key:"refreshModel",value:(i=LQ(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",my().viewParamModel.refreshCustomModelData());case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})}])&&NQ(t.prototype,r),n&&NQ(t,n),u}(fv),HQ=r(244);function KQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qQ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?KQ(Object(r),!0).forEach((function(t){JQ(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KQ(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function JQ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WQ(e){return function(e){if(Array.isArray(e))return zQ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return zQ(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zQ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function XQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ZQ=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isRealPath=!1,this._changeMap={},this.id=rr()(),this.modelID=t,this.paths=r,r.forEach((function(e){e.plankArea=n}))}var t,r,n;return t=e,(r=[{key:"getRealPaths",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var n=r.force,i=void 0!==n&&n,o=r.resetCenter,A=void 0===o||o;if(!i&&A&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!i&&!A&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new e(this.modelID,[]);var a=this.getFace2ds();if(this.paths.length>1){var s=[];u.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),u.FacesBoolean.FaceBooleanType.subtract,s),a=s}var c=0===a.length?a[0]:{loops:(t=[]).concat.apply(t,WQ(a.map((function(e){return e.loops}))))};if(A){Object(HQ.calculateFaceBBox)(c);var l=c.box.center,g=u.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(e){e.loops.forEach((function(e){e.forEach((function(e){e.transform(g)}))}))}))}var f=a.map((function(e){return e.loops[0]})).map((function(e){return eb(Re.OUTER,e)})),h=a.reduce((function(e,t){return e.push.apply(e,WQ(t.loops.slice(1))),e}),[]).map((function(e){return eb(Re.INNER,e,!0)})),p=new e(this.modelID,[].concat(WQ(f),WQ(h)));return A?this._realPathsResetCenterCache=p:this._realPathsCache=p,p._isRealPath=!0,p}},{key:"getCenterPoint",value:function(){var e=$Q(this.paths.find((function(e){return e.type===Re.OUTER})));Object(HQ.calculateFaceBBox)(e);var t=e.box.center;return{x:t.x,y:t.y}}},{key:"getFace2ds",value:function(){return this.paths.map($Q)}},{key:"_trackUpdateField",value:function(e,t,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,i=e.field;t===r||n.some((function(t){return t.field===i&&t.context.id===e.context.id}))||n.push(e)}},{key:"changeMap",get:function(){return this._changeMap},set:function(e){this._changeMap=e}}])&&XQ(t.prototype,r),n&&XQ(t,n),e}();function $Q(e){var t=[];if(e.lines.forEach((function(e){var r=e.start;r.getType()!==w.NONE&&t.push(r.getCurveLineAndPoints().curveLine),t.push(e.getRealLine())})),e.offset){var r=(0,u.LoopCCW.isPolygonCCW2D)(t.map((function(e){return e.startPoint})))?e.offset:-e.offset;return{loops:u.Path2dOffset.offsetPath2d(t,r).resultPaths}}return{loops:[t]}}function eb(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.map((function(e){return new Tr({type:w.NONE,position:e.startPoint})})),i=t.map((function(e){var t;return t=e instanceof u.LineSeg2d?{type:D.SEGMENT}:e instanceof u.Arc2d?tb(e):rb(e),new Rr(t)})),o=u.LoopCCW.isPolygonCCW2D(n.map((function(e){return e.getPosition()})));r!==o&&(n=n.reverse(),i=(i=i.reverse().map((function(e){return"boolean"==typeof e.clockwise&&(e.clockwise=!e.clockwise),e}))).slice(1).concat(i[0]));var A=ib(n.map((function(e){return e.getPosition()})));return n=n.slice(A).concat(n.slice(0,A)),i=i.slice(A).concat(i.slice(0,A)),new Gr({type:e,points:n,lines:i,forceCCW:!1})}function tb(e){var t={};t.type=D.CIRCLE_ARC,t.radius=e.radius,t.clockwise=!e.isCCW;var r=e.center,n=e.startPoint,i=e.endPoint,o=new u.LineSeg2d(n,i),A=o.length/2,a=new u.Vector2d(o.getPoint(A)),s=new u.Vector2d(r).subtracted(a).normalized();return t.clockwise?t.minorArc=s.isSameDirection(o.rightNormal):t.minorArc=s.isSameDirection(o.leftNormal),t}function rb(e){var t={};return t.type=D.ELLIPSE_ARC,t.majorRadius=e.majorRadius,t.minorRadius=e.minorRadius,t.clockwise=!e.isCCW,t.ellipseCenter=e.ccs.origin,t}function nb(e){var t=e.changeMap.update,r=e._isRealPath?e.getCenterPoint():null,n=e._isRealPath?u.Matrix3.makeTranslation(-r.x,-r.y):void 0;t&&t.length>0&&(t.forEach((function(e){var t=e.field,r=e.context;"hint"===t&&((r=r).getHint()?wc(r,n):function(e,t){var r=vc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=n.findIndex((function(r){return r.linkModel.id===e&&r.id===t}));if(i>-1){var o=mc(n);o.splice(i,1),r.setPlankOutlineHintModels(o)}}(r.path.plankArea.modelID,r.id))})),e.changeMap=qQ(qQ({},e.changeMap),{},{update:[]}))}function ib(e){if(!e.length)return 0;var t=e[0].y,r=e[0].x;e.slice(1).forEach((function(e){t<e.y&&(t=e.y),r>e.x&&(r=e.x)}));var n,i,o=-r,A=-t;return e.forEach((function(t,r){var a=t.x,s=t.y,u=Math.pow(a+o,2)+Math.pow(s+A,2);void 0===n||u<n?(n=u,i=r):n===u&&e[i].x>t.x&&(i=r)})),i}function ob(e){return(ob="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ab(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ab(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sb(e,t){return(sb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ub(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=lb(e);if(t){var i=lb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return cb(this,r)}}function cb(e,t){return!t||"object"!==ob(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lb(e){return(lb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sb(e,t)}(o,e);var t,r,n,i=ub(o);function o(){return Ab(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"parseModelPlankPath",value:function(e){return t=e.modelID,r=e.data,n=[],r.path&&n.push(Ur(Re.OUTER,r.path)),n.push.apply(n,WQ(r.holes.map((function(e){return Ur(Re.INNER,e)})))),new ZQ(t,n);var t,r,n}},{key:"syncModelPlankPath",value:function(e){nb(e)}}])&&ab(t.prototype,r),n&&ab(t,n),o}(fv);function fb(e){return(fb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hb(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function pb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function db(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ib(e,t){return(Ib=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Eb(e);if(t){var i=Eb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Cb(this,r)}}function Cb(e,t){return!t||"object"!==fb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Eb(e){return(Eb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ib(e,t)}(a,e);var t,r,n,i,o,A=yb(a);function a(){return pb(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"stable",value:(i=s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",my().viewParamModel.validateModelStable(t.modelId));case 1:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){hb(o,r,n,A,a,"next",e)}function a(e){hb(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&db(t.prototype,r),n&&db(t,n),a}(fv);function vb(e){return(vb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function bb(e,t){return(bb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=wb(e);if(t){var i=wb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Sb(this,r)}}function Sb(e,t){return!t||"object"!==vb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wb(e){return(wb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Db=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bb(e,t)}(o,e);var t,r,n,i=_b(o);function o(){return mb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDesignMode",value:function(e){var t=e.mode,r=e.customModeCb;NB().designModeContext.setDesignMode(t,r)}},{key:"registerMultiSelectShortcut",value:function(e){NB().designModeContext.registerMultiSelectShortcut(e)}}])&&Qb(t.prototype,r),n&&Qb(t,n),o}(fv),Rb=r(425),Mb=r.n(Rb),xb=new _i.I18NManager,Pb="custom_order_split",Tb={"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 Fb(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Ob(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Fb(o,n,i,A,a,"next",e)}function a(e){Fb(o,n,i,A,a,"throw",e)}A(void 0)}))}}var Lb=Object(Ot.once)((function(){return!!Object(Dc.parseServQueryParams)()}));function kb(){return Nb.apply(this,arguments)}function Nb(){return(Nb=Ob(s.a.mark((function e(){var t,r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},r=Dc.servkit.createTerminal({id:t.clientId||"custom-order-split",type:Dc.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:Dc.EServChannel.WINDOW,config:{slave:{getWindow:function(e){return{target:window.parent,window:window}}}}}}}),e.next=4,r.openSession({timeout:t.timeout||3e4});case 4:return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Gb=r(533),Ub=r.n(Gb),jb=r(1134),Vb=r.n(jb);function Yb(e){return(Yb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qb(e,t){return(qb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zb(e);if(t){var i=zb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wb(this,r)}}function Wb(e,t){return!t||"object"!==Yb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zb(e){return(zb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qb(e,t)}(o,e);var t,r,n,i=Jb(o);function o(){return Hb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.tip,r=e.noImg,n=e.imgSrc,i=e.className;return Di.a.createElement("div",{className:Ub()(Vb.a.empty,i)},!r&&Di.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),t&&Di.a.createElement("p",null,t))}}])&&Kb(t.prototype,r),n&&Kb(t,n),o}(Di.a.PureComponent);function Zb(e){return(Zb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t_(e,t){return(t_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function r_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=i_(e);if(t){var i=i_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return n_(this,r)}}function n_(e,t){return!t||"object"!==Zb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function i_(e){return(i_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var o_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&t_(e,t)}(o,e);var t,r,n,i=r_(o);function o(){return $b(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props;return Di.a.createElement(Si.Scene3D,e)}}])&&e_(t.prototype,r),n&&e_(t,n),o}(wi.PureComponent),A_=r(1135),a_=r.n(A_);function s_(e){return(s_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u_(){return(u_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function c_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g_(e,t){return(g_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=p_(e);if(t){var i=p_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h_(this,r)}}function h_(e,t){return!t||"object"!==s_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p_(e){return(p_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}wi.PureComponent;var d_=r(91);function I_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return y_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y_(e,t)}(e,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 y_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}window.React=Di.a;var C_=document.getElementById("root");function E_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function v_(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){B_(o,n,i,A,a,"next",e)}function a(e){B_(o,n,i,A,a,"throw",e)}A(void 0)}))}}function m_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Q_=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.serviceMap=new Map,this.initLange(ve.ZH_CN,{zh_CN:Tb}),function(e){Qf=e}(this)}var t,r,n,i,o;return t=e,(r=[{key:"startOnApiCalledEvent",value:function(){var e=this,t={on:function(e){return Tt.on(Mt.API_CALLED,e),function(){return Tt.off(Mt.API_CALLED,e)}},once:function(e){return Tt.once(Mt.API_CALLED,e),function(){return Tt.off(Mt.API_CALLED,e)}},emit:function(e){Tt.emit(Mt.API_CALLED,e)}};me.setEvent(t),t.on((function(t){var r=t.args,n=t.errMsg,i=t.status,o=t.apiName,A=t.duration,a=t.serviceName,s=e.getCustomMiniAppService(pg);if(s){var u="".concat(a,".").concat(o);if(s.logApiCalledInfo({status:i,apiType:"CUSTOM_SPLIT_API",apiName:u,duration:A}),!i){var c=n instanceof Error?n.message:n&&n.toString?n.toString():"unknown",l="\n called ".concat(u," api fail:\n arguments is ").concat(JSON.stringify(r),",\n errMsg is ").concat(c,"\n ");s.logApiError(new Error(l),"miniAppApiCalledError")}}}))}},{key:"isInCustomMiniAppMode",value:function(){return Lb()}},{key:"createDebugUtils",value:function(){var e=this.serviceMap,t={enableDebug:function(){window.__customsdk__.services=e}};window.__customsdk__=t}},{key:"start",value:(o=v_(s.a.mark((function e(t){var r,n,i=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.createDebugUtils(),!this.isInCustomMiniAppMode()){e.next=8;break}if(Dc.sappSDK.isStarted){e.next=5;break}return e.next=5,Dc.sappSDK.setConfig({useTerminalId:null==t?void 0:t.clientId,onClose:function(){var e=v_(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.stop();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).start();case 5:this.sappSDK=Dc.sappSDK,e.next=13;break;case 8:return e.next=10,Yh(30);case 10:return e.next=12,kb(t);case 12:this.sappSDK=e.sent;case 13:return this.startOnApiCalledEvent(),e.next=16,Promise.resolve([Si.App,Zv]).then((function(e){var t=I_(e,2),r=t[0],n=t[1];(new r).registerPlugin(n).start({fpsDetectorEnabled:!0}),document.body.removeChild(C_)})).catch((function(e){Object(d_.unmountComponentAtNode)(C_),Object(d_.render)(Di.a.createElement(Xb,null),C_),console.error("micros/pad",e)}));case 16:return(r=this.getCustomMiniAppService(gg))?(uc().setMiniAppHttpProxyClientService(r),Pf(uc())):Pf(sc()),(_f=new xf.AttachedService).config.setRequestClient(wf),Sf=new xf.ParamModelDataService({paramModelConstructor:mt,requestClient:wf}),new xf.ParamModelAssemblyDataService({paramModelAssemblyConstructor:xt,requestClient:wf}),n=this.getService(YQ),e.prev=20,e.next=23,n.viewSelected();case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(20),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.error(e.t0);case 28:case"end":return e.stop()}}),e,this,[[20,25]])}))),function(e){return o.apply(this,arguments)})},{key:"initLange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ve.ZH_CN,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(Ot.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),Mb.a.init({lang:e,debug:!1,initImmediate:!0,translatorType:Rb.ENUM.TranslatorType.I18next,packages:[Pb],resource:E_({},Pb,t)}),xb.init({namespace:Pb,resources:Pb})}},{key:"stop",value:(i=v_(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.getCustomMiniAppService(fg))){e.next=4;break}return e.next=4,t.lockModelBySplit();case 4:this.serviceMap.forEach((function(e){Object(Ot.isFunction)(e.__onDestroy)&&e.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getService",value:function(e){if(fv.isPrototypeOf(e)){var t=this.serviceMap,r=t.get(e);return r||(r=new e,t.set(e,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(e){var t=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return t instanceof Dc.SappSDK?t.getService(e):t.client.getService(e)}},{key:"getCustomMiniAppServiceUnSafe",value:function(e){return this.getCustomMiniAppService(e)}}])&&m_(t.prototype,r),n&&m_(t,n),e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"changeLanguage",(function(){return X})),r.d(t,"cloneInstance",(function(){return Z})),r.d(t,"createInstance",(function(){return $})),r.d(t,"dir",(function(){return ee})),r.d(t,"exists",(function(){return te})),r.d(t,"getFixedT",(function(){return re})),r.d(t,"init",(function(){return ne})),r.d(t,"loadLanguages",(function(){return ie})),r.d(t,"loadNamespaces",(function(){return oe})),r.d(t,"loadResources",(function(){return Ae})),r.d(t,"off",(function(){return ae})),r.d(t,"on",(function(){return se})),r.d(t,"setDefaultNamespace",(function(){return ue})),r.d(t,"t",(function(){return ce})),r.d(t,"use",(function(){return le}));var n=r(191),i=r.n(n),o=r(85),A=r.n(o),a=r(73),s=r.n(a),u=r(74),c=r.n(u),l=r(212),g=r.n(l),f=r(247),h=r.n(f),p=r(248),d=r.n(p),I=r(101),y=r.n(I),C=r(1126),E=r.n(C),B={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var r;console&&console[e]&&(r=console)[e].apply(r,E()(t))}},v=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.init(t,r)}return c()(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||B,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,A()({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),m=function(){function e(){s()(this,e),this.observers={}}return c()(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){var r=this;this.observers[e]&&this.observers[e].forEach((function(){if(t){var n=r.observers[e].indexOf(t);n>-1&&r.observers[e].splice(n,1)}else delete r.observers[e]}))}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function Q(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function b(e){return null==e?"":""+e}function _(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function S(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var A=n(o.shift());!e[A]&&r&&(e[A]=new r),e=e[A]}return i()?{}:{obj:e,k:n(o.shift())}}function w(e,t,r){var n=S(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=S(e,t),n=r.obj,i=r.k;if(n)return n[i]}function R(e,t,r){for(var n in t)n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):R(e[n],t[n],r):e[n]=t[n];return e}function M(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return d()(t,e),c()(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=[e,t];return r&&"string"!=typeof r&&(o=o.concat(r)),r&&"string"==typeof r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split(".")),D(this.data,o)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var A=[e,t];r&&(A=A.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(A=e.split("."))[1]),this.addNamespaces(t),w(this.data,A,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=D(this.data,a)||{};n?R(s,r,i):s=A()({},s,r),w(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?A()({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(m),F={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}},O=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],e,y()(y()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=v.create("translator"),r}return d()(t,e),c()(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=t.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var o=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var r=this;if("object"!==i()(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),a=o.key,s=o.namespaces,u=s[s.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){var g=t.nsSeparator||this.options.nsSeparator;return u+g+a}return a}var f=this.resolve(e,t),h=f&&f.res,p=f&&f.usedKey||a,d=f&&f.exactUsedKey||a,I=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],C=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,B="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(E&&h&&B&&y.indexOf(I)<0&&("string"!=typeof C||"[object Array]"!==I)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,t):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");if(n){var v="[object Array]"===I,m=v?[]:{},Q=v?d:p;for(var b in h)if(Object.prototype.hasOwnProperty.call(h,b)){var _="".concat(Q).concat(n).concat(b);m[b]=this.translate(_,A()({},t,{joinArrays:!1,ns:s})),m[b]===_&&(m[b]=h[b])}h=m}}else if(E&&"string"==typeof C&&"[object Array]"===I)(h=h.join(C))&&(h=this.extendTranslation(h,e,t));else{var S=!1,w=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(S=!0,void 0!==t.count){var D=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(D)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(w=!0,h=a);var R=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(w||S||R){this.logger.log(R?"updateKey":"missingKey",c,u,a,R?t.defaultValue:h);var M=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var P=0;P<x.length;P++)M.push(x[P]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var T=function(e,n){r.options.missingKeyHandler?r.options.missingKeyHandler(e,u,n,R?t.defaultValue:h,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,u,n,R?t.defaultValue:h,R,t),r.emit("missingKey",e,u,n,h)};if(this.options.saveMissing){var F=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&F?M.forEach((function(e){r.pluralResolver.getPluralFormsOfKey(e,a).forEach((function(t){return T([e],t)}))})):T(M,a)}}h=this.extendTranslation(h,e,t,f),w&&h===a&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(a)),w&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,r,n){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,r,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(A()({},r,{interpolation:A()({},this.options.interpolation,r.interpolation)}));var o=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(o=A()({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,r.lng||this.language,r),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var a=r.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==r.applyPostProcessor&&(e=F.handle(s,e,t,r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,A=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!A.isValidLookup(t)){var s=A.extractFromKey(e,a),u=s.key;r=u;var c=s.namespaces;A.options.fallbackNS&&(c=c.concat(A.options.fallbackNS));var l=void 0!==a.count&&"string"!=typeof a.count,g=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:A.languageUtils.toResolveHierarchy(a.lng||A.language,a.fallbackLng);c.forEach((function(e){A.isValidLookup(t)||(o=e,f.forEach((function(r){if(!A.isValidLookup(t)){i=r;var o,s,c=u,f=[c];if(A.i18nFormat&&A.i18nFormat.addLookupKeys)A.i18nFormat.addLookupKeys(f,u,r,e,a);else l&&(o=A.pluralResolver.getSuffix(r,a.count)),l&&g&&f.push(c+o),g&&f.push(c+="".concat(A.options.contextSeparator).concat(a.context)),l&&f.push(c+=o);for(;s=f.pop();)A.isValidLookup(t)||(n=s,t=A.getResource(r,e,s,a))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}]),t}(m);function L(e){return e.charAt(0).toUpperCase()+e.slice(1)}var k=function(){function e(t){s()(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=v.create("languageUtils")}return c()(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=L(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isWhitelisted(e)?i.push(e):r.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],G={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};function U(){var e={};return N.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:G[t.fc]}}))})),e}var j=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=U()}return c()(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=this,n=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var o=r.getSuffix(e,i);n.push("".concat(t).concat(o))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),o=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var A=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):A():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?A():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s()(this,e),this.logger=v.create("interpolator"),this.init(t,!0)}return c()(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e}),e.interpolation||(e.interpolation={escapeValue:!0});var r=e.interpolation;this.escape=void 0!==r.escape?r.escape:P,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?M(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?M(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?M(r.nestingPrefix):r.nestingPrefixEscaped||M("$t("),this.nestingSuffix=r.nestingSuffix?M(r.nestingSuffix):r.nestingSuffixEscaped||M(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,A,a=this;function s(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0)return D(t,e);var n=e.split(a.formatSeparator),i=n.shift().trim(),o=n.join(a.formatSeparator).trim();return a.format(D(t,i),o,r)};this.resetRegExp();var c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(A=0;(i=this.regexpUnescape.exec(e))&&(o=u(i[1].trim()),e=e.replace(i[0],o),this.regexpUnescape.lastIndex=0,!(++A>=this.maxReplaces)););for(A=0;i=this.regexp.exec(e);){if(void 0===(o=u(i[1].trim())))if("function"==typeof c){var l=c(e,i,n);o="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o="";else"string"==typeof o||this.useRawValueToEscape||(o=b(o));if(o=this.escapeValue?s(this.escape(o)):s(o),e=e.replace(i[0],o),this.regexp.lastIndex=0,++A>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=A()({},i);function a(e,t){if(e.indexOf(",")<0)return e;var r=e.split(",");e=r.shift();var n=r.join(",");n=(n=this.interpolate(n,o)).replace(/'/g,'"');try{o=JSON.parse(n),t&&(o=A()({},t,o))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(o.applyPostProcessor=!1;r=this.nestingRegexp.exec(e);){if((n=t(a.call(this,r[1].trim(),o),o))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=b(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}(),Y=r(729),H=r.n(Y);var K=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s()(this,t),i=g()(this,h()(t).call(this)),m.call(y()(y()(i))),i.backend=e,i.store=r,i.languageUtils=n.languageUtils,i.options=o,i.logger=v.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return d()(t,e),c()(t,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o=[],A=[],a=[],s=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?A.indexOf(a)<0&&A.push(a):(i.state[a]=1,n=!1,A.indexOf(a)<0&&A.push(a),o.indexOf(a)<0&&o.push(a),s.indexOf(t)<0&&s.push(t)))})),n||a.push(e)})),(o.length||A.length)&&this.queue.push({pending:A,loaded:{},errors:[],callback:n}),{toLoad:o,pending:A,toLoadLanguages:a,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=H()(n,2),o=i[0],A=i[1];t&&this.emit("failedLoading",o,A,t),r&&this.store.addResourceBundle(o,A,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,i,s,u,c,l;n=r.loaded,i=A,u=S(n,[o],Object),c=u.obj,l=u.k,c[l]=c[l]||[],s&&(c[l]=c[l].concat(i)),s||c[l].push(i),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,A=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(a,s){a&&s&&i<5?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,A)}),o):A(a,s)})):A(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=H()(n,2),o=i[0],A=i[1];this.read(o,A,"read",null,null,(function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(A," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(A," for language ").concat(o),i),t.loaded(e,n,i)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,A()({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n)}}]),t}(m);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===i()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i()(e[2])||"object"===i()(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function J(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function W(){}var z=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(s()(this,t),e=g()(this,h()(t).call(this)),m.call(y()(y()(e))),e.options=J(r),e.services={},e.logger=v,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),g()(e,y()(y()(e)));setTimeout((function(){e.init(r,n)}),0)}return e}return d()(t,e),c()(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(r=t,t={}),this.options=A()({},q(),this.options,J(t)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?v.init(n(this.modules.logger),this.options):v.init(null,this.options);var i=new k(this.options);this.store=new T(this.options.resources,this.options);var o=this.services;o.logger=v,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new j(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new V(this.options),o.backendConnector=new K(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}var a=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var s=Q(),u=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(n),r(t,n)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var r=[],n=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(this.language)n(this.language);else{var i=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);i.forEach((function(e){return n(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return n(e)})),this.services.backendConnector.load(r,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,r){var n=Q();return e||(e=this.languages),t||(t=this.options.ns),r||(r=W),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this,n=Q();this.emit("languageChanging",e);var i=function(e){e&&(r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.translator.language||r.translator.changeLanguage(e),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(e)),r.loadResources((function(i){!function(e,i){r.translator.changeLanguage(i),i&&(r.emit("languageChanged",i),r.logger.log("languageChanged",i)),n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var o=A()({},n);if("object"!==i()(n)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(s))}return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,r.t(t,o)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=t,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"loadNamespaces",value:function(e,t){var r=this,n=Q();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=Q();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,i=A()({},this.options,r,{isClone:!0}),o=new t(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.translator=new O(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(i,n),o.translator.options=o.options,o}}]),t}(m)),X=(t.default=z,z.changeLanguage.bind(z)),Z=z.cloneInstance.bind(z),$=z.createInstance.bind(z),ee=z.dir.bind(z),te=z.exists.bind(z),re=z.getFixedT.bind(z),ne=z.init.bind(z),ie=z.loadLanguages.bind(z),oe=z.loadNamespaces.bind(z),Ae=z.loadResources.bind(z),ae=z.off.bind(z),se=z.on.bind(z),ue=z.setDefaultNamespace.bind(z),ce=z.t.bind(z),le=z.use.bind(z)}])}));
159
+ ***************************************************************************** */var Cg,Eg=function(e,t){return(Eg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Bg(e,t){function r(){this.constructor=e}Eg(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function vg(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":yg(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}function mg(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function Qg(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(mg(arguments[t]));return e}!function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.DOOR_WINDOW="DW",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY",e.DOOR_WINDOW_COPY="DW_COPY"}(Cg||(Cg={}));var bg,_g,Sg,wg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Bg(t,e),t.prototype.getParamModelDataByIds=function(e,t){return Object(Mc.API_UNSUPPORT)()},t.prototype.getTopParamModels=function(e){return Object(Mc.API_UNSUPPORT)()},vg([Mc.anno.decl.api()],t.prototype,"getParamModelDataByIds",null),vg([Mc.anno.decl.api()],t.prototype,"getTopParamModels",null),t=vg([Mc.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:ul.INNER})],t)}(Mc.ServService),Dg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Bg(t,e),t.prototype.toJSON=function(){return{paramPackages:Qg(this.paramPackages.values()),hardwares:Qg(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(e){var t=mg(e,2);t[0];var r=t[1],n=new ig.a;return Object(Ot.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:Qg(this.displayInfos.values()),wireFrames:Object(Ot.fromPairs)(Qg(this.wireGeometrysMap.entries()).map((function(e){return[e[0],e[1].vertices]})))}},t.prototype.serialize=function(){return JSON.stringify(this.toJSON())},t.prototype.unSerialize=function(e){var t=this,r="string"==typeof e?JSON.parse(e):e,n=Object(Ot.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(e){var t=new ig.a;if(Object(Ot.extend)(t,e),t.meshModels=t.meshModels.map((function(e){var t=e.displayMaterial,r=new sg.a,n=new on.a;return Object(Ot.extend)(n,e.geometry),r.texture=e.texture,r.displayMaterial=t?Object(og.toPopBufferMtl)(t):void 0,r.geometry=n,r})),t.furnitureModel){var r=new Ag.FurnitureModel;Object(Ot.extend)(r,t.furnitureModel),r.size=new je.a(r.size),r.position=new je.a(r.position),r.rotate=new je.a(r.rotate),r.scale=new je.a(r.scale),t.furnitureModel=r}return t}))),r.wireFrames&&Object(Ot.each)(r.wireFrames,(function(e,r){t.addWireGeometrysMap(r,e)})),this.addCustomResources(n)},t}(rg.a);!function(e){e[e.willExit=0]="willExit"}(bg||(bg={})),function(e){e[e.exit=0]="exit"}(_g||(_g={})),function(e){e[e.personalLibrary=1]="personalLibrary",e[e.enterpriseLibrary=2]="enterpriseLibrary"}(Sg||(Sg={}));var Rg=r(245),Mg=r.n(Rg),xg=r(287),Pg=r.n(xg),Tg=r(1129),Fg=r.n(Tg),Og=r(358),Lg=r.n(Og),kg=r(722),Ng=r.n(kg),Gg=r(1130),Ug=r.n(Gg),jg=r(726),Vg=r.n(jg),Yg=r(727),Hg=r.n(Yg),Kg=r(207),qg=r.n(Kg),Jg=r(112),Wg=r.n(Jg),zg=r(187),Xg=r.n(zg),Zg=r(531),$g=r.n(Zg),ef=r(1131),tf=r.n(ef),rf=r(721),nf=r.n(rf),of=r(720),Af=r.n(of),af=r(357),sf=r.n(af),uf=r(242),cf=r.n(uf),lf=r(731),gf=r.n(lf),ff=r(719),hf=r.n(ff),pf=r(1132),df=r.n(pf),If=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[Ai.a,Jn.a,Lg.a,Te.a,Ng.a,Oe.a,Ug.a,qg.a,Wg.a,Xg.a,$g.a,ke.a,zn.a,Zn.a,ei.a,tf.a,nf.a,Af.a,Ge.a,sf.a,cf.a,gf.a,lf.LineIndex,ri.a,hf.a,df.a,_r.a,je.a,ArrayBuffer,NA.Vector3,Pg.a,Fg.a,Ds.ParamStore,Vg.a,Hg.a,sg.a,on.a,Ag.FurnitureModel,Map,NA.SkyBackground]:[];Object(Rg.inject)({isKnownImmutableInstance:function(e){return If.some((function(t){return e instanceof t}))}});Mg.a;var yf=r(211);function Cf(e){return(Cf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ef(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vf(e,t){return(vf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bf(e);if(t){var i=bf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qf(this,r)}}function Qf(e,t){return!t||"object"!==Cf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bf(e){return(bf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _f,Sf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vf(e,t)}(o,e);var t,r,n,i=mf(o);function o(){var e;return Ef(this,o),(e=i.apply(this,arguments)).rootState=new Ru,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new mc(this,this.rootState);e.init(),e.run()}}])&&Bf(t.prototype,r),n&&Bf(t,n),o}(yf.BasePlugin);Sf.dependencies=[Di.AppServicePlugin];var wf,Df,Rf,Mf=function(e){if(!_f)throw new Error("please new Application before call method");return _f.getCustomMiniAppService(e)},xf=r(249),Pf=r(108),Tf=r(429);function Ff(e){Rf=e}function Of(e){return(Of="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lf(e){return function(e){if(Array.isArray(e))return kf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return kf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kf(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Nf(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Gf(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Uf(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Gf(o,n,i,A,a,"next",e)}function a(e){Gf(o,n,i,A,a,"throw",e)}A(void 0)}))}}function jf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yf(e,t){return(Yf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qf(e);if(t){var i=qf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Kf(this,r)}}function Kf(e,t){return!t||"object"!==Of(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qf(e){return(qf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Jf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yf(e,t)}(o,e);var t,r,n,i=Hf(o);function o(){var e;return jf(this,o),(e=i.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0,hardwarelist:[],casbinModelIdMap:{}},e.lastCurrentCustomDataArgs=[],e.getCurrentBaseDesignInfo=Uf(s.a.mark((function t(){var r,n;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.state.designInfo)){t.next=3;break}return t.abrupt("return",r);case 3:return n=Mf(xf.MiniAppDesignBaseInfoService),t.next=6,n.getDesignBaseInfo();case 6:return r=t.sent,e.state.designInfo=r,t.abrupt("return",r);case 9:case"end":return t.stop()}}),t)}))),e.getCurrentCustomData=function(){var t=Uf(s.a.mark((function t(r){var n,i;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.state.currentCustomData,r){t.next=3;break}return t.abrupt("return",n);case 3:if(i=Object(Ot.castArray)(r),!Object(Ot.difference)(i,e.lastCurrentCustomDataArgs).length&&n){t.next=11;break}return t.next=8,Av(r);case 8:n=t.sent,t.next=12;break;case 11:return t.abrupt("return",n);case 12:return e.lastCurrentCustomDataArgs=i,e.state.currentCustomData=n,t.abrupt("return",n);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.loadFittingHardwareToSense=function(){var t=Uf(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Object(Ot.uniq)(Object(Ot.flatten)(Object(Ot.map)(r.hardware,(function(e){return e.map((function(e){return e.brandGoodId}))})))),e.state.casbinModelIdMap={},n.length){t.next=4;break}return t.abrupt("return");case 4:return i=e.getStateManager().core,o=i.design,A=i.pad,t.next=8,Promise.allSettled(Object(Ot.map)(n,function(){var e=Uf(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fv(t);case 2:return r=e.sent,e.abrupt("return",[t,r]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 8:return a=t.sent,t.next=11,hv(n);case 11:for(p in u=t.sent,c=Object(Ot.mapValues)(Object(Ot.keyBy)(Object(Ot.filter)(a,(function(e){return"fulfilled"===e.status})).map((function(e){return e.value})),(function(e){return e[0]})),(function(e){return e[1]})),l=o.getCustom(),g=[],f={},h=function(e){var t=r.hardware[e],n=A.findModelOrAssemblyModelById(e);if(n){var i=n.getConcatenatedMatrix(),o=n.getSize(),a=(new ke.a).makeTranslation(new je.a(-o.x/2,o.y/2,-o.z/2)),s=i.clone().multiply(a),l=Object(Ot.map)(t,(function(e){var t=c[e.brandGoodId],r=u[e.brandGoodId]||{x:0,y:0,z:0};if(t){var i=t.paramModelData,o=Nf(t,["paramModelData"]),A=e.rotate,a=(new mt).parse(i);Object(Pf.attach)(a,Object(Pf.toAttachedMap)(o)),a.setIsAppendHardware(!0),a.setLinkedIds(e.linkedIds),a.setHardwareData(e),a.linkParamModelId=n.id;var l=s.clone().multiply((new ke.a).compose(new je.a(e.position),new Oe.a(A.x,A.y,A.z),new je.a(e.scale)).multiply((new ke.a).setPosition(new je.a(r)))),g=Kn.a.decompose(l),h=g.rotation,p=g.position,d=g.scale,I=new je.a(p);return a.setPosition({x:I.x,y:I.y,z:I.z}),a.setRotation({x:h.x,y:h.y,z:h.z}),a.setScale(d),a.assignUniqueId(),f[e.id]=a.id,a}})).filter((function(e){return!!e}));g.push.apply(g,Lf(l))}else Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!")},r.hardware)h(p);if(!g.length){t.next=23;break}return t.next=21,wf.updateAttacheds(g);case 21:l.addParamModels.apply(l,g),e.state.casbinModelIdMap=f;case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return t=o,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&Vf(t.prototype,r),n&&Vf(t,n),o}(wi.AXR);function Wf(e){return(Wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Zf(e,t){return(Zf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=th(e);if(t){var i=th(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return eh(this,r)}}function eh(e,t){return!t||"object"!==Wf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function th(e){return(th=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rh,nh,ih,oh,Ah,ah,sh,uh,ch=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zf(e,t)}(o,e);var t,r,n,i=$f(o);function o(){var e;return zf(this,o),(e=i.apply(this,arguments)).paramModelConstructor=mt,e}return t=o,(r=[{key:"parseParamModelAssemblies",value:function(e){var t=this;return e.forEach((function(e){var r=(new xt).parse(e,t,{isRootWorldMatrix:!0});t.addParamModelAssembly(r)})),this}}])&&Xf(t.prototype,r),n&&Xf(t,n),o}(Dg),lh=r(75),gh=Symbol("fitting-data"),fh=Symbol("groove-fitting-entity"),hh=Symbol("intersect-data"),ph=Symbol("param-model-hint-entity"),dh=Symbol("fitting-hint-entity"),Ih=Symbol("plank-outline-hint-entity");!function(e){e.FAIL="fail",e.SUCCESS="success",e.LOADING="loading"}(rh||(rh={})),function(e){e[e.READY=0]="READY",e[e.LOADING=1]="LOADING",e[e.FAILED=2]="FAILED",e[e.INVALID=3]="INVALID",e[e.SUCCESS=4]="SUCCESS"}(nh||(nh={})),function(e){e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.FAILED=2]="FAILED",e[e.SUCCESS=3]="SUCCESS"}(ih||(ih={})),function(e){e.SCENE_ID="cp"}(oh||(oh={})),function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(Ah||(Ah={})),function(e){e.selectBlank="sb",e.renderModeChange="r",e.doorVisibilityChange="d"}(ah||(ah={})),function(e){e[e.opaqueModel=1]="opaqueModel",e[e.translucentModel=.4]="translucentModel",e[e.transparentModel=0]="transparentModel"}(sh||(sh={})),function(e){e.SHADING="0",e.OUTLINE_WITH_SHADING="1",e.TRANSLUCENT="2",e.OUTLINE_AND_TRANSLUCENT="3"}(uh||(uh={}));var yh,Ch=[];function Eh(e){return(Eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bh(e){return function(e){if(Array.isArray(e))return vh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return vh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vh(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mh(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Qh(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){mh(o,n,i,A,a,"next",e)}function a(e){mh(o,n,i,A,a,"throw",e)}A(void 0)}))}}function bh(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function _h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wh(e,t){return(wh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Mh(e);if(t){var i=Mh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Rh(this,r)}}function Rh(e,t){return!t||"object"!==Eh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mh(e){return(Mh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.design="design",e.series="series"}(yh||(yh={}));var xh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wh(e,t)}(o,e);var t,r,n,i=Dh(o);function o(){var e;return _h(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({main:nh.READY,design:nh.READY,series:nh.READY}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionLoad=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Df.getParamModelDataByBrandGoodId(t);case 2:return n=e.sent,i=n.paramModelData,o=bh(n,["paramModelData"]),A=(new mt).parse(i),Object(Pf.attach)(A,Object(Pf.toAttachedMap)(o)),e.next=9,wf.updateAttacheds([A]);case 9:return r.core.design.getCustom().addParamModels(A),r.core.fittingDesign.setFittings(Ch),e.next=13,Object(lh.put)(this.$actionLoad.done.message({params:t,result:nh.SUCCESS}));case 13:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.custom,i=t.needAttach,o=n.getParamModels(),A=n.getParamModelAssemblies(),!i){e.next=6;break}return e.next=6,Promise.all(o.map(function(){var e=Qh(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Df.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(Pf.attach)(t,Object(Pf.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:if(r.core.design.setCustom(n),a=o.filter((function(e){return!e.getAssembly()})),!i){e.next=12;break}return u=[].concat(Bh(a),Bh(A)),e.next=12,wf.updateAttacheds(u);case 12:return e.next=14,Object(lh.put)(this.$actionAddModelToSense.done.message({params:{custom:n,needAttach:i},result:nh.SUCCESS}));case 14:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.map((function(e){var t=e.paramModelData,r=bh(e,["paramModelData"]),n=(new mt).parse(t,new ch);return Object(Pf.attach)(n,Object(Pf.toAttachedMap)(r)),n})),e.next=3,wf.updateAttacheds(i);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,Bh(i)),e.next=6,Object(lh.put)(this.$actionAddParamModelToSense.done.message({params:t,result:nh.SUCCESS}));case 6:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelAssemblyToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.core.design.getCustom(),i=new ch,o=t.map((function(e){return(new xt).parse(e,i)})),A=i.getParamModels(),e.next=6,Promise.all(A.map(function(){var e=Qh(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Df.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(Pf.attach)(t,Object(Pf.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.next=8,wf.updateAttacheds(Bh(o));case 8:return n.addParamModelAssemblies.apply(n,Bh(o)),n.addParamModels.apply(n,Bh(A)),e.next=12,Object(lh.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:t,result:nh.SUCCESS}));case 12:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&Sh(t.prototype,r),n&&Sh(t,n),o}(wi.AXR);function Ph(e){return(Ph="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Th(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oh(e,t)}function Oh(e,t){return(Oh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Nh(e);if(t){var i=Nh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return kh(this,r)}}function kh(e,t){return!t||"object"!==Ph(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Nh(e){return(Nh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}wi.AXR;var Gh=function(e){Fh(r,e);var t=Lh(r);function r(){return Th(this,r),t.apply(this,arguments)}return r}(wi.AXRPartial),Uh=(wi.AXRManager,Math.sqrt(2)),jh=Math.PI/6,Vh=Math.PI/3+Math.PI;function Yh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vh,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:jh,n=e.getPosition(),i=e.getSize(),o=n.clone(),A=i.length()*Uh,a=new je.a(Math.cos(r)*Math.cos(t),Math.cos(r)*Math.sin(t),Math.sin(r)).mul(A).applyMatrix4(e.getMatrix());return{lookAt:o,position:a}}var Hh,Kh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,t=arguments.length>1?arguments[1]:void 0;return new Promise((function(r){setTimeout(r,e,t)}))};function qh(e){var t,r,n,i=function(e){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];e.call.apply(e,[this].concat(r))}};return{promise:new Promise((function(o,A){t=i(o),r=i(A),"number"==typeof e&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(e,"ms")))}),e))})),resolve:t,reject:r}}function Jh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jh(Object(r),!0).forEach((function(t){zh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function zh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xh(e){return e["@type"]===l.THROUGH_SHELL}function Zh(e){var t=e.elements;return(new GA.a.Matrix4).set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}function $h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ep(e,t){var r,n=e.getSize(),i=(new ke.a).getInverse(e.getConcatenatedMatrix()),o=t.clone().applyMatrix4(Zh(i)),A=o.x,a=o.y,s=o.z,u=($h(r={},Hh.TOP,Math.abs(s-n.z/2)),$h(r,Hh.LEFT,Math.abs(A+n.x/2)),$h(r,Hh.BACK,Math.abs(a+n.y/2)),$h(r,Hh.RIGHT,Math.abs(A-n.x/2)),$h(r,Hh.FRONT,Math.abs(a-n.y/2)),$h(r,Hh.BOT,Math.abs(s+n.z/2)),r),c=Object.entries(u).reduce((function(e,t){return t[1]<e[1]?t:e}));return c[1]<.01?+c[0]:Hh.UNKNOWN}function tp(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}!function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.TOP=0]="TOP",e[e.LEFT=1]="LEFT",e[e.BACK=2]="BACK",e[e.RIGHT=3]="RIGHT",e[e.FRONT=4]="FRONT",e[e.BOT=5]="BOT"}(Hh||(Hh={}));var rp=function(){var e,t=(e=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=by(),n=r.baseDesignInfo,e.next=3,n.getCurrentBaseDesignInfo();case 3:return i=e.sent,o=i.designId,A=i.levelid,a={modelid:null!=t?t:"",designid:o,levelid:A,toolType:0},u=n.getStateManager().core.design.getCustom(),t||((c=u.getParamModelAssemblies()).length?a.modelid=c[0].id:(l=u.getParamModels().filter((function(e){return!e.isAppendHardware}))).length&&(a.modelid=l[0].id)),e.next=11,n.getCurrentCustomData(null!=t?t:a.modelid);case 11:return g=e.sent,f=g.toolType,a.toolType=f,e.abrupt("return",a);case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){tp(o,n,i,A,a,"next",e)}function a(e){tp(o,n,i,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}(),np=r(243);function ip(e){return function(e){if(Array.isArray(e))return op(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return op(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return op(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function op(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ap(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ch;r.parseParamModels(e.paramModels).parseParamModelGroups(e.paramModelGroups).parseParamModelAssemblies(e.paramModelCombinations);var n=r.getParamModelAssemblies(),i=(t=ip(r.getParamModels())).concat.apply(t,ip(n.map((function(e){return e.getParamModels()}))));return i=i.filter((function(e){return!e.isAccessory()})),Object(Ot.uniqBy)(np.ParamModelUtils.collectAccessories(i),"id").forEach((function(e){e.toLocalMatrix()})),{paramModels:i,paramModelAssemblies:n}}function ap(e){return(ap="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sp(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function up(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){sp(o,n,i,A,a,"next",e)}function a(e){sp(o,n,i,A,a,"throw",e)}A(void 0)}))}}function cp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gp(e,t){return(gp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pp(e);if(t){var i=pp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hp(this,r)}}function hp(e,t){return!t||"object"!==ap(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pp(e){return(pp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function dp(e){return function(e){if(Array.isArray(e))return Ip(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ip(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ip(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ip(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yp(e){var t=e.map((function(e){return e.subModels&&e.subModels.length?yp(e.subModels):[]})).flat();return t.push.apply(t,dp(e)),t}var Cp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gp(e,t)}(g,e);var t,r,n,i,o,A,a,u,c,l=fp(g);function g(){var e;return cp(this,g),(e=l.apply(this,arguments)).state=e.stateCreator.create({loading:rh.FAIL,allSubModels:[],result:void 0,currModelId:""}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSetModelId=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.currModelId!==t&&(e.result=void 0,e.allSubModels=[]),e.currModelId=t}))})),e.$actionLoadParamModelJsonData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p,d,I,y;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.modelId,n=t.defer,i=t.hasFitting,o=void 0!==i&&i,A=t.force,a=void 0!==A&&A,u=t.templateId,c=this.state.state,l=c.currModelId,g=c.result,f=c.currTemplateId,r){e.next=4;break}throw new Error("not selected model!");case 4:if(h=r===l,p=f===u,d=this.$actionLoadParamModelJsonData,e.prev=7,I=h&&!a&&p?g:void 0,!o||I){e.next=13;break}return e.next=12,av(r,u);case 12:I=e.sent;case 13:if(I){e.next=18;break}return zB.delete(r),e.next=17,sv(r,u);case 17:I=e.sent;case 18:if(I){e.next=20;break}throw new Error("输入json数据出现异常");case 20:return y=h&&!u?yp(I.paramModel):this.state.state.allSubModels,h&&by().scene.$actionToggleSelectModel.dispatch(!0),e.next=24,d.done.dispatch({params:t,result:{ossContent:I,allSubModels:y}});case 24:e.next=31;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,d.failed.dispatch({params:t});case 30:n&&n.reject(e.t0);case 31:case"end":return e.stop()}}),e,this,[[7,26]])}))),t.done.every((function(e){var t=e.params.defer;t&&t.resolve(e.result.ossContent)})),t.started.produce(e.$reducerState,(function(e,t){e.loading=rh.LOADING})),t.done.produce(e.$reducerState,(function(e,t){var r=t.result,n=r.ossContent,i=r.allSubModels,o=t.params,A=o.templateId,a=o.modelId===e.currModelId;e.loading=rh.SUCCESS,e.result=a?n:e.result,e.allSubModels=a?i:e.allSubModels,e.currTemplateId=A})),t.failed.produce(e.$reducerState,(function(e,t){e.loading=rh.FAIL}))})),e}return t=g,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"viewParamModelById",value:(c=up(s.a.mark((function e(t){var r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(Ot.isArray)(t)?t[0]:t,this.$actionSetModelId.dispatchResolve(r),(n=by().scene).cameraController.$actionInit.dispatch(),this.resetView(),(i=this.getAxr(qd).fittingDesignSense).initFittingDesign(),function(){var e=up(s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=qh(),i.$actionLoadFittingDesign.started.dispatch({defer:t,params:{modelid:r}}),e.prev=2,e.next=5,t.promise;case 5:n=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.log(e.t0);case 11:return e.prev=11,e.next=14,c.$actionLoadParamModelJsonData.started.dispatchResolve({modelId:r,hasFitting:!!n});case 14:return e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[2,8,11,15]])})));return function(){return e.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),e.next=12,this.getAxr(Jf).getCurrentCustomData(r);case 12:return o=e.sent,A=new ch,o.context&&A.unSerialize(o.context),a=Ap(o,A),(u=new ze).addParamModels.apply(u,dp(a.paramModels)),u.addParamModelAssemblies.apply(u,dp(a.paramModelAssemblies)),e.next=21,this.getAxr(xh).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!o.context});case 21:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=up(s.a.mark((function e(){var t,r,n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getStateManager().core.design.getCustom(),r=t.getParamModels().filter((function(e){return!e.isAppendHardware})),n=t.getParamModelAssemblies(),i=this.state.state.currModelId,(0!==r.length||0!==n.length)&&i){e.next=6;break}throw new Error("No custom model in the scene!");case 6:return t.clearAllParamModels(),e.next=9,Av(this.state.state.currModelId);case 9:return o=e.sent,A=new ch,o.context&&A.unSerialize(o.context),a=Ap(o,A),t.addParamModels.apply(t,dp(a.paramModels)),t.addParamModelAssemblies.apply(t,dp(a.paramModelAssemblies)),e.next=17,this.getAxr(xh).$actionAddModelToSense.started.dispatchResolve({custom:t,needAttach:!o.context});case 17:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(a=up(s.a.mark((function e(){var t,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Mf(xf.MiniAppSelectModelService),e.next=3,null==t?void 0:t.getSelected();case 3:if(!(null==(r=e.sent)?void 0:r.length)){e.next=9;break}return e.next=7,this.viewParamModelById(Object(Ot.map)(r,"id").filter((function(e){return!!e})));case 7:e.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"getParamModelJsonData",value:(A=up(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.state.state,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r.currModelId:A,u=n.force,c=void 0!==u&&u,l=n.templateId,c){e.next=14;break}return f=qh(),this.getAxr(qd).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:f,params:{modelid:a}}),e.prev=5,e.next=8,f.promise;case 8:g=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.log(e.t0);case 14:return h=qh(o),this.$actionLoadParamModelJsonData.started.dispatch({defer:h,modelId:a,hasFitting:!!g,force:c,templateId:l}),e.abrupt("return",h.promise);case 17:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(e){return A.apply(this,arguments)})},{key:"validateModelStable",value:function(e){var t=this.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(t){for(var r=[t],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var i=r.shift();i.getType()===Yn.ParamModelType.PARAM_PRIMITIVE&&i.getLegal()?(n.total++,i.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(i.id))):r.push.apply(r,dp(i.getChildNodes()))}return n}}},{key:"getTopModelList",value:(o=up(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Mf(wg),e.next=3,r.getTopParamModels(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(i=up(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(Ot.castArray)(t),n=Mf(xf.MiniAppParamModelDataInfoService),i=[],o=r.length-1;case 4:if(!(o>=0)){e.next=10;break}return e.next=7,n.getParamModelPhotoById(r[o]).then((function(e){i.push(e)}));case 7:--o,e.next=4;break;case 10:return e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"resetView",value:function(){var e=this.getStateManager().core,t=e.design.getCustom();t.clearAllParamModels();var r=t.getParamModelAssemblies();r.length&&r.map((function(e){return t.removeParamModelAssembly(e)})),e.fittingDesign.setIntersects([]),e.fittingDesign.setPlankFaceHintModels([]),e.fittingDesign.setFittingHintModels([]),e.fittingDesign.setPlankOutlineHintModels([])}}])&&lp(t.prototype,r),n&&lp(t,n),g}(wi.AXR);function Ep(e){return(Ep="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bp(Object(r),!0).forEach((function(t){mp(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function mp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qp(e){return function(e){if(Array.isArray(e))return bp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return bp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bp(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _p(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Sp(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){_p(o,n,i,A,a,"next",e)}function a(e){_p(o,n,i,A,a,"throw",e)}A(void 0)}))}}function wp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Rp(e,t,r){return(Rp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Tp(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Mp(e,t){return(Mp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Tp(e);if(t){var i=Tp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Pp(this,r)}}function Pp(e,t){return!t||"object"!==Ep(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tp(e){return(Tp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fp={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},Op=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mp(e,t)}(o,e);var t,r,n,i=xp(o);function o(){var e;return wp(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({autoSave:!0,designLoading:rh.FAIL,design:Object(Ot.cloneDeep)(Fp)}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.getAxr(xh);case 1:return i=n.$actionAddModelToSense.done.messageType(),o=this.$actionRestoreFittingDesign.messageType(),e.next=6,Object(lh.take)([i,o]);case 6:A=r.core,a=A.fittingDesign,u=A.design,a.setFittings([]),a.setGrooveFittings([]),u.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),c=this.state.state.design,this.fittingAddDataToFittingDesignSense(c),this.getAxr(Jf).loadFittingHardwareToSense({hardware:c.hardwares}),e.next=1;break;case 16:case"end":return e.stop()}}),e,this)})))})),e.$actionEnableAutoSave=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.autoSave=t}))})),e.initFittingDesign=function(){e.$actionRestoreFittingDesign.dispatch(Object(Ot.cloneDeep)(Fp))},e.getConnectedFittingDesign=function(){var t=Sp(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h=arguments;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],i=e.state.state.design,r){t.next=4;break}return t.abrupt("return",Object(Ot.cloneDeep)(i));case 4:if(o={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){t.next=26;break}A=i.hardwares||{},t.t0=s.a.keys(A);case 8:if((t.t1=t.t0()).done){t.next=18;break}if(c=t.t1.value,!A.hasOwnProperty(c)){t.next=16;break}if(!(l=Object(Ot.find)(A[c]||[],(function(e){return e.id===r})))){t.next=16;break}return u=c,a=l,t.abrupt("break",18);case 16:t.next=8;break;case 18:if(a&&u){t.next=20;break}throw new Error("当前五金不存在!");case 20:g=a.linkedIds,f=function(e){return g.includes(e.id)},o.holes[u]=Object(Ot.filter)(i.holes[u],f),o.grooves[u]=Object(Ot.filter)(i.grooves[u],f),t.next=27;break;case 26:Object(Ot.keys)(o).forEach((function(e){i[e]&&i[e][r]&&(o[e][r]=Object(Ot.cloneDeep)(i[e][r]))}));case 27:return t.abrupt("return",o);case 28:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.fittingAddDataToFittingDesignSense=function(){var t=Sp(s.a.mark((function t(r){var n,i,o,A,a,u,l,g,f,h,p,d;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Kh(1);case 2:n=e.stateManager.core,i=n.fittingDesign,o=n.pad,A=by().fittingDesign.senseSetting.getSenseSettings(),a=Object(Ot.pick)(A,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),u=r.holes,l=void 0===u?{}:u,g=r.grooves,f=void 0===g?{}:g,h=r.hardwareGrooves,p=void 0===h?{}:h,d={findRelativeModel:o.findModelOrAssemblyModelById,transformModel:Un},i.addFittings([].concat(Qp(Dc(l,vp(vp({},d),{},{type:c.HOLE,defaultConfig:a}))),Qp(Dc(f,vp(vp({},d),{},{type:c.GROOVE,defaultConfig:a}))))),i.addGrooveFittings(Dc(p,vp(vp({},d),{},{type:c.HARDWARE_GROOVE,transformModel:Si,defaultConfig:a})));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.appendFittingDataToFittingDesign=function(){var t=Sp(s.a.mark((function t(r,n){var i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.state.state,A=o.design,a=o.autoSave,u=!r.id||r.id===A.id,c=Fp,l=n.timeout,g=n.save,f=void 0===g?a:g,h={id:null!==(i=r.id)&&void 0!==i?i:A.id,holes:vp(vp({},u?A.holes:c.holes),r.holes||{}),grooves:vp(vp({},u?A.grooves:c.grooves),r.grooves||{}),hardwares:vp(vp({},u?A.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:vp(vp({},u?A.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(Ot.pull)(Object(Ot.keys)(h),"id").forEach((function(e){var t=h[e];Object(Ot.keys)(t).forEach((function(e){0===t[e].length&&delete t[e]}))})),!f){t.next=12;break}return p=qh(l),e.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),t.abrupt("return",p.promise);case 12:e.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),e.$actionRestoreFittingDesign=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.design=t}))})),e.$actionLoadFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.$actionLoadFittingDesign,i=t.params,e.next=4,rp(i.modelid);case 4:return o=e.sent,e.prev=5,e.next=8,ZB(vp(vp({},i),o));case 8:A=e.sent,n.done.dispatch({params:t,result:{designData:A,modelId:o.modelid}}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),n.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[5,12]])}))),e.done.every((function(e,t){var r=this.$actionRestoreFittingDesign,n=e.result.designData?e.result.designData:Object(Ot.cloneDeep)(Fp),i=this.getAxr(Cp).state.state.currModelId;e.result.modelId===i&&r.dispatch(n);var o=e.params.defer;o&&o.resolve(e.result.designData)})),e.failed.every((function(e,t){var r,n=this.getAxr(Cp).state.state.currModelId;(null===(r=e.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var i=e.params.defer;i&&i.reject(new Error("load fitting design error"))}))})),e.$actionClearFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(Cp).state.state.currModelId,i=t.modelId,o=void 0===i?n:i,e.next=4,rp(o);case 4:return A=e.sent,a=this.$actionClearFittingDesign,e.prev=6,e.next=9,nv(A);case 9:a.done.dispatch({params:t,result:void 0}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),a.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[6,12]])}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this.getAxr(Cp).state.state.currModelId,(null!==(n=t.params.modelId)&&void 0!==n?n:i)===i&&this.initFittingDesign(),(o=t.params.defer)&&o.resolve();case 5:case"end":return e.stop()}}),e,this)}))),e.failed.every(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return e.stop()}}),e)})))})),e.$actionSaveFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.design,n=void 0===r?this.state.state.design:r,e.next=3,rp(n.id);case 3:return i=e.sent,o=this.$actionSaveFittingDesign,e.prev=5,e.next=8,rv(vp(vp({},n),{},{id:i.modelid}),i);case 8:o.done.dispatch({params:t,result:void 0}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),o.failed.dispatch({params:t,result:e.t0});case 14:case"end":return e.stop()}}),e,this,[[5,11]])}))),e.failed.every(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("save failed!"));case 2:case"end":return e.stop()}}),e)}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.params.design,i=this.getAxr(Cp).state.state.currModelId,!n||n.id&&n.id!==i||this.$actionRestoreFittingDesign.dispatch(n),(o=t.params.defer)&&setTimeout((function(){o.resolve()}));case 5:case"end":return e.stop()}}),e,this)})))})),e}return t=o,(r=[{key:"init",value:function(){Rp(Tp(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&Dp(t.prototype,r),n&&Dp(t,n),o}(Gh);function Lp(e){return(Lp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Np(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Gp(e,t){return(Gp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Up(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Vp(e);if(t){var i=Vp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jp(this,r)}}function jp(e,t){return!t||"object"!==Lp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vp(e){return(Vp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gp(e,t)}(o,e);var t,r,n,i=Up(o);function o(){var e;return kp(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{}}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateFittingHintConf=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setFittingHint",value:function(e){this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"clearFittingHint",value:function(e){var t=e?Object(Ot.omit)(this.state.state.option,e):{};this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"rerenderToSense",value:function(){var e=this.state.state.option,t=this.stateManager.core,r=t.design,n=t.fittingDesign,i=r.getCustom().getParamModels(),o=n.getFittings(),A=n.getGrooveFittings(),a=Object(Ot.map)(e,(function(e,t){var r=i.find((function(e){return e.id===t&&e.isAppendHardware}))||o.find((function(e){return e.id===t}))||A.find((function(e){return e.id===t}));if(r)return new lr({linkModel:r,hintOutline:e.outline})})).filter((function(e){return!!e}));n.setFittingHintModels(a)}}])&&Np(t.prototype,r),n&&Np(t,n),o}(Gh);function Hp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Kp=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__changeMap={}}var t,r,n;return t=e,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({field:"isHidden"},this.isHidden,e),this.isHidden=e}},{key:"__trackUpdateField",value:function(e,t,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,i=e.field;t===r||n.some((function(e){return e.field===i}))||n.push({field:i})}}])&&Hp(t.prototype,r),n&&Hp(t,n),e}();function qp(e){var t,r=new Kp;if(r.id=e.id,e instanceof mt){if(!e.isAppendHardware)return;t=c.HARDWARE,r.isHidden=e.getInvisible(),r.originalData=e.hardwareData}else r.isHidden=!e.visible,t=e.type,r.originalData=e.fittingData;return r.linkParamModelId=e.linkParamModelId,r.modelType=t,r}function Jp(e){return(Jp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wp(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Xp(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function zp(e){return function(e){if(Array.isArray(e))return Zp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Xp(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xp(e,t){if(e){if("string"==typeof e)return Zp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zp(e,t):void 0}}function Zp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ed(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function td(e,t){return(td=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=id(e);if(t){var i=id(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nd(this,r)}}function nd(e,t){return!t||"object"!==Jp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function id(e){return(id=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var od=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&td(e,t)}(o,e);var t,r,n,i=rd(o);function o(){return $p(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getAllFittingModels",value:function(e){var t=new Set;if(e){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(e);if(!r)return[];for(var n=[r];n.length;){var i=n.shift();t.add(i.id),n.push.apply(n,zp((null==i?void 0:i.getChildNodes())||[]))}}var o=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),A=this.stateManager.core.fittingDesign.getFittings(),a=this.stateManager.core.fittingDesign.getGrooveFittings(),s=[].concat(zp(o),zp(A),zp(a));return t.size>0&&(s=s.filter((function(e){return t.has(e.linkParamModelId)}))),s.map((function(e){return qp(e)}))}},{key:"findHardwareParamModels",value:function(e){var t,r=[],n=Wp(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.isAppendHardware&&r.push(i),r.push.apply(r,zp(this.findHardwareParamModels(i.getChildNodes())))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"save",value:function(e){var t,r=[],n=[],i=Wp(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.modelType===c.HARDWARE?r.push(o):n.push(o)}}catch(e){i.e(e)}finally{i.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(e){var t=this.stateManager.core.pad;e.forEach((function(e){var r=t.findModelOrAssemblyModelById(e.id);if(r){var n=e.__changeMap.update;(void 0===n?[]:n).forEach((function(t){"isHidden"===t.field&&r.setInvisible(e.getHidden())})),e.__changeMap.update=[]}})),UB().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(e){var t=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getFittingHintModels();e.forEach((function(e){var i;e.modelType===c.HARDWARE_GROOVE?i=r.find((function(t){return t.id===e.id})):e.modelType!==c.HOLE&&e.modelType!==c.GROOVE||(i=t.find((function(t){return t.id===e.id})));var o=n.find((function(t){return t.linkModel.id===e.id}));if(i){var A=e.__changeMap.update;(void 0===A?[]:A).forEach((function(t){"isHidden"===t.field&&(null==i||i.setVisible(!e.getHidden()),null==o||o.setVisible(!e.getHidden()))})),e.__changeMap.update=[]}}))}}])&&ed(t.prototype,r),n&&ed(t,n),o}(Gh);function Ad(e){return(Ad="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ad(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function sd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ud(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sd(Object(r),!0).forEach((function(t){cd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function cd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ld(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function gd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function hd(e,t){return(hd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Id(e);if(t){var i=Id(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return dd(this,r)}}function dd(e,t){return!t||"object"!==Ad(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Id(e){return(Id=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hd(e,t)}(a,e);var t,r,n,i,o,A=pd(a);function a(){var e;return gd(this,a),(e=A.apply(this,arguments)).state=e.stateCreator.create({intersectedLoading:rh.FAIL,intersectedResult:void 0,intersectedVisible:!1}),e.$reducerState=e.reducerCreator.create(e.state),e._getParamModelIntersectedCallback=[],e.$actionLoadParamModelIntersectedData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t,r){var n,i,o,A,a,u,c,l,g;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rp(t.modelId);case 2:return n=e.sent,i=Mf(dg),o=t.modelId,A=void 0===o?n.modelid:o,a=t.defer,u=ld(t,["modelId","defer"]),c=by().viewParamModel.state.state.currModelId===A,l=this.$actionLoadParamModelIntersectedData,e.prev=7,e.next=10,i.getIntersectedById(ud({modelId:A},u));case 10:if(g=e.sent,!c){e.next=14;break}return e.next=14,l.done.dispatch({params:t,result:{result:g,modelId:A}});case 14:a&&a.resolve(g),e.next=22;break;case 17:return e.prev=17,e.t0=e.catch(7),e.next=21,l.failed.dispatch({params:t});case 21:a&&a.reject(e.t0);case 22:case"end":return e.stop()}}),e,this,[[7,17]])}))),t.done.every((function(t,r){var n=t.params.defer,i=by().viewParamModel.state.state.currModelId;n&&n.resolve(t.result.result),t.result.modelId===i&&e.$actionAddIntersectedDataToSense.dispatch(t.result.result)})),t.failed.every((function(t,r){e._getParamModelIntersectedCallback.forEach((function(e){e.reject(new Error("load json error!"))}))})),t.started.produce(e.$reducerState,(function(e,t){e.intersectedLoading=rh.LOADING})),t.done.produce(e.$reducerState,(function(e,t){e.intersectedLoading=rh.SUCCESS,e.intersectedResult=t.result.result})),t.failed.produce(e.$reducerState,(function(e,t){e.intersectedLoading=rh.FAIL}))})),e.$actionAddIntersectedDataToSense=e.unitCreator.sync((function(t){t.every((function(t,r){var n=r.core,i=n.fittingDesign,o=n.pad,A=e.state.state.intersectedVisible,a=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),s=a.intersectedColor,u=a.intersectedBodyColor,c=a.intersectedThroughColor,g=a.grooveIntersectedColor,h=a.grooveIntersectedBodyColor;i.setIntersects([]);var p=t.option,d=void 0===p?{}:p,I=t.intersectedGroups,y=Object(Ot.map)(I,(function(e){var t=!0===d.references?1:0,r=e.intersecteds[t],n=r["@type"],i=e.intersectType;if(void 0!==d.plankFaceIds){var A=Xh(r)?null:r.plankFaceId;if(!d.plankFaceIds.includes(A))return!1}var a=o.findModelOrAssemblyModelById(r.linkedModelId);if(a){var p=hi(e,r,a),I=new Map([[f.BOTH_PLANK,new Map([[l.FACE,s],[l.SHELL,u],[l.THROUGH_SHELL,c]])],[f.PLANK_FURNITURE,new Map([[l.FACE,g],[l.SHELL,h]])]]).get(i).get(n);return p.setViewColor(I),p}})).filter((function(e){return!!e}));i.setIntersects(y),A||r.kaf.invisibleManager.hide("scene3d",hh,y.map((function(e){return e.id})))}))})),e.$actionToggleShowIntersected=e.unitCreator.sync((function(t){t.latest((function(e,t){var r=t.core.fittingDesign;e?t.kaf.invisibleManager.display("scene3d",hh,r.getIntersects().map((function(e){return e.id}))):t.kaf.invisibleManager.hide("scene3d",hh,r.getIntersects().map((function(e){return e.id})))})),t.produce(e.$reducerState,(function(e,t){e.intersectedVisible=t}))})),e.toggleShowIntersectGroupData=function(t){var r=e.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");e.$actionAddIntersectedDataToSense.dispatch(ud(ud({},r),{},{option:t}))},e}return t=a,(r=[{key:"getParamModelIntersectedData",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=by().viewParamModel.state.state.currModelId,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r:A,u=ld(n,["timeout","modelId"]),c=qh(o),this.$actionLoadParamModelIntersectedData.started.dispatch(ud(ud({modelId:a},u),{},{defer:c})),this._getParamModelIntersectedCallback.push(c),l=function(){var e=g._getParamModelIntersectedCallback.indexOf(c);g._getParamModelIntersectedCallback.splice(e,1)},e.abrupt("return",c.promise.then((function(e){return l(),e})).catch((function(e){return l(),Promise.reject(e)})));case 7:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){ad(o,r,n,A,a,"next",e)}function a(e){ad(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&fd(t.prototype,r),n&&fd(t,n),a}(Gh);function Cd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ed(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cd(Object(r),!0).forEach((function(t){Bd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Bd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vd(e,t){var r=t.x/2,n=t.y/2,i=t.z/2,o=[{x:-r,y:-n,z:i},{x:r,y:-n,z:i},{x:r,y:n,z:i},{x:-r,y:n,z:i}],A=o.map((function(e){return Ed(Ed({},e),{},{z:-e.z})}));switch(e){case 0:return o;case 1:return[o[0],A[0],A[3],o[3]];case 2:return[o[0],A[0],A[1],o[1]];case 3:return[o[1],A[1],A[2],o[2]];case 4:return[o[2],A[2],A[3],o[3]];case 5:return A}return[]}function md(e){return(md="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _d(e,t){return(_d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Dd(e);if(t){var i=Dd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wd(this,r)}}function wd(e,t){return!t||"object"!==md(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dd(e){return(Dd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Rd={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},Md=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_d(e,t)}(o,e);var t,r,n,i=Sd(o);function o(){var e;return Qd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{},defaultConfig:Rd}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateDefaultOption=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.defaultConfig=Object(Ot.extend)({},e.defaultConfig,t)}))})),e.$actionUpdateHintOption=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setDefaultHintConfig",value:function(e){this.$actionUpdateDefaultOption.dispatch(e)}},{key:"setModelHint",value:function(e){var t=this,r=Object(Ot.mapValues)(e,(function(e){return function(e,t){var r={};return Object(Ot.isObject)(e.hintOutline)?r.hintOutline=e.hintOutline:!0===e.hintOutline&&(r.hintOutline=t.outline),e.hintPlankFace&&e.hintPlankFace.length&&(r.hintPlankFace=e.hintPlankFace.map((function(e){var r="color"in e?e:t.plankFace,n=r.color,i=r.opacity;return Object(Ot.isArray)(e.plankFaceId)?e.plankFaceId.map((function(e){return{color:n,opacity:i,plankFaceId:e}})):{plankFaceId:e.plankFaceId,color:n,opacity:i}})).flat()),r}(e,t.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(e){var t=e?Object(Ot.omit)(this.state.state.option,e):{};this.setModelHint(t)}},{key:"rerenderToSense",value:function(){var e=this.stateManager.core,t=e.fittingDesign,r=e.pad,n=this.state.state.option,i=Object(Ot.map)(n,(function(e,t){var n=r.findModelOrAssemblyModelById(t);if(n)return function(e,t){var r={linkModel:t};if(e.hintPlankFace&&e.hintPlankFace.length){var n=t.getSize();r.plankFaces=e.hintPlankFace.map((function(e){var t=Ln(e.plankFaceId,je.a).mul(.1),r=vd(e.plankFaceId,n).map((function(e){var r=new je.a(e).add(t);return{x:r.x,y:r.y,z:r.z}}));return Ed(Ed({},e),{},{points:r})}))}if(e.hintOutline&&(r.hintOutline=e.hintOutline),r.plankFaces||r.hintOutline)return new Sn(r)}(e,n)})).filter((function(e){return!!e}));t.setPlankFaceHintModels(i)}}])&&bd(t.prototype,r),n&&bd(t,n),o}(Gh);function xd(e){return(xd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Td(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Fd(e,t){return(Fd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Od(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=kd(e);if(t){var i=kd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ld(this,r)}}function Ld(e,t){return!t||"object"!==xd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kd(e){return(kd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fd(e,t)}(o,e);var t,r,n,i=Od(o);function o(){var e;return Pd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,intersectedThroughColor:9498256,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:De,holeOpacity:1,grooveOpacity:1}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSenseSetting=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){t.renderIgnoreCategory&&(t.renderIgnoreCategory=Object(Ot.castArray)(t.renderIgnoreCategory)),Object(Ot.extend)(e,t)}))})),e}return t=o,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&Td(t.prototype,r),n&&Td(t,n),o}(Gh);function Gd(e){return(Gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ud(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Vd(e,t){return(Vd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Kd(e);if(t){var i=Kd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Hd(this,r)}}function Hd(e,t){return!t||"object"!==Gd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Kd(e){return(Kd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vd(e,t)}(o,e);var t,r,n,i=Yd(o);function o(){var e;return Ud(this,o),(e=i.apply(this,arguments)).fittingDesignSense=e.partialCreator.create(Op),e.intersected=e.partialCreator.create(yd),e.senseSetting=e.partialCreator.create(Nd),e.fittingModel=e.partialCreator.create(od),e.plankFaceHint=e.partialCreator.create(Md),e.fittingHint=e.partialCreator.create(Yp),e}return t=o,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&jd(t.prototype,r),n&&jd(t,n),o}(wi.AXR),Jd=r(718),Wd=r.n(Jd);function zd(e){return(zd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $d(e,t){return($d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=rI(e);if(t){var i=rI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return tI(this,r)}}function tI(e,t){return!t||"object"!==zd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rI(e){return(rI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$d(e,t)}(o,e);var t,r,n,i=eI(o);function o(){return Xd(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({type:v.ATTRIBUTE,attr:"isHidden"},this.isHidden,e),this.isHidden=e}}])&&Zd(t.prototype,r),n&&Zd(t,n),o}(ce);function iI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function oI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?iI(Object(r),!0).forEach((function(t){AI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function AI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var aI={x:0,y:0,z:0},sI={x:0,y:0,z:0};function uI(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,i=t.category,o=t.origin,A=new nI,a=!(e instanceof mt)||e.isRoot(),s=n||a?e:e.getRoot(),u=s instanceof mt;A.id=s.id,A.isRoot=!u||s.isRoot(),A.isHidden=!!s.getInvisible();var c=b.ASSEMBLY;if(u?c=b.COMMON:e.isTemplateAssembly()&&(c=b.TEMPLATE_ASSEMBLY),A.modelType=c,A.position=A.isRoot?aI:s.getPosition(),A.rotation=A.isRoot?sI:s.getRotation(),A.size="function"==typeof s.getScaledSize?s.getScaledSize():s.getSize(),A.params=lI(s),A.category=i||s.getCategory().categoryId,u){var l=s.getModel();A.productId=null==l?void 0:l.obsBrandGoodId}return n&&(A.root=n),A.isRoot&&(A._origin=o),A.children=(u?s.getChildren():s.getParamModels()).map((function(e){return uI(e,t,r,n||A)})),A.accessories=(u?s.getAccessories():[]).map((function(e){return uI(e,t,r,n||A)})),r.set(A.id,A),s!==e&&r.has(e.id)?r.get(e.id):A}function cI(e,t){var r=e.isRoot?e:e.root;if(!r)return{};var n=r._changeMap,i=t.getUnSafeParamModelFromParamModelLite(r);if(!i)return{};var o=i.getCustom(),A=n.cloned;return A&&(i=i.clone(!1)),i=function e(t,r,n,i){var o=t._changeMap;if(o.cloned&&o.deleted)return;if(o.deleted)return n.dispose(),n;var A=o.update,a=void 0===A?[]:A,s=o.addNodes,u=void 0===s?[]:s,c=i?oI({},i):{parentModelLite:t,parentModel:n,rootModelLite:t,rootModel:n};a.forEach((function(e){if(e.type===v.ATTRIBUTE)switch(e.attr){case"position":n.setPosition(t.getPosition());break;case"rotate":n.setRotation(t.getRotation());break;case"isHidden":n.setInvisible(t.getHidden()),function(e){var t=e.getInvisible();by().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===e.id&&r.setVisible(!t)}))}(n)}if(e.type===v.STORE){var i=n.getParamStore().getParam(e.attr),o=t.getParam(e.attr);if(i&&o){var A=o.getValue();[Yn.ParamType.MATERIAL,Yn.ParamType.SHAPE].includes(i.getType())&&(A=r.getUnSafeObsBrandGoodToBrandGoodId(A)),A&&i.setValue(A),o.getPrimitiveOverride()!==i.getPrimitiveOverride()&&i.setPrimitiveOverride(o.getPrimitiveOverride())}}})),u.forEach((function(i){var o=i.type,A=i.linkId,a=(o===Q.CHILD?t.getChild():t.getAccessory()).find((function(e){return e.id===A}));if(a){var s=r.getUnSafeParamModelFromParamModelLite(a);s&&((a._changeMap.cloned||a._origin!==C.SENSE)&&(s=s.clone(!1)),o===Q.CHILD?(s.setIsAppend(!0),s.setAppendType(Wd.a.CENTER),n.addChild(s)):n.addAccessory(s),e(a,r,s,oI(oI({},c),{},{parentModel:n,parentModelLite:t})),(a._changeMap.cloned||a._origin!==C.SENSE)&&s.assignUniqueId())}}));var l=function(i){return function(o){if(!u.some((function(e){return e.type===i&&e.linkId===o.id}))){var A=i===Q.ACCESSORY?n.getAccessories():n.getChildren(),a=o._changeMap.originId||o.id,s=A.find((function(e){return e.id===a}));s&&e(o,r,s,oI(oI({},c),{},{parentModel:n,parentModelLite:t}))}}};return t.getChild().forEach(l(Q.CHILD)),t.getAccessory().forEach(l(Q.ACCESSORY)),n}(r,t,i),A&&i&&i.assignUniqueId(),{create:A,custom:o,model:i}}function lI(e){var t=new Map;return e.getParamStore().forEach((function(e,r){t.set(r,function(e){var t=new ne;if(t.data={type:e.getType(),displayName:e.getDisplayName(),name:e.getName(),value:e.getValue(),max:e.getMax(),min:e.getMin(),editable:e.getEditable(),optionValues:e.getOptionValues(),recommendValues:e.getRecommendValues(),primitiveOverride:e.getPrimitiveOverride(),step:e.getStep()},[_.MATERIAL,_.SHAPE].includes(t.getType())){var r=e.getProduct();t.data.value=r?r.obsBrandGoodId:""}return t}(e))})),t}var gI=r(125),fI=r.n(gI),hI={maxAge:6e5,max:20},pI=(uh.SHADING,uh.OUTLINE_WITH_SHADING,uh.TRANSLUCENT,uh.OUTLINE_AND_TRANSLUCENT,[Ve.ParamModelType.PARAM_ENTITY,Ve.ParamModelType.PARAM_FURNITURE,Ve.ParamModelType.PARAM_PRIMITIVE]);function dI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function II(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dI(Object(r),!0).forEach((function(t){yI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function yI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function EI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){CI(o,n,i,A,a,"next",e)}function a(e){CI(o,n,i,A,a,"throw",e)}A(void 0)}))}}fI()(function(){var e=EI(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=lc(),e.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:t});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),II({promise:!0},hI));function BI(){return(BI=EI(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lc().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vI(){return(vI=EI(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lc().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var mI=fI()((function(e){return BI.apply(this,arguments)}),II(II({},hI),{},{promise:!0})),QI=fI()((function(e){return vI.apply(this,arguments)}),II(II({},hI),{},{promise:!0}));function bI(e){return function(e){if(Array.isArray(e))return _I(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return _I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _I(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function SI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function wI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var DI=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cached=new Map}var t,r,n,i,o;return t=e,(r=[{key:"setProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(t);r||(r=new Map,this.cached.set(t,r)),r.set(e.brandGoodId,e.obsBrandGoodId),r.set(e.obsBrandGoodId,e.brandGoodId)}},{key:"getToggledBrandGood",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(t=this.cached.get(r))||void 0===t?void 0:t.get(e)}},{key:"removeCachedModel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(e)}},{key:"safeGetToggleBrandGood",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u=this,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(Ot.castArray)(t),i=[],o=[],A=new Map,n.forEach((function(e){var t=u.getToggledBrandGood(e,r);t?A.set(e,t):/^[0-9]$/.test(e.toString())?o.push(e):i.push(e)})),a=function(e){return[].concat(bI(e.hardwares||[]),bI(e.textures||[]),bI(e.virtualModels||[]),bI(e.paramModelProducts||[]),bI(e.moldings||[]))},!i.length){e.next=12;break}return e.next=10,mI(i).then(a);case 10:e.sent.forEach((function(e){u.setProduct(e,r)}));case 12:if(!o.length){e.next=17;break}return e.next=15,QI(o).then(a);case 15:e.sent.forEach((function(e){u.setProduct(e,r)}));case 17:return[].concat(i,o).forEach((function(e){var t=u.getToggledBrandGood(e,r);t&&A.set(e,t)})),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){SI(o,r,n,A,a,"next",e)}function a(e){SI(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&wI(t.prototype,r),n&&wI(t,n),e}();function RI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function MI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){RI(o,n,i,A,a,"next",e)}function a(e){RI(o,n,i,A,a,"throw",e)}A(void 0)}))}}function xI(e){return function(e){if(Array.isArray(e))return PI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return PI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return PI(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function TI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var OI=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new DI;TI(this,e),this.callback=t,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var t,r,n,i;return t=e,(r=[{key:"getParamModelFromId",value:function(e){if(this.cached.has(e))return this.cached.get(e);var t=this.callback(e);return t?(this.cached.set(e,t),t):void 0}},{key:"getUnSafeParamModel",value:function(e){return this.cached.get(e)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(e){return this.brandGoodsTranslate.getToggledBrandGood(e)}},{key:"addParamModelLite",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=this.models).push.apply(e,xI(r.map((function(e){return e.root||e}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(e){var t,r=e.root||e;switch(e._origin||r._origin){case C.BRANDGOOD:case C.CATEGORY:break;case C.SENSE:var n=r._changeMap.originId||r.id;t=this.getUnSafeParamModel(n)}if(!t||r===e)return t;for(var i,o=e._changeMap.originId||e.id,A=[t];i=A.pop();){if(i.id===o)return i;A.push.apply(A,xI(i.getChildNodes()))}}},{key:"attach",value:(i=MI(s.a.mark((function e(){var t,r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(i=t.pop())){e.next=18;break}A=(o=i)._changeMap,a=o._origin,e.t0=a,e.next=e.t0===C.SENSE?8:e.t0===C.CATEGORY||e.t0===C.BRANDGOOD||e.t0===C.TEMPLATE_ID?11:12;break;case 8:return u=A.originId||i.id,r.modelIds.push(u),e.abrupt("break",12);case 11:return e.abrupt("break",12);case 12:if(!A.deleted){e.next=14;break}return e.abrupt("continue",3);case 14:A.update&&A.update.forEach((function(e){if(i&&e.type===v.STORE&&i.hasParam(e.attr)){var t=i.getParam(e.attr);t&&[_.MATERIAL,_.SHAPE].includes(t.getType())&&t.getValue()&&n.push(t.getValue())}})),t.push.apply(t,xI(i.getChild()).concat(xI(i.getAccessory()))),e.next=3;break;case 18:return e.next=20,Promise.allSettled(xI(Object(Ot.uniq)(r.modelIds).map(function(){var e=MI(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.getParamModelFromId(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 20:return e.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&FI(t.prototype,r),n&&FI(t,n),e}(),LI=r(732);function kI(e){return(kI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function NI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function UI(e,t,r){return(UI="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=HI(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function jI(e,t){return(jI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function VI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=HI(e);if(t){var i=HI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return YI(this,r)}}function YI(e,t){return!t||"object"!==kI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function HI(e){return(HI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var KI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jI(e,t)}(o,e);var t,r,n,i=VI(o);function o(){var e;return NI(this,o),(e=i.apply(this,arguments)).$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(xh),e.next=3,Object(lh.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==nh.SUCCESS){e.next=13;break}return e.next=6,Object(lh.put)(this.$actionSetCamera.message(!0));case 6:return e.next=9,Object(lh.take)(this.$actionSyncCamera.messageType());case 9:return e.next=11,Object(lh.put)(this.$actionSetCamera.message(!1));case 11:e.next=6;break;case 13:case"end":return e.stop()}}),e,this)})))})),e.$actionSyncCamera=e.unitCreator.sync((function(e){})),e.$actionSetCamera=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.core.design.getCustom(),i=n.getParamModels(),o=n.getParamModelAssemblies(),(A=r.scene3D).updateEnableCameraAnimation(!1),a=i.length?Object(LI.computeAssemblyBox)(i.map((function(e){return e.getBox3()})),i[0].getMatrix4()):Object(LI.computeAssemblyBox)(o.map((function(e){return e.getBox3()})),o[0].getMatrix4()),u=Yh(a),A.updateInitCameraAttributes(u),t?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 9:case"end":return e.stop()}}),e)})))})),e}return t=o,(r=[{key:"init",value:function(){UI(HI(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&GI(t.prototype,r),n&&GI(t,n),o}(Gh);function qI(e){return(qI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JI(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=zI(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function WI(e){return function(e){if(Array.isArray(e))return XI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||zI(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zI(e,t){if(e){if("string"==typeof e)return XI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?XI(e,t):void 0}}function XI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ZI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function $I(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ZI(o,n,i,A,a,"next",e)}function a(e){ZI(o,n,i,A,a,"throw",e)}A(void 0)}))}}function ey(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ty(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ry(e,t,r){return(ry="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ay(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function ny(e,t){return(ny=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ay(e);if(t){var i=Ay(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return oy(this,r)}}function oy(e,t){return!t||"object"!==qI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ay(e){return(Ay=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ay=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ny(e,t)}(u,e);var t,r,n,i,o,A,a=iy(u);function u(){var e;return ey(this,u),(e=a.apply(this,arguments)).cameraController=e.partialCreator.create(KI),e.state=e.stateCreator.create({renderMode:NA.RenderMode.SHADING,translucent:!1,selectable:!0}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionMergeState=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){Object.assign(e,t)}))})),e.$actionToggleRenderMode=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=NA.RenderMode.SHADING,i=!1,e.t0=t.mode,e.next=e.t0===uh.SHADING?5:e.t0===uh.OUTLINE_WITH_SHADING?7:e.t0===uh.TRANSLUCENT?9:e.t0===uh.OUTLINE_AND_TRANSLUCENT?11:14;break;case 5:return n=NA.RenderMode.SHADING,e.abrupt("break",14);case 7:return n=NA.RenderMode.OUTLINE_WITH_SHADING,e.abrupt("break",14);case 9:return i=!0,e.abrupt("break",14);case 11:return n=NA.RenderMode.OUTLINE_WITH_SHADING,i=!0,e.abrupt("break",14);case 14:return e.next=16,Object(lh.put)(this.$actionMergeState.message({renderMode:n,translucent:i}));case 16:UB().viewer.toggleShowModelOutline(n===NA.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),UB().viewer.triggerReducer(),this.emit(ah.renderModeChange);case 20:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderBorder=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?NA.RenderMode.OUTLINE_WITH_SHADING:NA.RenderMode.SHADING,e.next=3,Object(lh.put)(this.$actionMergeState.message({renderMode:n}));case 3:UB().viewer.toggleShowModelOutline(n===NA.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),this.emit(ah.renderModeChange);case 6:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderTranslucent=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(lh.put)(this.$actionMergeState.message({translucent:t}));case 2:UB().viewer.triggerReducer(),this.emit(ah.renderModeChange);case 4:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleSelectModel=e.unitCreator.sync((function(e){e.every(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(lh.put)(this.$actionMergeState.message({selectable:t}));case 2:case"end":return e.stop()}}),e,this)})))})),e}return t=u,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var e=this;ry(Ay(u.prototype),"init",this).call(this),UB().viewer.registerReducer((function(t,r,n){n.opacity=e.state.state.translucent?sh.translucentModel:sh.opaqueModel})),UB().viewer.registerReducer((function(e,t,r){r.visible=!e.getInvisible()}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(e){return!e.isAppendHardware}))}},{key:"getAllCustomModels",value:(A=$I(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getAllParamModels(),e.abrupt("return",t.map((function(e){return uI(e,{origin:C.SENSE})})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=$I(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(t))){e.next=3;break}return e.abrupt("return",uI(r,{origin:C.SENSE}));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=$I(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t,n=this.getStateManager().core.pad,(i=new OI(n.findModelOrAssemblyModelById)).addParamModelLite.apply(i,WI(r)),e.next=6,i.attach();case 6:return e.next=8,Promise.all(r.map((function(e){return cI(e,i)})));case 8:o=e.sent,A=[],a=[],u=JI(o);try{for(u.s();!(c=u.n()).done;)(l=c.value).create&&l.custom&&l.model&&A.push(l),!l.create&&l.model&&a.push(l.model)}catch(e){u.e(e)}finally{u.f()}(A.length||a.length)&&A.length&&A.forEach((function(e){var t;null===(t=e.custom)||void 0===t||t.addParamModels(e.model)})),UB().viewer.triggerReducer();case 15:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})}])&&ty(t.prototype,r),n&&ty(t,n),u}(wi.AXR);function sy(e){return(sy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function cy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?uy(Object(r),!0).forEach((function(t){ly(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ly(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return fy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function py(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dy(e,t,r){return(dy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ey(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Iy(e,t){return(Iy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ey(e);if(t){var i=Ey(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Cy(this,r)}}function Cy(e,t){return!t||"object"!==sy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ey(e){return(Ey=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var By={rawSelected:[],selectedData:[],selectedDataV2:[]},vy=function(e,t){var r=e.entityId+"%%"+e.entityType.toString(),n=t.entityId+"%%"+t.entityType.toString();return r>n?1:r===n?0:-1},my=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Iy(e,t)}(o,e);var t,r,n,i=yy(o);function o(){var e;return hy(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create(By).mutable(),e.onModelsChange=function(){var t=e.selected.map((function(t){return e.stateManager.core.pad.findModel(t.entityId)})).filter((function(e){return!!e})),r=e.state.state.selectedData;t.length===r.length&&Object(Ot.unzip)([t,r]).every((function(e){var t=gy(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return cy(cy({},e),{},{selectedData:t})})),e.emit(o.EVENT_SELECT_CHANGED))},e.onModelChangeV2=function(){setTimeout((function(){e.onModelsChange()}),0);var t=e.stateManager.core,r=t.pad,n=t.fittingDesign,i=n.getFittings(),A=n.getGrooveFittings(),a=e.rawSelected.map((function(e){switch(e.entityType){case yA:return r.findModelEx(e.entityId,yu);case IA:return r.findParamModelAssembly(e.entityId);case gh:return i.find((function(t){return t.id===e.entityId}));case fh:return A.find((function(t){return t.id===e.entityId}));default:return}})).filter((function(e){return!!e})),s=e.state.state.selectedDataV2;s.length===a.length&&Object(Ot.unzip)([s,a]).every((function(e){var t=gy(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return cy(cy({},e),{},{selectedDataV2:a})})),e.emit(o.EVENT_SELECT_CHANGED_V2))},e._onSelectionChange=function(){e.onStateChange()},e}return t=o,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(e){this.selectionStateManager.select(e)}},{key:"unSelect",value:function(e){this.selectionStateManager.unSelect(e)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){dy(Ey(o.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),dy(Ey(o.prototype),"release",this).call(this)}},{key:"onEnable",value:function(e){dy(Ey(o.prototype),"onEnable",this).call(this,e),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Xa.UPDATE,this._onSelectionChange),this.stateManager.core.pad.on(Cu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),Tt.on(Mt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(e){this.stateManager.core.pad.off(Cu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),Tt.off(Mt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return By})),this.selectionStateManager.off(Xa.UPDATE,this._onSelectionChange),this.rawSelected=[],this.selected=[],dy(Ey(o.prototype),"onDisable",this).call(this,e)}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value;if(e.sort(vy),this.rawSelected!==e){this.rawSelected=e;var t=this.resolveSelected(e)||[];this.selectedIsChanged(this.selected,t)&&(this.selected=t),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(e){return e.filter((function(e){return e.entityType===yA}))}},{key:"selectedIsChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),n=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),i=0,o=n.length;i<o;++i)if(r[i]!==n[i])return!0;return!1}}])&&py(t.prototype,r),n&&py(t,n),o}(wi.AXR);my.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",my.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var Qy={entry:xh,scene:ay,select:my,fittingDesign:qd,baseDesignInfo:Jf,viewParamModel:Cp};function by(){return UB().axr.axrs}var _y=Object(dA.getConnector)(),Sy=_y.connect,wy=_y.setRootState;function Dy(e,t,r){return Sy((function(){return e(by(),UB().getStateManager())}),t,r)}var Ry=r(1133),My=r.n(Ry);function xy(e){return(xy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Py(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ty(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Fy(e,t,r){return t&&Ty(e.prototype,t),r&&Ty(e,r),e}function Oy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ly(e,t)}function Ly(e,t){return(Ly=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ky(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Gy(e);if(t){var i=Gy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ny(this,r)}}function Ny(e,t){return!t||"object"!==xy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gy(e){return(Gy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Uy=Symbol("layout"),jy=Dy((function(e){return{status:e.entry.state}}),(function(e){return{status:e.status.main}}),function(e){Oy(r,e);var t=ky(r);function r(){return Py(this,r),t.apply(this,arguments)}return Fy(r,[{key:"render",value:function(){return this.state.views.map((function(e){return e.content}))}}]),r}(Di.MountPoint)),Vy=function(e){Oy(r,e);var t=ky(r);function r(){return Py(this,r),t.apply(this,arguments)}return Fy(r,[{key:"render",value:function(){return Mi.a.createElement(jy,{mountPointId:Uy})}}]),r}(Mi.a.PureComponent);function Yy(e){return(Yy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ky(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jy(e,t)}function Jy(e,t){return(Jy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xy(e);if(t){var i=Xy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zy(this,r)}}function zy(e,t){return!t||"object"!==Yy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xy(e){return(Xy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zy=Dy((function(e,t){return{scene3D:t.scene3D}}),(function(e){var t=e.scene3D;return{cameraType:t.cameraType,cameraAttributes:t.cameraAttributes,initCameraAttributes:t.initCameraAttributes,perspectiveCameraMode:t.perspectiveCameraMode,perspectiveCameraFov:t.perspectiveCameraFov,groundGridConfig:t.groundGridConfig,enableCameraAnimation:t.enableCameraAnimation,renderMode:t.renderMode}}),function(e){qy(r,e);var t=Wy(r);function r(){return Ky(this,r),t.apply(this,arguments)}return r}(Di.Scene3D)),$y=Dy((function(){return{}}),(function(){return{}}),function(e){qy(o,e);var t,r,n,i=Wy(o);function o(){var e;return Ky(this,o),(e=i.apply(this,arguments)).onInit=function(e){var t=e.viewer.config;t.autoInstance.enabled.set(!0),t.popMeshMerge.enabled.set(!0),t.background.active.set(NA.BackgroundMode.SolidColorBackground),t.background.solid.color.set(new NA.Color(Ah.sceneBG)),t.ground.enabled.set(!1),t.postEffect.planarShadow.enabled.set(!1),t.postEffect.taa.enabled.set(!1),t.staticFrameCache.enabled.set(!1),t.isExtraCopyBeforeScreenEnabled.set(!1),t.postEffect.ao.enabled.set(!1),UB().viewer.onScene3DInit(e)},e.onGrabStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateGrabing(!0)},e.onGrabEnd=function(){e.props.rootState.scene3D.updateGrabing(!1)},e.onZoomStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateZooming(!0)},e.onZoomEnd=function(){e.props.rootState.scene3D.updateZooming(!1)},e.onCameraAnimationEnd=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1)},e}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.rootState.scene3D,r=e.containerId,n=e.size;return Mi.a.createElement(Zy,{onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:t.updateScale,onCameraAttributesChange:t.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd})}}])&&Hy(t.prototype,r),n&&Hy(t,n),o}(Mi.a.PureComponent));function eC(e){return(eC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nC(e,t){return(nC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=AC(e);if(t){var i=AC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return oC(this,r)}}function oC(e,t){return!t||"object"!==eC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function AC(e){return(AC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var aC=Dy((function(e,t){return{scene3D:t.scene3D}}),(function(e){return{size:e.scene3D.size}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nC(e,t)}(o,e);var t,r,n,i=iC(o);function o(){var e;return tC(this,o),(e=i.apply(this,arguments)).rootRef=Mi.a.createRef(),e.updateLayout=Object(Ot.throttle)((function(){var t=e.rootRef.current;if(t){var r=t.getBoundingClientRect();e.props.rootState.scene3D.updateSize(new _r.a(r.width,r.height))}}),200),e}return t=o,(r=[{key:"componentDidMount",value:function(){this.updateLayout(),window.addEventListener("resize",this.updateLayout)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateLayout),this.updateLayout.cancel()}},{key:"render",value:function(){var e=this.props,t=e.size,r=e.className;return Mi.a.createElement("div",{ref:this.rootRef,id:oh.SCENE_ID,className:r},Mi.a.createElement($y,{containerId:oh.SCENE_ID,size:new u.Vector2d(t.x,t.y)}))}}])&&rC(t.prototype,r),n&&rC(t,n),o}(Mi.a.PureComponent));r(2093);function sC(e){return(sC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function lC(e,t){return(lC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=hC(e);if(t){var i=hC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fC(this,r)}}function fC(e,t){return!t||"object"!==sC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hC(e){return(hC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pC=Dy((function(){return{}}),(function(){return{}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lC(e,t)}(o,e);var t,r,n,i=gC(o);function o(){return uC(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return Mi.a.createElement(Di.ViewMounter,{mountPointId:Uy},Mi.a.createElement(aC,{key:"s3",className:My.a.scene3D}))}}])&&cC(t.prototype,r),n&&cC(t,n),o}(Mi.a.PureComponent));function dC(e,t){return(dC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function IC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=CC(e);if(t){var i=CC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yC(this,r)}}function yC(e,t){return!t||"object"!==EC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function CC(e){return(CC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function EC(e){return(EC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var BC,vC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":EC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},mC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":EC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},QC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dC(e,t)}(r,e);var t=IC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=gh,n.entityId=e.id,n}return r}(Di.Entity);QC=vC([Object(Di.provideEntityAPIs)([new Di.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model.type;if(t===c.GROOVE)return bC(e);if(t===c.HOLE)return _C(e)}(e)},update:function(t){var r=e.$model,n=r.position,i=r.visible;t.position.set(n.x,n.y,n.z),t.visible=i,t.material&&(t.material.visible=i)}}})),new Di.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),mC("design:paramtypes",["function"==typeof(BC=void 0!==Qr&&Qr)?BC:Object])],QC);var bC=function(e){var t=e.$model,r=t.position,n=t.size,i=t.rotate,o=t.visible,A=t.viewColor,a=t.opacity,s=new NA.BoxGeometry(n.x,n.y,n.z),u=new NA.MeshBasicMaterial({color:A,opacity:a,visible:o,transparent:!0}),c=new NA.Mesh(s,u);return c.position.set(r.x,r.y,r.z),c.rotation.set(i.x,i.y,i.z),c.visible=o,c},_C=function(e){var t=e.$model,r=t.position,n=t.visible,i=t.rotate,o=t.height,A=t.viewColor,a=t.opacity,s=t.fittingData.diameter/2,u=new NA.CylinderGeometry(s,s,o),c=new NA.MeshBasicMaterial({color:A,opacity:a,visible:n,transparent:!0}),l=new NA.Mesh(u,c);return l.position.set(r.x,r.y,r.z),l.rotation.set(i.x,i.y,i.z),l};function SC(e,t){if(e.length!==t.length)return[];for(var r=e.length,n=[],i=0;i<r-1;i++)n.push(e[i].x,e[i].y,e[i].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i+1].x,t[i+1].y,t[i+1].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z);return n}function wC(e){return function(e){if(Array.isArray(e))return DC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return DC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return DC(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function RC(e,t){return(RC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function MC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=PC(e);if(t){var i=PC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xC(this,r)}}function xC(e,t){return!t||"object"!==TC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function PC(e){return(PC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function TC(e){return(TC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var FC,OC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":TC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},LC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":TC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},kC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&RC(e,t)}(r,e);var t=MC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=fh,n.entityId=e.id,n}return r}(Di.Entity);function NC(e){var t=e.matrix,r=e.points,n=e.depth,i=e.color,o=e.side,A=e.position,a=e.opacity,s=new NA.LineBasicMaterial,u=new NA.MeshBasicMaterial({transparent:!0,opacity:a}),c=new NA.Mesh(void 0,u),l=new NA.Line(void 0,s),g=new NA.Group;return c.setAttribute("transparent-line-origin",!1),l.setAttribute("transparent-line-origin",!1),g.add(c),g.setAttribute("outline",!1),g.setAttribute("shadowCaster",!1),u.setValues({color:i,side:o}),g.applyMatrix(t),g.position.set(A.x,A.y,A.z),function(e){var t=e.area,r=e.outline,n=e.points,i=e.height,o=e.holes,A=!!r;if(!n||0===n.length)return;var a=n[0],s=new NA.Shape,u=A?new NA.Geometry:null;s.moveTo(a.x,a.y),n.forEach((function(e){s.lineTo(e.x,e.y),A&&u.vertices.push(new NA.Vector3(e.x,e.y,i))})),s.lineTo(a.x,a.y),o&&(s.holes=o);A&&(u.vertices.push(new NA.Vector3(a.x,a.y,i)),r.geometry&&r.geometry.dispose(),r.geometry=u);var c=new NA.ShapeGeometry(s);t.geometry&&t.geometry.dispose();t.geometry=c,t.position.set(0,0,i)}({area:c,points:r,height:n}),g}function GC(e){var t=new u.BBox3d;return[].concat(wC(e.getTopRenderPoints()),wC(e.getBottomRenderPoints())).forEach((function(e){t.addPoint(new u.Point3d(e))})),new Te.a(new je.a({x:t.width,y:t.height,z:t.depth}),new je.a(t.center),new je.a({x:0,y:0,z:0}))}function UC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jC(e,t){return(jC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function VC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=HC(e);if(t){var i=HC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return YC(this,r)}}function YC(e,t){return!t||"object"!==KC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function HC(e){return(HC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function KC(e){return(KC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}kC=OC([Object(Di.provideEntityAPIs)([new Di.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=new NA.Group,r=e.pointToGlobalMatrix(),n=e.depth,i=e.viewColor,o=e.opacity,A=e.visible,a=void 0!==A&&A,s=e.path.getAllPolygonPoints(),c=new ke.a;c.fromString(r.toArray().join(","));var l=Zh(c),g=Kn.a.decompose(c).position,f=NC({matrix:l,depth:0,points:s,color:i,side:NA.Side.FrontSide,position:g,opacity:o}),h=NC({matrix:l,depth:-n,points:s,color:i,side:NA.Side.BackSide,position:g,opacity:o}),p=[].concat(wC(s),[s[0]]),d=function(e){var t=e.matrix,r=e.side,n=e.position,i=e.color,o=e.opacity,A=new NA.MeshBasicMaterial({opacity:o,transparent:!0}),a=new NA.Mesh(new NA.BufferGeometry,A);if(A.setValues({side:r,color:i}),a.setAttribute("transparent-line-origin",!0),a.setAttribute("outline",!1),a.setAttribute("shadowCaster",!1),a.geometry instanceof NA.BufferGeometry){var s=SC(e.topPoints,e.bottomPoints);a.geometry.addAttribute("position",new NA.Float32BufferAttribute(s,3)),a.geometry.dispose()}return a.applyMatrix(t),a.position.set(n.x,n.y,n.z),a}({position:g,matrix:l,topPoints:p.map((function(e){return new u.Point3d(e.x,e.y,0)})),bottomPoints:p.map((function(e){return new u.Point3d(e.x,e.y,-n)})),color:i,side:NA.Side.DoubleSide,opacity:o});return t.add(f),t.add(h),t.add(d),[f,h,d,t].forEach((function(e){e.visible=a})),t}(e.$model)},update:function(t){var r=e.$model.visible;t.traverse((function(e){e.visible=r,e instanceof NA.Mesh&&e.material&&Object(Ot.castArray)(e.material).forEach((function(e){e.visible=r}))})),t.visible=r}}})),new Di.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:GC(this.$model)}}))]),LC("design:paramtypes",["function"==typeof(FC=void 0!==rn&&rn)?FC:Object])],kC);var qC,JC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":KC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},WC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":KC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},zC=Di.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,XC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jC(e,t)}(o,e);var t,r,n,i=VC(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=dh,t.entityId=e.id,t}return t=o,(r=[{key:"createOutlineMesh",value:function(){var e=this.$model.hintOutline,t=e.color,r=e.opacity,n=this.$model.visible,i=function(e){var t=new NA.Geometry,r=e.getVertices().map((function(e){var t=e;return new NA.Vector3(t.x,t.y,t.z)}));e.getIndices().forEach((function(e){t.vertices.push(r[e.x],r[e.y])})),t.computeBoundingBox();var n=t.getBoundingBox().getCenter(new NA.Vector3);return t.vertices=t.vertices.map((function(e){return function(e,t){var r=t.clone().sub(e);return e.clone().add(r)}(n,e)})),t}(this.getGeometry()),o=new NA.LineBasicMaterial({color:t,opacity:r,transparent:!0}),A=new NA.LineSegments(i,o);return A.computeLineDistances(),A.renderOrder=999,A.setAttribute("outline",!1),A.setAttribute("transparent-line-origin",!0),A.setAttribute("shadowCaster",!1),A.visible=n,o.visible=n,A}},{key:"getGeometry",value:function(){var e,t=this.$model.linkModel;return e=t instanceof Ve.CoreParamModel?t.getConcatenatedBox3():t instanceof Qr?t.boundingBox:GC(t),zC(e)}}])&&UC(t.prototype,r),n&&UC(t,n),o}(Di.Entity),ZC=XC=JC([Object(Di.provideEntityAPIs)([new Di.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createOutlineMesh()},update:function(t){var r=e.$model.visible;t.visible=r,t.material.visible=r}}}))]),WC("design:paramtypes",["function"==typeof(qC=void 0!==lr&&lr)?qC:Object])],XC);function $C(e){var t=new NA.BufferGeometry;if(t.index=new NA.BufferAttribute(new Uint16Array(e.indices),1),t.addAttribute("position",new NA.BufferAttribute(new Float32Array(e.vertices),3)),t.addAttribute("uv",new NA.BufferAttribute(new Float32Array(e.textures),2)),e.normals){var r=new Float32Array(e.normals);t.addAttribute("normal",new NA.BufferAttribute(r,3))}else t.computeVertexNormals();return t}function eE(e,t){return(eE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=nE(e);if(t){var i=nE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rE(this,r)}}function rE(e,t){return!t||"object"!==iE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nE(e){return(nE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function iE(e){return(iE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var oE,AE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":iE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},aE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":iE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},sE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eE(e,t)}(r,e);var t=tE(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=hh,n.entityId=e.id,n}return r}(Di.Entity),uE=sE=AE([Object(Di.provideEntityAPIs)([new Di.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.geometryModel,n=t.viewColor,i=t.originPoints,o=new NA.Group,A=$C(r),a=new NA.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:NA.Side.DoubleSide}),s=new NA.Mesh(A,a);s.renderOrder=998,o.add(s),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&o.add(i.map((function(e){var t=new NA.Mesh(cE,lE);return t.position.set(e.x,e.y,e.z),t.renderOrder=999,t})));return o}(e)},update:function(){}}}))]),aE("design:paramtypes",["function"==typeof(oE=void 0!==Cn&&Cn)?oE:Object])],sE),cE=new NA.SphereBufferGeometry(3),lE=new NA.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function gE(e){return function(e){if(Array.isArray(e))return fE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return fE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hE(e,t){return(hE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=IE(e);if(t){var i=IE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return dE(this,r)}}function dE(e,t){return!t||"object"!==yE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function IE(e){return(IE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function yE(e){return(yE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var CE,EE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":yE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},BE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":yE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},vE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hE(e,t)}(r,e);var t=pE(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=ph,n.entityId=e.id,n}return r}(Di.Entity),mE=vE=EE([Object(Di.provideEntityAPIs)([new Di.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.plankFaces,n=t.linkModel,i=t.hintOutline,o=n.getConcatenatedMatrix(),A=new NA.Group;r&&r.forEach((function(e){var t=$C(pi(e,o)),r=new NA.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:e.color,opacity:e.opacity,transparent:!0,side:NA.Side.DoubleSide}),n=new NA.Mesh(t,r);n.renderOrder=998,A.add(n)}));if(i){var a=n.getSize(),s=n.getWireFrames();if(!s){var u=vd(0,a),c=vd(5,a);s=[].concat(gE(Object(Ot.zip)(u,[].concat(gE(u.slice(1)),[u[0]]))),gE(Object(Ot.zip)(c,[].concat(gE(c.slice(1)),[c[0]]))),gE(Object(Ot.zip)(u,c))).flat().map((function(e){return[e.x,e.y,e.z]})).flat()}var l=Object(Ot.chunk)(s,3).map((function(e){return new je.a(e[0],e[1],e[2]).applyMatrix4(o)})).map((function(e){return[e.x,e.y,e.z]})).flat(),g=new $A({points:l,visible:!0,color:parseInt(i.color.replace(/^#/,""),16)});A.add(g)}return A}(e)},update:function(){}}}))]),BE("design:paramtypes",["function"==typeof(CE=void 0!==Sn&&Sn)?CE:Object])],vE);function QE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function bE(e,t){return(bE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=wE(e);if(t){var i=wE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return SE(this,r)}}function SE(e,t){return!t||"object"!==DE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wE(e){return(wE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function DE(e){return(DE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var RE,ME=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":DE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},xE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":DE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},PE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bE(e,t)}(o,e);var t,r,n,i=_E(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=Ih,t.entityId=e.id,t}return t=o,(r=[{key:"createMesh",value:function(){var e=this.$model,t=e.points,r=e.viewColor,n=e.opacity,i=e.visible,o=e.linkModel,A=e.height;if(o){var a=t.map((function(e){return new u.Point3d(e.x,e.y,A/2)})),s=t.map((function(e){return new u.Point3d(e.x,e.y,-A/2)})),c=new NA.MeshBasicMaterial({opacity:n,transparent:!0}),l=new NA.Mesh(new NA.BufferGeometry,c);if(c.setValues({side:NA.Side.DoubleSide,color:r}),l.setAttribute("transparent-line-origin",!0),l.setAttribute("outline",!1),l.setAttribute("shadowCaster",!1),l.geometry instanceof NA.BufferGeometry){var g=SC(a,s);l.geometry.addAttribute("position",new NA.Float32BufferAttribute(g,3)),l.geometry.dispose()}var f=o.getConcatenatedMatrix(),h=new je.a(0,0,0).applyMatrix4(f);return l.position.set(h.x,h.y,h.z),l.visible=i,c.visible=i,l.rotation.setFromRotationMatrix(Zh(f)),l}}}])&&QE(t.prototype,r),n&&QE(t,n),o}(Di.Entity),TE=PE=ME([Object(Di.provideEntityAPIs)([new Di.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createMesh()},update:function(t){var r=e.$model,n=r.visible,i=r.viewColor,o=r.opacity;t.visible=n,t.material.setValues({opacity:o,color:i}),t.material.visible=n}}}))]),xE("design:paramtypes",["function"==typeof(RE=void 0!==On&&On)?RE:Object])],PE);var FE=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getDesignDoc=t,this.createFittingEntities=Di.__unstable__.flatEntitiesCreator((function(e){return new QC(e)})),this.createIntersectEntities=Di.__unstable__.flatEntitiesCreator((function(e){return new uE(e)})),this.createGrooveFittingEntities=Di.__unstable__.flatEntitiesCreator((function(e){return new kC(e)})),this.createPlankFaceHintEntities=Di.__unstable__.flatEntitiesCreator((function(e){return new mE(e)})),this.careateFittingHintEntities=Di.__unstable__.flatEntitiesCreator((function(e){return new ZC(e)})),this.careatePlankOutlineHintEntities=Di.__unstable__.flatEntitiesCreator((function(e){return new TE(e)})),this.getFittingEntities=function(){var e=r.getDesignDoc();return e?r.createFittingEntities(e.getFittings()):[]},this.getGrooveFittingEntities=function(){var e=r.getDesignDoc();return e?r.createGrooveFittingEntities(e.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var e=r.getDesignDoc();return e?r.createIntersectEntities(e.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var e=r.getDesignDoc();return e?r.createPlankFaceHintEntities(e.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var e=r.getDesignDoc();return e?r.careateFittingHintEntities(e.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var e=r.getDesignDoc();return e?r.careatePlankOutlineHintEntities(e.getPlankOutlineHintModels()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities]};function OE(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return LE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return LE(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function LE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var NE=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){t.pressMap.forEach((function(e,r){t.pressMap.set(r,!1)}))},this.onKeyDown=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)||t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!0)},this.onKeyUp=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)&&(t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!1))},this.active()}var t,r,n;return t=e,(r=[{key:"addKeyboardKeyListener",value:function(e){var t=this,r=Object(Ot.castArray)(e);if(r.some((function(e){return!t.isValidKeyboardKey(e)})))throw new Error("keyboard-key is invalid");var n,i=OE(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.pressMap.set(o,!1)}}catch(e){i.e(e)}finally{i.f()}}},{key:"removeKeyboardKeyListener",value:function(e){var t,r=OE(Object(Ot.castArray)(e));try{for(r.s();!(t=r.n()).done;){var n=t.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"active",value:function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mouseenter",this.resetPressStatus),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mouseenter",this.resetPressStatus),this.disabled=!0,this.resetPressStatus()}},{key:"checkIsPress",value:function(e){var t=this;return Object(Ot.castArray)(e).every((function(e){return t.pressMap.get(e)}))}},{key:"getKeyBoardKey",value:function(e){return e.key.toLowerCase()}},{key:"isPrevent",value:function(e){if(this.disabled)return!0;var t=e.target;if(!t)return!1;if("INPUT"===t.tagName){var r=t.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===t.tagName||"TEXTAREA"===t.tagName}},{key:"isValidKeyboardKey",value:function(e){return xe.includes(e)}}])&&kE(t.prototype,r),n&&kE(t,n),e}(),GE=new Map([[Yn.ParamModelCategory.FRAME,[Yn.ParamModelCategory.DRAWER,Yn.ParamModelCategory.SWING_DOOR,Yn.ParamModelCategory.PARAM_FURNITURE,Yn.ParamModelCategory.FASCIA_BOARD,Yn.ParamModelCategory.SPECIAL_FRAME,Yn.ParamModelCategory.EMBED_FRAME_W,Yn.ParamModelCategory.POLE_W,Yn.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Yn.ParamModelCategory.BOARD,Yn.ParamModelCategory.DRAWER,Yn.ParamModelCategory.SPACE_GROUP,Yn.ParamModelCategory.SINGLE_SLIDING_DOOR,Yn.ParamModelCategory.FRAME,Yn.ParamModelCategory.SLIDING_DOOR_BOARD,Yn.ParamModelCategory.PARAM_FURNITURE_PART,Yn.ParamModelCategory.SANITARY_COMPONENT,Yn.ParamModelCategory.DOOR_LEAF,Yn.ParamModelCategory.DECORATIVE_MOLDING_C,Yn.ParamModelCategory.DECORATIVE_MOLDING_W,Yn.ParamModelCategory.HANDS_FREE,Yn.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[Yn.ParamModelCategory.SHOWER_ROOM,[Yn.ParamModelCategory.DRAWER,Yn.ParamModelCategory.SWING_DOOR,Yn.ParamModelCategory.PARAM_FURNITURE,Yn.ParamModelCategory.FASCIA_BOARD,Yn.ParamModelCategory.SPECIAL_FRAME,Yn.ParamModelCategory.EMBED_FRAME_W,Yn.ParamModelCategory.POLE_W,Yn.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Yn.ParamModelCategory.BOARD,Yn.ParamModelCategory.DRAWER,Yn.ParamModelCategory.SPACE_GROUP,Yn.ParamModelCategory.SINGLE_SLIDING_DOOR,Yn.ParamModelCategory.FRAME,Yn.ParamModelCategory.PARAM_FURNITURE_PART,Yn.ParamModelCategory.SANITARY_COMPONENT,Yn.ParamModelCategory.DOOR_LEAF,Yn.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[Yn.ParamModelCategory.DRAWER,Yn.ParamModelCategory.SWING_DOOR,Yn.ParamModelCategory.PARAM_FURNITURE,Yn.ParamModelCategory.FASCIA_BOARD,Yn.ParamModelCategory.SPECIAL_FRAME,Yn.ParamModelCategory.EMBED_FRAME_W,Yn.ParamModelCategory.BOARD,Yn.ParamModelCategory.SPACE_GROUP,Yn.ParamModelCategory.POLE_W,Yn.ParamModelCategory.SINGLE_SLIDING_DOOR,Yn.ParamModelCategory.SLIDING_DOOR_BOARD,Yn.ParamModelCategory.DRAWER,Yn.ParamModelCategory.RAIL,Yn.ParamModelCategory.DOOR_LEAF]],[Yn.ParamModelCategory.SLIDING_DOOR_C,[Yn.ParamModelCategory.RAIL,Yn.ParamModelCategory.SINGLE_SLIDING_DOOR]],[Yn.ParamModelCategory.SPACE_GROUP,[Yn.ParamModelCategory.DRAWER,Yn.ParamModelCategory.SWING_DOOR,Yn.ParamModelCategory.PARAM_FURNITURE,Yn.ParamModelCategory.FASCIA_BOARD,Yn.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Yn.ParamModelCategory.BOARD,Yn.ParamModelCategory.SPECIAL_BOARD,Yn.ParamModelCategory.SPACE_GROUP]],[Yn.ParamModelCategory.SINGLE_SLIDING_DOOR,[Yn.ParamModelCategory.SLIDING_DOOR_CORE,Yn.ParamModelCategory.DOOR_WAIST_LINE]],[Yn.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[Yn.ParamModelCategory.SWING_DOOR]],[Yn.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[Yn.ParamModelCategory.BOARD]],[Yn.ParamModelCategory.SWING_DOOR,[Yn.ParamModelCategory.DOOR_CORE,Yn.ParamModelCategory.DOOR_WAIST_LINE,Yn.ParamModelCategory.DECORATIVE_MOLDING,Yn.ParamModelCategory.BOARD]],[Yn.ParamModelCategory.DRAWER,[Yn.ParamModelCategory.DRAWER_PANEL,Yn.ParamModelCategory.SWING_DOOR,Yn.ParamModelCategory.BOARD]],[Yn.ParamModelCategory.PARAM_FURNITURE,[Yn.ParamModelCategory.FURNITURE_LEG]],[Yn.ParamModelCategory.KADA,[Yn.ParamModelCategory.BYOBU,Yn.ParamModelCategory.BYOBU_FRAME,Yn.ParamModelCategory.BYOBU_PANEL]]]);function UE(e){return function(e){if(Array.isArray(e))return jE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return jE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function VE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var YE=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=Qe.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new NE,this.memoGetHintModelLite=fI()((function(e){return t.isFittingLikeModel(e)?qp(e):t.getParamModelLite(e)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var t,r,n;return t=e,(r=[{key:"isAccessory",value:function(e){var t;if(this.isAccessoryCache.has(e.id))return this.isAccessoryCache.get(e.id);var r=null===(t=null==e?void 0:e.getParent)||void 0===t?void 0:t.call(e),n=(GE.get(r?r.getCategory().getRoot():void 0)||[]).some((function(t){return e.getCategory().belongsTo(t)}));return this.isAccessoryCache.set(e.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(e,t){for(var r,n,i=this,o=[],A=t;A&&A!==e;)o.unshift(A),A=(null===(r=A.getParent)||void 0===r?void 0:r.call(A))||(null===(n=A.getAssembly)||void 0===n?void 0:n.call(A));return o.find((function(e){return i.isAccessory(e)}))||t}},{key:"getParamModelLite",value:function(e){var t=(e.isRoot()?e:e.getRoot()).getAssembly();return t?uI(e,{origin:C.SENSE},void 0,uI(t,{origin:C.SENSE})):uI(e,{origin:C.SENSE})}},{key:"topModelModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i,o,A,a=e.isRoot()?e:e.getRoot(),s=a.getAssembly(),u=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,c=!1;if(u&&(o=KB(u))&&!this.isFittingLikeModel(o)&&(u.entityType===yA?A=(A=o.isRoot()?o:o.getRoot()).getAssembly()||A:(c=!0,A=o),i=A===a||A===s),i){for(var l=!1,g=!1,f=o instanceof Ve.CoreParamModel?o.getParent():void 0,h=e;h;){if(h===o){l=!0;break}if(h===f){g=!0;break}h=(null===(r=h.getParent)||void 0===r?void 0:r.call(h))||(null===(n=h.getAssembly)||void 0===n?void 0:n.call(h))}if(t===be.CLICK)return l?o:g?this.getAccessoryAtFirstLevel(f,e):A instanceof Ve.CoreParamModelAssembly?(o.isRoot()?o:o.getRoot())===a?this.getAccessoryAtFirstLevel(a,e):a:this.getAccessoryAtFirstLevel(a,e);if(t===be.DB_CLICK)return l?c?a:this.getAccessoryAtFirstLevel(o,e):this.getAccessoryAtFirstLevel(a,e)}else{if(t===be.CLICK)return s||a;if(t===be.DB_CLICK)return s?a:this.getAccessoryAtFirstLevel(a,e)}}},{key:"accessoryModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i=e.isRoot()?e:e.getRoot(),o=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=o&&KB(o),a=!1;if(A&&!this.isFittingLikeModel(A)&&(a=(A.isRoot()?A:A.getRoot())===i),a){for(var s=!1,u=!1,c=null==A?void 0:A.getParent(),l=e;l;){if(l===A){s=!0;break}if(l===c){u=!0;break}l=(null===(r=l.getParent)||void 0===r?void 0:r.call(l))||(null===(n=l.getAssembly)||void 0===n?void 0:n.call(l))}if(t===be.CLICK)return s?A:this.getAccessoryAtFirstLevel(u?c:i,e);if(t===be.DB_CLICK){if(s)return this.getAccessoryAtFirstLevel(A,e);var g=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(g,e)}}else{if(t===be.CLICK)return this.getAccessoryAtFirstLevel(i,e);if(t===be.DB_CLICK){var f=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(f,e)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(e){var t,r;if(this.isFittingLikeModel(e))return e;var n,i,o=e.isRoot()?e:e.getRoot(),A=o.getAssembly(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,s=!1;if(a&&(n=KB(a))&&!this.isFittingLikeModel(n)&&(s=(i=a.entityType===yA?(i=n.isRoot()?n:n.getRoot()).getAssembly()||i:n)===o||i===A),n&&s){for(var u=!1,c=!1,l=n instanceof Ve.CoreParamModel?n.getParent():void 0,g=e;g;){if(g===n){u=!0;break}if(g===l){c=!0;break}g=(null===(t=g.getParent)||void 0===t?void 0:t.call(g))||(null===(r=g.getAssembly)||void 0===r?void 0:r.call(g))}return u?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof Ve.CoreParamModelAssembly?o:this.getAccessoryAtFirstLevel(n,e):c?this.getAccessoryAtFirstLevel(l,e):this.designMode===Qe.TOP_MODEL&&o!==n&&o!==n.getRoot()?o:this.getAccessoryAtFirstLevel(o,e)}return this.designMode===Qe.TOP_MODEL?o.getAssembly()||o:this.getAccessoryAtFirstLevel(o,e)}},{key:"setCurSelectEntity",value:function(e){this.curSelectEntity=e}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(e){this.curHintEntity=e}},{key:"getCurHintEntity",value:function(){return this.curHintEntity}},{key:"clearPrevModeSelectEntity",value:function(){this.prevModeSelectEntity.length&&(this.prevModeSelectEntity=[])}},{key:"getDesignMode",value:function(){return this.designMode}},{key:"setDesignMode",value:function(e,t){this.designMode=e,e===Qe.CUSTOM?(this.customModeFindSelectModel=null==t?void 0:t.findSelectModel,this.customModeFindHintModel=null==t?void 0:t.findHintModel,!this.pressManager.disabled&&this.pressManager.dispose()):(this.customModeFindSelectModel=void 0,this.customModeFindHintModel=void 0,this.pressManager.disabled&&this.pressManager.active(),this.prevModeSelectEntity=this.prevModeSelectEntity.concat(this.curSelectEntity&&Object(Ot.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(e){var t=qB[e.type];return{entityId:e.id,entityType:t}}},{key:"customModeSelectModel",value:function(e,t){var r,n;n=this.isFittingLikeModel(e)?qp(e):this.getParamModelLite(e);var i=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,t);return Object(Ot.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(e){var t,r=this,n=this.memoGetHintModelLite(e),i=null===(t=this.customModeFindHintModel)||void 0===t?void 0:t.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(Ot.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(e){return e instanceof rn||e instanceof Qr||e instanceof mt&&Boolean(e.isAppendHardware)}},{key:"getSelectEntity",value:function(e,t){var r;if(this.isMultiSelect&&this.designMode!==Qe.CUSTOM){switch(this.designMode){case Qe.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Qe.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Qe.PRODUCT:r=e}if(!r)return;var n=HB(r),i=Object(Ot.castArray)(this.curSelectEntity).filter((function(e){return e}));this.prevModeSelectEntity.length&&i.push.apply(i,UE(this.prevModeSelectEntity));var o=i[0]&&KB(i[0]);if(o&&this.isFittingLikeModel(o)!==this.isFittingLikeModel(r))return n;var A=i.filter((function(e){return e.entityId!==n.entityId}));return A.length!==i.length?A:[].concat(UE(A),[n])}if(!Array.isArray(this.curSelectEntity)||!this.curSelectEntity.length){switch(this.designMode){case Qe.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Qe.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Qe.PRODUCT:r=e;break;case Qe.CUSTOM:return this.customModeSelectModel(e,t)}return HB(r||e)}}},{key:"getHintEntity",value:function(e){var t;switch(this.designMode){case Qe.TOP_MODEL:case Qe.ACCESSORY:t=this.topModelModeAndAccessoryModeHint(e);break;case Qe.PRODUCT:t=e;break;case Qe.CUSTOM:return this.customModeHintModel(e)}var r=this.curSelectEntity&&Object(Ot.castArray)(this.curSelectEntity)||[];if(!([].concat(UE(r),UE(this.prevModeSelectEntity)).findIndex((function(e){return e.entityId===t.id}))>-1))return HB(t)}},{key:"registerMultiSelectShortcut",value:function(e){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=e,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&VE(t.prototype,r),n&&VE(t,n),e}();function HE(e){return(HE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function KE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function JE(e,t){return(JE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function WE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=XE(e);if(t){var i=XE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zE(this,r)}}function zE(e,t){return!t||"object"!==HE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function XE(e){return(XE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ZE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&JE(e,t)}(o,e);var t,r,n,i=WE(o);function o(){return KE(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"pickRayTarget",value:function(e){return e&&KB(e)}},{key:"selection",get:function(){return UB().getStateManager().kaf.selection}},{key:"hint",get:function(){return UB().getStateManager().kaf.kaf2.hint}},{key:"designModeCtx",get:function(){return UB().designModeContext}}])&&qE(t.prototype,r),n&&qE(t,n),o}(Di.ToolModule.Feature);function $E(e){return($E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rB(e,t){return(rB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=oB(e);if(t){var i=oB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return iB(this,r)}}function iB(e,t){return!t||"object"!==$E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function oB(e){return(oB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var AB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rB(e,t)}(o,e);var t,r,n,i=nB(o);function o(){var e;return eB(this,o),(e=i.apply(this,arguments)).isMouseDown=!1,e}return t=o,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(e){if(!this.isMouseDown){var t=this.context.pick(e.sceneId,e.event),r=this.pickRayTarget(null==t?void 0:t.entity);if(Tt.eventNames().includes(Mt.PLANK_FACE_HOVER)&&r instanceof Ve.CoreParamModel){var n=t.entity,i=n.point,o={modelId:n.entityId,id:ep(r,i)};Tt.emit(Mt.PLANK_FACE_HOVER,o)}if(r){var A=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),Qe.CUSTOM,this.hint.hint(A)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&tB(t.prototype,r),n&&tB(t,n),o}(ZE);function aB(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return sB(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sB(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function sB(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function uB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cB(e,t){return(cB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fB(e);if(t){var i=fB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gB(this,r)}}function gB(e,t){return!t||"object"!==hB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fB(e){return(fB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function hB(e){return(hB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var pB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":hB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},dB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":hB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},IB=Di.__INTERNAL__.Highlighters.WireGeometry,yB=Di.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,CB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cB(e,t)}(o,e);var t,r,n,i=lB(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this)).models=e,r.createFittingModelBox=t,r}return t=o,(r=[{key:"getGeometry",value:function(){var e,t=new IB,r=aB(this.models);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=void 0;i=n instanceof Ve.CoreParamModel||n instanceof Ve.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var o=yB(i);t.append(o)}}catch(e){r.e(e)}finally{r.f()}return t}}])&&uB(t.prototype,r),n&&uB(t,n),o}(Di.Entity),EB=CB=pB([Object(Di.provideEntityAPIs)([new Di.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),dB("design:paramtypes",[Array,Function])],CB);function BB(e){return(BB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mB(e,t){return(mB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_B(e);if(t){var i=_B(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bB(this,r)}}function bB(e,t){return!t||"object"!==BB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _B(e){return(_B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var SB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mB(e,t)}(o,e);var t,r,n,i=QB(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this))._init(),e}return t=o,(r=[{key:"_init",value:function(){var e=this,t={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(t){var r=t.map((function(e){return KB(e)}));return new EB(r.filter((function(e){return e})),e.createFittingModelBox)}};this.selection.addMultiSelectionConfig(t)}},{key:"createFittingModelBox",value:function(e){return e instanceof Qr?e.boundingBox:GC(e)}},{key:"onClick",value:function(e){this.triggerClick(e,be.CLICK)}},{key:"onDblClick",value:function(e){this.designModeCtx.isMultiSelect||this.triggerClick(e,be.DB_CLICK)}},{key:"triggerClick",value:function(e,t){var r=this.context.pick(e.sceneId,e.event),n=this.pickRayTarget(null==r?void 0:r.entity);if(Tt.eventNames().includes(Mt.PLANK_FACE_CLICK)&&n instanceof Ve.CoreParamModel){var i=r.entity,o=i.point,A={modelId:i.entityId,id:ep(n,o)};Tt.emit(Mt.PLANK_FACE_CLICK,A)}if(n){var a=this.designModeCtx.getSelectEntity(n,t);this.designModeCtx.getDesignMode()===Qe.CUSTOM?a&&this.selection.select(a):(this.selection.select(a),this.designModeCtx.setCurSelectEntity(a))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&vB(t.prototype,r),n&&vB(t,n),o}(ZE);function wB(e){return(wB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DB(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function RB(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?DB(Object(r),!0).forEach((function(t){MB(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DB(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function MB(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function PB(e,t,r){return(PB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=LB(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function TB(e,t){return(TB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function FB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=LB(e);if(t){var i=LB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return OB(this,r)}}function OB(e,t){return!t||"object"!==wB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LB(e){return(LB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kB,NB=new wi.SingletonRef,GB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&TB(e,t)}(o,e);var t,r,n,i=FB(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:pC,axrs:Qy,singleton:NB},e)).stateManager=t,r.viewer=new ls,r.designModeContext=new YE,r}return t=o,(r=[{key:"init",value:function(){PB(LB(o.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var e=this.stateManager;e.initState(),wy(e);var t=this.getDependentPlugin(Di.AppServicePlugin),r=this.getDependentPlugin(Sf);e.kaf=t.stateManager,e.core=r.stateManager}},{key:"initNet",value:function(){PB(LB(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new hc),this.client=new Tu(this.net)}},{key:"initApp",value:function(){var e=this,t=this.stateManager,r=t.core,n=r.design,i=r.pad,o=this.getDependentPlugin(Di.AppServicePlugin);this.viewer.config(o,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return e.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(e,t){for(var r=t.point,n=i.findModelOrAssemblyModelById(e.entityId);n&&!pI.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:yA,point:r}:RB(RB({},e),{},{point:r})},paramModelSymbol:yA,filterParamModel:function(t){return!e.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(t.getCategory().categoryId)}}),this.viewer.registerReducer((function(e,t,r){r.interactionPriority=e.isAppendHardware?2:0})),o.registerEntityDocument(new FE((function(){return t.core.fittingDesign}))),t.kaf.toolbox.addIdleToolFeature((function(){return new SB})),t.kaf.toolbox.addIdleToolFeature((function(){return new AB})),o.setLayout(Vy)}}])&&xB(t.prototype,r),n&&xB(t,n),o}(wi.PluginApplication),UB=NB.instance;function jB(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VB(e,t){var r=new Map;return function(){var n,i=t.apply(void 0,arguments);if(r.has(i))n=r.get(i);else if(n=e.apply(void 0,arguments),Object(Ot.isObject)(n)&&Object(Ot.isFunction)(n.then)&&Object(Ot.isFunction)(n.catch)){var o=Promise.resolve(n);r.set(i,o),o.finally((function(){r.delete(i)}))}return n}}function YB(e){return e instanceof mt?yA:e instanceof xt?IA:e instanceof Qr?gh:e instanceof rn?fh:void 0}function HB(e){return{entityId:e.id,entityType:YB(e)}}function KB(e){var t=e.entityId,r=e.entityType,n=UB().getStateManager().core,i=n.fittingDesign,o=n.pad;switch(r){case yA:return o.findModelOrAssemblyModelById(t);case IA:return o.findParamModelAssembly(t);case fh:return i.getGrooveFittings().find((function(e){return e.id===t}));case gh:return i.getFittings().find((function(e){return e.id===t}));default:return}}var qB=(jB(kB={},Me.PARAM_MODEL,yA),jB(kB,Me.PARAM_MODEL_ASSEMBLY,IA),jB(kB,Me.HOLE,gh),jB(kB,Me.GROOVE,gh),jB(kB,Me.HARDWARE_GROOVE,fh),jB(kB,Me.HARDWARE,yA),kB);function JB(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function WB(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){JB(o,n,i,A,a,"next",e)}function a(e){JB(o,n,i,A,a,"throw",e)}A(void 0)}))}}var zB=new Map;function XB(e){return["designid","levelid","modelid","toolType"].map((function(t){return e[t]||""})).join(":")}var ZB=VB(function(){var e=WB(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=lc(),n=XB(t),!zB.has(n)){e.next=4;break}return e.abrupt("return",zB.get(n));case 4:return e.next=6,r.get("/cos/api/fitting-design",{params:t});case 6:return i=e.sent,zB.set(n,i.data.d),e.abrupt("return",i.data.d);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),XB);function $B(){var e=Mf(pg);"function"==typeof e.fittingDesignHasChanged&&e.fittingDesignHasChanged().catch((function(){}))}var ev,tv,rv=function(){var e=WB(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=lc(),i=XB(r),e.prev=2,e.next=5,n.post("/cos/api/fitting-design",t,{params:r});case 5:zB.set(i,t),$B(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t,r){return e.apply(this,arguments)}}(),nv=function(){var e=WB(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=lc(),n=XB(t),e.prev=2,e.next=5,r.delete("/cos/api/fitting-design",{params:t});case 5:zB.has(n)&&zB.delete(n),$B(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();function iv(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ov(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){iv(o,n,i,A,a,"next",e)}function a(e){iv(o,n,i,A,a,"throw",e)}A(void 0)}))}}!function(e){e.UNKNOWN="UNKNOWN",e.PENDING="PENDING",e.RUNNING="RUNNING",e.SAVING="SAVING",e.SUCCESS="SUCCESS",e.FAIL="FAIL",e.CANCEL="CANCEL",e.TIMEOUT="TIMEOUT"}(ev||(ev={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW"}(tv||(tv={}));var Av=function(){var e=ov(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(Ot.castArray)(t),n=Mf(wg),e.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),av=VB(function(){var e=ov(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Mf(xf.MiniAppParamModelJsonDataService),e.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")})),sv=VB(function(){var e=ov(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Mf(xf.MiniAppParamModelJsonDataService),e.abrupt("return",n.getModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")}));function uv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function cv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lv(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function gv(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){lv(o,n,i,A,a,"next",e)}function a(e){lv(o,n,i,A,a,"throw",e)}A(void 0)}))}}var fv=fI()(function(){var e=gv(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=lc(),e.next=3,r.gzipGet("/dcs-model/api/c/parammodeldata",{params:{obsbgid:t,cache:!0}});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?uv(Object(r),!0).forEach((function(t){cv(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uv(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({promise:!0},hI)),hv=fI()(function(){var e=gv(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=lc(),e.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:t});case 3:return i=e.sent,e.abrupt("return",(null===(r=i.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(Ot.mapValues)(i.data.d.modelCenterMap,(function(e){return JSON.parse(e)})):{});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var pv=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function dv(e){return(dv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Iv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Iv(Object(r),!0).forEach((function(t){Cv(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iv(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Cv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ev(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Bv(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Ev(o,n,i,A,a,"next",e)}function a(e){Ev(o,n,i,A,a,"throw",e)}A(void 0)}))}}function vv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Qv(e,t){return(Qv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Sv(e);if(t){var i=Sv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _v(this,r)}}function _v(e,t){return!t||"object"!==dv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Sv(e){return(Sv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wv=function(){return by().fittingDesign.fittingDesignSense},Dv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qv(e,t)}(c,e);var t,r,n,i,o,A,a,u=bv(c);function c(){return vv(this,c),u.apply(this,arguments)}return t=c,(r=[{key:"toggleAutoSave",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];wv().$actionEnableAutoSave.dispatch(e)}},{key:"isAutoSave",value:function(){return wv().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(a=Bv(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(by().viewParamModel.state.state.currModelId!==t||wv().state.state.design.id!==t)){e.next=3;break}return e.abrupt("return",this.getConnectedFittingDesign());case 3:return e.next=5,rp(t);case 5:return r=e.sent,e.abrupt("return",ZB(yv(yv({},r),{},{modelid:t})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return wv().getConnectedFittingDesign(e,t)}},{key:"validateFittingDesign",value:function(e,t){var r=by().entry.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(!r)return{validated:!1};var n=by().fittingDesign.senseSetting.getSenseSettings();return{validated:function(e){if(!e.isClosedPath())return!1;for(var t=e.points,r=e.lines,n=t.length,i=0;i<n;i++){var o={type:gi.POINT,val:t[i]},A={type:gi.LINE,val:r[i]};if(!mi(o.val))return!1;if(!Qi(A.val))return!1;if(!_i(o,A))return!1;for(var a=i+1;a<n;a++){var s={type:gi.POINT,val:t[a]},u={type:gi.LINE,val:r[a]};if(!_i(o,s))return!1;if(!_i(o,u))return!1;if(!_i(A,s))return!1;if(!_i(A,u))return!1}}return!0}(Si(e,r,Object(Ot.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(A=Bv(s.a.mark((function e(t){var r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},e.abrupt("return",wv().appendFittingDataToFittingDesign(t,r));case 2:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"saveDesign",value:(o=Bv(s.a.mark((function e(t){var r,n,i,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=r.timeout,i=qh(n),wv().$actionSaveFittingDesign.started.dispatch({defer:i,design:t}),e.abrupt("return",i.promise);case 5:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"clearDesign",value:(i=Bv(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t||{}).timeout,i=void 0===n?5e4:n,o=r.modelId,A=qh(i),wv().$actionClearFittingDesign.started.dispatch({defer:A,modelId:o}),e.abrupt("return",A.promise);case 4:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&mv(t.prototype,r),n&&mv(t,n),c}(pv);function Rv(e){return(Rv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Pv(e,t){return(Pv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ov(e);if(t){var i=Ov(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Fv(this,r)}}function Fv(e,t){return!t||"object"!==Rv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ov(e){return(Ov=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lv=(new Jn.a).setFromCenterAndSize(new je.a(0,0,0),new je.a(200,200,100)),kv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pv(e,t)}(o,e);var t,r,n,i=Tv(o);function o(){return Mv(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"resetDistanceAndLookAt",value:function(){var e=this.state,t=e.initCameraAttributes,r=t.position,n=t.lookAt,i=e.cameraAttributes.position,o=n.clone().sub(r).length(),A=n.clone().add(i.clone().sub(n).normalize().mul(o));this.updateCameraAttributes({position:A,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return Lv}}])&&xv(t.prototype,r),n&&xv(t,n),o}(Di.Scene3DStateManager);function Nv(e){return(Nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uv(e,t){return(Uv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Yv(e);if(t){var i=Yv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Vv(this,r)}}function Vv(e,t){return!t||"object"!==Nv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yv(e){return(Yv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Uv(e,t)}(r,e);var t=jv(r);function r(){return Gv(this,r),t.apply(this,arguments)}return r}(Di.types.combine({scene3D:kv})),Kv=window.document.createElement("script");Kv.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(Kv);function qv(e){return(qv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zv(e,t){return(zv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$v(e);if(t){var i=$v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Zv(this,r)}}function Zv(e,t){return!t||"object"!==qv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $v(e){return($v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var em=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zv(e,t)}(o,e);var t,r,n,i=Xv(o);function o(){var e;return Jv(this,o),(e=i.apply(this,arguments)).rootState=new Hv,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new GB(this,this.rootState);e.init(),e.run()}}])&&Wv(t.prototype,r),n&&Wv(t,n),o}(yf.BasePlugin);function tm(e){return(tm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function im(e,t){return(im=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function om(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=am(e);if(t){var i=am(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Am(this,r)}}function Am(e,t){return!t||"object"!==tm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function am(e){return(am=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}em.dependencies=[Di.AppServicePlugin,Sf];var sm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&im(e,t)}(o,e);var t,r,n,i=om(o);function o(){return rm(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleModelViewIntersected",value:function(e){by().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(e)}},{key:"toggleModelViewedIntersected",value:function(e){by().fittingDesign.intersected.toggleShowIntersectGroupData(e)}}])&&nm(t.prototype,r),n&&nm(t,n),o}(pv);function um(e){return(um="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function lm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){cm(o,n,i,A,a,"next",e)}function a(e){cm(o,n,i,A,a,"throw",e)}A(void 0)}))}}function gm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function hm(e,t){return(hm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Im(e);if(t){var i=Im(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return dm(this,r)}}function dm(e,t){return!t||"object"!==um(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Im(e){return(Im=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ym=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hm(e,t)}(u,e);var t,r,n,i,o,A,a=pm(u);function u(){return gm(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"getAllCustomModels",value:(A=lm(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",by().scene.getAllCustomModels());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=lm(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",by().scene.getCustomModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=lm(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",by().scene.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&fm(t.prototype,r),n&&fm(t,n),u}(pv);function Cm(e){return(Cm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Em(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vm(e,t){return(vm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bm(e);if(t){var i=bm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qm(this,r)}}function Qm(e,t){return!t||"object"!==Cm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bm(e){return(bm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vm(e,t)}(o,e);var t,r,n,i=mm(o);function o(){return Em(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setFittingHint",value:function(e){by().fittingDesign.fittingHint.setFittingHint(e)}},{key:"clearFittingHint",value:function(e){by().fittingDesign.fittingHint.clearFittingHint(e)}}])&&Bm(t.prototype,r),n&&Bm(t,n),o}(pv);function Sm(e){return(Sm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Dm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){wm(o,n,i,A,a,"next",e)}function a(e){wm(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Rm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xm(e,t){return(xm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Fm(e);if(t){var i=Fm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Tm(this,r)}}function Tm(e,t){return!t||"object"!==Sm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fm(e){return(Fm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Om,Lm,km=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xm(e,t)}(a,e);var t,r,n,i,o,A=Pm(a);function a(){return Rm(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getAllFittingModels",value:(o=Dm(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",by().fittingDesign.fittingModel.getAllFittingModels(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=Dm(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",by().fittingDesign.fittingModel.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&Mm(t.prototype,r),n&&Mm(t,n),a}(pv);function Nm(e){return(Nm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Um(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jm(e,t){return(jm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Hm(e);if(t){var i=Hm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ym(this,r)}}function Ym(e,t){return!t||"object"!==Nm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Hm(e){return(Hm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.View3D="view3d",e.Roamer="roamer"}(Om||(Om={})),function(e){e.UP="UP",e.DOWN="DOWN",e.LEFT="LEFT",e.RIGHT="RIGHT",e.FRONT="FRONT",e.BACK="BACK"}(Lm||(Lm={}));var Km=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jm(e,t)}(o,e);var t,r,n,i=Vm(o);function o(){return Gm(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleCameraMode",value:function(e){var t;switch(e){case Om.View3D:t=Di.PerspectiveCameraMode.View3D;break;case Om.Roamer:t=Di.PerspectiveCameraMode.Roamer}UB().getStateManager().scene3D.updatePerspectiveCameraMode(t)}},{key:"moveCamera",value:function(e){var t,r=UB().getStateManager().scene3D;switch(e){case Lm.UP:case Lm.FRONT:t=Di.ArrowType.UP;break;case Lm.DOWN:case Lm.BACK:t=Di.ArrowType.DOWN;break;case Lm.LEFT:t=Di.ArrowType.LEFT;break;case Lm.RIGHT:t=Di.ArrowType.RIGHT}if(t){if(e===Lm.UP||e===Lm.DOWN)return void r.onQEPress(t);r.onWASDPress(t)}}}])&&Um(t.prototype,r),n&&Um(t,n),o}(pv);function qm(e){return(qm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zm(e,t){return(zm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$m(e);if(t){var i=$m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Zm(this,r)}}function Zm(e,t){return!t||"object"!==qm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $m(e){return($m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var eQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zm(e,t)}(o,e);var t,r,n,i=Xm(o);function o(){return Jm(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDefaultHint",value:function(e){by().fittingDesign.plankFaceHint.setDefaultHintConfig(e)}},{key:"setModelHint",value:function(e){by().fittingDesign.plankFaceHint.setModelHint(e)}},{key:"clearModelHint",value:function(e){by().fittingDesign.plankFaceHint.clearModelHint(e)}}])&&Wm(t.prototype,r),n&&Wm(t,n),o}(pv);function tQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function rQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){tQ(o,n,i,A,a,"next",e)}function a(e){tQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function nQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function oQ(e,t){return(oQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function AQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sQ(e);if(t){var i=sQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return aQ(this,r)}}function aQ(e,t){return!t||"object"!==uQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sQ(e){return(sQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uQ(e){return(uQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var cQ,lQ,gQ=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":uQ(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},fQ=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":uQ(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},hQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oQ(e,t)}(a,e);var t,r,n,i,o,A=AQ(a);function a(){return nQ(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getParamData",value:(o=rQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",by().viewParamModel.getParamModelJsonData(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamIntersected",value:(i=rQ(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,by().fittingDesign.intersected.getParamModelIntersectedData(t);case 2:return r=e.sent,e.abrupt("return",(n=r,{intersectedGroups:Object(Ot.map)(n.intersectedGroups,(function(e){return Wh(Wh({},e),{},{intersecteds:Object(Ot.map)(e.intersecteds,(function(e){return Object(Ot.omit)(e,["shell"])}))})}))}));case 4:case"end":return e.stop()}var n}),e)}))),function(e){return i.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.ignoreCategory||(e.ignoreCategory=De),by().viewParamModel.getTopModelList(e)}},{key:"getParamModelPhotoById",value:function(e){return by().viewParamModel.getParamModelPhotoData(e)}}])&&iQ(t.prototype,r),n&&iQ(t,n),a}(pv);function pQ(e){return(pQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yQ(e,t){return(yQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function CQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=BQ(e);if(t){var i=BQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return EQ(this,r)}}function EQ(e,t){return!t||"object"!==pQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function BQ(e){return(BQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}gQ([me.observeAsyncApiDeco({serviceName:"ModelService"}),fQ("design:type",Function),fQ("design:paramtypes",["function"!=typeof!1&&Object]),fQ("design:returntype","function"==typeof(cQ="undefined"!=typeof Promise&&Promise)?cQ:Object)],hQ.prototype,"getParamData",null),gQ([me.observeAsyncApiDeco({serviceName:"ModelService"}),fQ("design:type",Function),fQ("design:paramtypes",["function"!=typeof!1&&Object]),fQ("design:returntype","function"==typeof(lQ="undefined"!=typeof Promise&&Promise)?lQ:Object)],hQ.prototype,"getParamIntersected",null);var vQ,mQ,QQ=function(){return by().select},bQ=function(){return by().baseDesignInfo};!function(e){e[e.NULL=0]="NULL",e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(vQ||(vQ={})),function(e){e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(mQ||(mQ={}));var _Q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yQ(e,t)}(o,e);var t,r,n,i=CQ(o);function o(){var e;return dQ(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.__generateEntity=function(e){return Object(Ot.castArray)(e).map((function(e){var t={__sceneId:oh.SCENE_ID,entityId:e.id,entityType:yA};return e.type===mQ.CASBIN&&(t.entityId=bQ().state.casbinModelIdMap[e.id]),t}))},e.onSelectedChanged=function(){Tt.emit(Mt.SELECTION_SERVICE_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){var e=QQ().state.state.selectedData,t=by().viewParamModel.state.state.allSubModels;if(e.length){var r=e[0].$model;if(r&&r instanceof mt&&r.isAppendHardware)return{data:[r.hardwareData],type:vQ.CASBIN};var n=Object(Ot.map)(e,"id"),i=t.filter((function(e){return n.includes(e.id)}));if(n.length)return{data:i,type:vQ.MODEL}}return{data:[],type:vQ.NULL}}},{key:"select",value:function(e){var t=this.__generateEntity(e);QQ().select(t)}},{key:"unSelect",value:function(e){if(e){var t=this.__generateEntity(e);QQ().unSelect(t)}else QQ().select([])}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,QQ().on(my.EVENT_SELECT_CHANGED,this.onSelectedChanged))}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),Tt.on(Mt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"off",value:function(e){Tt.off(Mt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),Tt.once(Mt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"__onDestroy",value:function(){QQ().off(my.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&IQ(t.prototype,r),n&&IQ(t,n),o}(pv);function SQ(e){return(SQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function RQ(e,t){return(RQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function MQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=PQ(e);if(t){var i=PQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xQ(this,r)}}function xQ(e,t){return!t||"object"!==SQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function PQ(e){return(PQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var TQ=function(){return by().select},FQ=function(){return UB().designModeContext},OQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&RQ(e,t)}(o,e);var t,r,n,i=MQ(o);function o(){var e;return wQ(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.plankFaceClickEvent={on:function(e){Tt.on(Mt.PLANK_FACE_CLICK,e)},once:function(e){Tt.once(Mt.PLANK_FACE_CLICK,e)},off:function(e){Tt.off(Mt.PLANK_FACE_CLICK,e)}},e.plankFaceHoverEvent={on:function(e){Tt.on(Mt.PLANK_FACE_HOVER,e)},once:function(e){Tt.once(Mt.PLANK_FACE_HOVER,e)},off:function(e){Tt.off(Mt.PLANK_FACE_HOVER,e)}},e.onSelectedChanged=function(){Tt.emit(Mt.SELECTION_SERVICE_V2_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){return TQ().state.state.selectedDataV2.map(this._genElement).filter((function(e){return!!e}))}},{key:"select",value:function(e){var t=Object(Ot.castArray)(e).map(this._genEntityFromElement);TQ().select(t),FQ().setCurSelectEntity(t)}},{key:"unSelect",value:function(e){if(e){var t=Object(Ot.castArray)(e).map(this._genEntityFromElement);TQ().unSelect(t);var r=FQ().getCurSelectEntity();r&&(Array.isArray(r)?FQ().setCurSelectEntity(Object(Ot.difference)(r,t)):t.includes(r)&&FQ().setCurSelectEntity(void 0))}else TQ().select(),FQ().setCurSelectEntity(void 0)}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),Tt.on(Mt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"off",value:function(e){Tt.off(Mt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),Tt.once(Mt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,TQ().on(my.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(e){return{entityId:e.id,entityType:qB[e.type]}}},{key:"_genElement",value:function(e){var t;if(e instanceof mt?t=e.isAppendHardware?Me.HARDWARE:Me.PARAM_MODEL:e instanceof xt?t=Me.PARAM_MODEL_ASSEMBLY:e instanceof rn?t=Me.HARDWARE_GROOVE:e instanceof Qr&&(t=e.type===c.HOLE?Me.HOLE:Me.GROOVE),t)return{id:e.id,type:t}}},{key:"__onDestroy",value:function(){TQ().off(my.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&DQ(t.prototype,r),n&&DQ(t,n),o}(pv);function LQ(e){return(LQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function NQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){kQ(o,n,i,A,a,"next",e)}function a(e){kQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function GQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jQ(e,t){return(jQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function VQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=HQ(e);if(t){var i=HQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return YQ(this,r)}}function YQ(e,t){return!t||"object"!==LQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function HQ(e){return(HQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var KQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jQ(e,t)}(u,e);var t,r,n,i,o,A,a=VQ(u);function u(){return GQ(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"viewSelected",value:(A=NQ(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",by().viewParamModel.viewSelectedParamModel());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"viewModelById",value:(o=NQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",by().viewParamModel.viewParamModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"resetPerspective",value:function(){var e=UB().getStateManager().scene3D;e.updateEnableCameraAnimation(!0),e.reset()}},{key:"toggleModelBorder",value:function(e){by().scene.$actionToggleRenderBorder.dispatch(e)}},{key:"toggleModelTransparent",value:function(e){by().scene.$actionToggleRenderTranslucent.dispatch(e)}},{key:"setting",value:function(e){by().fittingDesign.senseSetting.$actionSenseSetting.dispatch(e)}},{key:"refreshModel",value:(i=NQ(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",by().viewParamModel.refreshCustomModelData());case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})}])&&UQ(t.prototype,r),n&&UQ(t,n),u}(pv),qQ=r(244);function JQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function WQ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?JQ(Object(r),!0).forEach((function(t){zQ(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JQ(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function zQ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XQ(e){return function(e){if(Array.isArray(e))return ZQ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ZQ(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ZQ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $Q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var eb=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isRealPath=!1,this._changeMap={},this.id=rr()(),this.modelID=t,this.paths=r,r.forEach((function(e){e.plankArea=n}))}var t,r,n;return t=e,(r=[{key:"getRealPaths",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var n=r.force,i=void 0!==n&&n,o=r.resetCenter,A=void 0===o||o;if(!i&&A&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!i&&!A&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new e(this.modelID,[]);var a=this.getFace2ds();if(this.paths.length>1){var s=[];u.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),u.FacesBoolean.FaceBooleanType.subtract,s),a=s}var c=0===a.length?a[0]:{loops:(t=[]).concat.apply(t,XQ(a.map((function(e){return e.loops}))))};if(A){Object(qQ.calculateFaceBBox)(c);var l=c.box.center,g=u.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(e){e.loops.forEach((function(e){e.forEach((function(e){e.transform(g)}))}))}))}var f=a.map((function(e){return e.loops[0]})).map((function(e){return rb(Re.OUTER,e)})),h=a.reduce((function(e,t){return e.push.apply(e,XQ(t.loops.slice(1))),e}),[]).map((function(e){return rb(Re.INNER,e,!0)})),p=new e(this.modelID,[].concat(XQ(f),XQ(h)));return A?this._realPathsResetCenterCache=p:this._realPathsCache=p,p._isRealPath=!0,p}},{key:"getCenterPoint",value:function(){var e=tb(this.paths.find((function(e){return e.type===Re.OUTER})));Object(qQ.calculateFaceBBox)(e);var t=e.box.center;return{x:t.x,y:t.y}}},{key:"getFace2ds",value:function(){return this.paths.map(tb)}},{key:"_trackUpdateField",value:function(e,t,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,i=e.field;t===r||n.some((function(t){return t.field===i&&t.context.id===e.context.id}))||n.push(e)}},{key:"changeMap",get:function(){return this._changeMap},set:function(e){this._changeMap=e}}])&&$Q(t.prototype,r),n&&$Q(t,n),e}();function tb(e){var t=[];if(e.lines.forEach((function(e){var r=e.start;r.getType()!==w.NONE&&t.push(r.getCurveLineAndPoints().curveLine),t.push(e.getRealLine())})),e.offset){var r=(0,u.LoopCCW.isPolygonCCW2D)(t.map((function(e){return e.startPoint})))?e.offset:-e.offset;return{loops:u.Path2dOffset.offsetPath2d(t,r).resultPaths}}return{loops:[t]}}function rb(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.map((function(e){return new Tr({type:w.NONE,position:e.startPoint})})),i=t.map((function(e){var t;return t=e instanceof u.LineSeg2d?{type:D.SEGMENT}:e instanceof u.Arc2d?nb(e):ib(e),new Rr(t)})),o=u.LoopCCW.isPolygonCCW2D(n.map((function(e){return e.getPosition()})));r!==o&&(n=n.reverse(),i=(i=i.reverse().map((function(e){return"boolean"==typeof e.clockwise&&(e.clockwise=!e.clockwise),e}))).slice(1).concat(i[0]));var A=Ab(n.map((function(e){return e.getPosition()})));return n=n.slice(A).concat(n.slice(0,A)),i=i.slice(A).concat(i.slice(0,A)),new jr({type:e,points:n,lines:i,forceCCW:!1})}function nb(e){var t={};t.type=D.CIRCLE_ARC,t.radius=e.radius,t.clockwise=!e.isCCW;var r=e.center,n=e.startPoint,i=e.endPoint,o=new u.LineSeg2d(n,i),A=o.length/2,a=new u.Vector2d(o.getPoint(A)),s=new u.Vector2d(r).subtracted(a).normalized();return t.clockwise?t.minorArc=s.isSameDirection(o.rightNormal):t.minorArc=s.isSameDirection(o.leftNormal),t}function ib(e){var t={};return t.type=D.ELLIPSE_ARC,t.majorRadius=e.majorRadius,t.minorRadius=e.minorRadius,t.clockwise=!e.isCCW,t.ellipseCenter=e.ccs.origin,t}function ob(e){var t=e.changeMap.update,r=e._isRealPath?e.getCenterPoint():null,n=e._isRealPath?u.Matrix3.makeTranslation(-r.x,-r.y):void 0;t&&t.length>0&&(t.forEach((function(e){var t=e.field,r=e.context;"hint"===t&&((r=r).getHint()?Rc(r,n):function(e,t){var r=Qc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=n.findIndex((function(r){return r.linkModel.id===e&&r.id===t}));if(i>-1){var o=bc(n);o.splice(i,1),r.setPlankOutlineHintModels(o)}}(r.path.plankArea.modelID,r.id))})),e.changeMap=WQ(WQ({},e.changeMap),{},{update:[]}))}function Ab(e){if(!e.length)return 0;var t=e[0].y,r=e[0].x;e.slice(1).forEach((function(e){t<e.y&&(t=e.y),r>e.x&&(r=e.x)}));var n,i,o=-r,A=-t;return e.forEach((function(t,r){var a=t.x,s=t.y,u=Math.pow(a+o,2)+Math.pow(s+A,2);void 0===n||u<n?(n=u,i=r):n===u&&e[i].x>t.x&&(i=r)})),i}function ab(e){return(ab="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ub(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cb(e,t){return(cb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fb(e);if(t){var i=fb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gb(this,r)}}function gb(e,t){return!t||"object"!==ab(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fb(e){return(fb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cb(e,t)}(o,e);var t,r,n,i=lb(o);function o(){return sb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"parseModelPlankPath",value:function(e){return t=e.modelID,r=e.data,n=[],r.path&&n.push(Vr(Re.OUTER,r.path)),n.push.apply(n,XQ(r.holes.map((function(e){return Vr(Re.INNER,e)})))),new eb(t,n);var t,r,n}},{key:"syncModelPlankPath",value:function(e){ob(e)}}])&&ub(t.prototype,r),n&&ub(t,n),o}(pv);function pb(e){return(pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function db(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Ib(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Cb(e,t){return(Cb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Eb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vb(e);if(t){var i=vb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Bb(this,r)}}function Bb(e,t){return!t||"object"!==pb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vb(e){return(vb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cb(e,t)}(a,e);var t,r,n,i,o,A=Eb(a);function a(){return Ib(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"stable",value:(i=s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",by().viewParamModel.validateModelStable(t.modelId));case 1:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){db(o,r,n,A,a,"next",e)}function a(e){db(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&yb(t.prototype,r),n&&yb(t,n),a}(pv);function Qb(e){return(Qb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Sb(e,t){return(Sb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Rb(e);if(t){var i=Rb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Db(this,r)}}function Db(e,t){return!t||"object"!==Qb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Rb(e){return(Rb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sb(e,t)}(o,e);var t,r,n,i=wb(o);function o(){return bb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDesignMode",value:function(e){var t=e.mode,r=e.customModeCb;UB().designModeContext.setDesignMode(t,r)}},{key:"registerMultiSelectShortcut",value:function(e){UB().designModeContext.registerMultiSelectShortcut(e)}}])&&_b(t.prototype,r),n&&_b(t,n),o}(pv),xb=r(425),Pb=r.n(xb),Tb=new wi.I18NManager,Fb="custom_order_split",Ob={"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 Lb(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function kb(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Lb(o,n,i,A,a,"next",e)}function a(e){Lb(o,n,i,A,a,"throw",e)}A(void 0)}))}}var Nb=Object(Ot.once)((function(){return!!Object(Mc.parseServQueryParams)()}));function Gb(){return Ub.apply(this,arguments)}function Ub(){return(Ub=kb(s.a.mark((function e(){var t,r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},r=Mc.servkit.createTerminal({id:t.clientId||"custom-order-split",type:Mc.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:Mc.EServChannel.WINDOW,config:{slave:{getWindow:function(e){return{target:window.parent,window:window}}}}}}}),e.next=4,r.openSession({timeout:t.timeout||3e4});case 4:return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var jb=r(533),Vb=r.n(jb),Yb=r(1134),Hb=r.n(Yb);function Kb(e){return(Kb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Wb(e,t){return(Wb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Zb(e);if(t){var i=Zb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Xb(this,r)}}function Xb(e,t){return!t||"object"!==Kb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zb(e){return(Zb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wb(e,t)}(o,e);var t,r,n,i=zb(o);function o(){return qb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.tip,r=e.noImg,n=e.imgSrc,i=e.className;return Mi.a.createElement("div",{className:Vb()(Hb.a.empty,i)},!r&&Mi.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),t&&Mi.a.createElement("p",null,t))}}])&&Jb(t.prototype,r),n&&Jb(t,n),o}(Mi.a.PureComponent);function e_(e){return(e_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n_(e,t){return(n_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=A_(e);if(t){var i=A_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o_(this,r)}}function o_(e,t){return!t||"object"!==e_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A_(e){return(A_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n_(e,t)}(o,e);var t,r,n,i=i_(o);function o(){return t_(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props;return Mi.a.createElement(Di.Scene3D,e)}}])&&r_(t.prototype,r),n&&r_(t,n),o}(Ri.PureComponent),s_=r(1135),u_=r.n(s_);function c_(e){return(c_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l_(){return(l_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function g_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h_(e,t){return(h_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=I_(e);if(t){var i=I_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d_(this,r)}}function d_(e,t){return!t||"object"!==c_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function I_(e){return(I_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ri.PureComponent;var y_=r(91);function C_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return E_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return E_(e,t)}(e,t)||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 E_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}window.React=Mi.a;var B_=document.getElementById("root");function v_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Q_(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){m_(o,n,i,A,a,"next",e)}function a(e){m_(o,n,i,A,a,"throw",e)}A(void 0)}))}}function b_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var __=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.serviceMap=new Map,this.initLange(ve.ZH_CN,{zh_CN:Ob}),function(e){_f=e}(this)}var t,r,n,i,o;return t=e,(r=[{key:"startOnApiCalledEvent",value:function(){var e=this,t={on:function(e){return Tt.on(Mt.API_CALLED,e),function(){return Tt.off(Mt.API_CALLED,e)}},once:function(e){return Tt.once(Mt.API_CALLED,e),function(){return Tt.off(Mt.API_CALLED,e)}},emit:function(e){Tt.emit(Mt.API_CALLED,e)}};me.setEvent(t),t.on((function(t){var r=t.args,n=t.errMsg,i=t.status,o=t.apiName,A=t.duration,a=t.serviceName,s=e.getCustomMiniAppService(Ig);if(s){var u="".concat(a,".").concat(o);if(s.logApiCalledInfo({status:i,apiType:"CUSTOM_SPLIT_API",apiName:u,duration:A}),!i){var c=n instanceof Error?n.message:n&&n.toString?n.toString():"unknown",l="\n called ".concat(u," api fail:\n arguments is ").concat(JSON.stringify(r),",\n errMsg is ").concat(c,"\n ");s.logApiError(new Error(l),"miniAppApiCalledError")}}}))}},{key:"isInCustomMiniAppMode",value:function(){return Nb()}},{key:"createDebugUtils",value:function(){var e=this.serviceMap,t={enableDebug:function(){window.__customsdk__.services=e}};window.__customsdk__=t}},{key:"start",value:(o=Q_(s.a.mark((function e(t){var r,n,i=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.createDebugUtils(),!this.isInCustomMiniAppMode()){e.next=8;break}if(Mc.sappSDK.isStarted){e.next=5;break}return e.next=5,Mc.sappSDK.setConfig({useTerminalId:null==t?void 0:t.clientId,onClose:function(){var e=Q_(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.stop();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).start();case 5:this.sappSDK=Mc.sappSDK,e.next=13;break;case 8:return e.next=10,Kh(30);case 10:return e.next=12,Gb(t);case 12:this.sappSDK=e.sent;case 13:return this.startOnApiCalledEvent(),e.next=16,Promise.resolve([Di.App,em]).then((function(e){var t=C_(e,2),r=t[0],n=t[1];(new r).registerPlugin(n).start({fpsDetectorEnabled:!0}),document.body.removeChild(B_)})).catch((function(e){Object(y_.unmountComponentAtNode)(B_),Object(y_.render)(Mi.a.createElement($b,null),B_),console.error("micros/pad",e)}));case 16:return(r=this.getCustomMiniAppService(hg))?(lc().setMiniAppHttpProxyClientService(r),Ff(lc())):Ff(cc()),(wf=new Tf.AttachedService).config.setRequestClient(Rf),Df=new Tf.ParamModelDataService({paramModelConstructor:mt,requestClient:Rf}),new Tf.ParamModelAssemblyDataService({paramModelAssemblyConstructor:xt,requestClient:Rf}),n=this.getService(KQ),e.prev=20,e.next=23,n.viewSelected();case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(20),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.error(e.t0);case 28:case"end":return e.stop()}}),e,this,[[20,25]])}))),function(e){return o.apply(this,arguments)})},{key:"initLange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ve.ZH_CN,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(Ot.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),Pb.a.init({lang:e,debug:!1,initImmediate:!0,translatorType:xb.ENUM.TranslatorType.I18next,packages:[Fb],resource:v_({},Fb,t)}),Tb.init({namespace:Fb,resources:Fb})}},{key:"stop",value:(i=Q_(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.getCustomMiniAppService(pg))){e.next=4;break}return e.next=4,t.lockModelBySplit();case 4:this.serviceMap.forEach((function(e){Object(Ot.isFunction)(e.__onDestroy)&&e.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getService",value:function(e){if(pv.isPrototypeOf(e)){var t=this.serviceMap,r=t.get(e);return r||(r=new e,t.set(e,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(e){var t=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return t instanceof Mc.SappSDK?t.getService(e):t.client.getService(e)}},{key:"getCustomMiniAppServiceUnSafe",value:function(e){return this.getCustomMiniAppService(e)}}])&&b_(t.prototype,r),n&&b_(t,n),e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"changeLanguage",(function(){return X})),r.d(t,"cloneInstance",(function(){return Z})),r.d(t,"createInstance",(function(){return $})),r.d(t,"dir",(function(){return ee})),r.d(t,"exists",(function(){return te})),r.d(t,"getFixedT",(function(){return re})),r.d(t,"init",(function(){return ne})),r.d(t,"loadLanguages",(function(){return ie})),r.d(t,"loadNamespaces",(function(){return oe})),r.d(t,"loadResources",(function(){return Ae})),r.d(t,"off",(function(){return ae})),r.d(t,"on",(function(){return se})),r.d(t,"setDefaultNamespace",(function(){return ue})),r.d(t,"t",(function(){return ce})),r.d(t,"use",(function(){return le}));var n=r(191),i=r.n(n),o=r(85),A=r.n(o),a=r(73),s=r.n(a),u=r(74),c=r.n(u),l=r(212),g=r.n(l),f=r(247),h=r.n(f),p=r(248),d=r.n(p),I=r(101),y=r.n(I),C=r(1126),E=r.n(C),B={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var r;console&&console[e]&&(r=console)[e].apply(r,E()(t))}},v=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.init(t,r)}return c()(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||B,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,A()({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),m=function(){function e(){s()(this,e),this.observers={}}return c()(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){var r=this;this.observers[e]&&this.observers[e].forEach((function(){if(t){var n=r.observers[e].indexOf(t);n>-1&&r.observers[e].splice(n,1)}else delete r.observers[e]}))}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function Q(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function b(e){return null==e?"":""+e}function _(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function S(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var A=n(o.shift());!e[A]&&r&&(e[A]=new r),e=e[A]}return i()?{}:{obj:e,k:n(o.shift())}}function w(e,t,r){var n=S(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=S(e,t),n=r.obj,i=r.k;if(n)return n[i]}function R(e,t,r){for(var n in t)n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):R(e[n],t[n],r):e[n]=t[n];return e}function M(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return d()(t,e),c()(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=[e,t];return r&&"string"!=typeof r&&(o=o.concat(r)),r&&"string"==typeof r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split(".")),D(this.data,o)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var A=[e,t];r&&(A=A.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(A=e.split("."))[1]),this.addNamespaces(t),w(this.data,A,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=D(this.data,a)||{};n?R(s,r,i):s=A()({},s,r),w(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?A()({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(m),F={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}},O=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],e,y()(y()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=v.create("translator"),r}return d()(t,e),c()(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=t.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var o=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var r=this;if("object"!==i()(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),a=o.key,s=o.namespaces,u=s[s.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){var g=t.nsSeparator||this.options.nsSeparator;return u+g+a}return a}var f=this.resolve(e,t),h=f&&f.res,p=f&&f.usedKey||a,d=f&&f.exactUsedKey||a,I=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],C=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,B="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(E&&h&&B&&y.indexOf(I)<0&&("string"!=typeof C||"[object Array]"!==I)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,t):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");if(n){var v="[object Array]"===I,m=v?[]:{},Q=v?d:p;for(var b in h)if(Object.prototype.hasOwnProperty.call(h,b)){var _="".concat(Q).concat(n).concat(b);m[b]=this.translate(_,A()({},t,{joinArrays:!1,ns:s})),m[b]===_&&(m[b]=h[b])}h=m}}else if(E&&"string"==typeof C&&"[object Array]"===I)(h=h.join(C))&&(h=this.extendTranslation(h,e,t));else{var S=!1,w=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(S=!0,void 0!==t.count){var D=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(D)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(w=!0,h=a);var R=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(w||S||R){this.logger.log(R?"updateKey":"missingKey",c,u,a,R?t.defaultValue:h);var M=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var P=0;P<x.length;P++)M.push(x[P]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var T=function(e,n){r.options.missingKeyHandler?r.options.missingKeyHandler(e,u,n,R?t.defaultValue:h,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,u,n,R?t.defaultValue:h,R,t),r.emit("missingKey",e,u,n,h)};if(this.options.saveMissing){var F=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&F?M.forEach((function(e){r.pluralResolver.getPluralFormsOfKey(e,a).forEach((function(t){return T([e],t)}))})):T(M,a)}}h=this.extendTranslation(h,e,t,f),w&&h===a&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(a)),w&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,r,n){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,r,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(A()({},r,{interpolation:A()({},this.options.interpolation,r.interpolation)}));var o=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(o=A()({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,r.lng||this.language,r),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var a=r.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==r.applyPostProcessor&&(e=F.handle(s,e,t,r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,A=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!A.isValidLookup(t)){var s=A.extractFromKey(e,a),u=s.key;r=u;var c=s.namespaces;A.options.fallbackNS&&(c=c.concat(A.options.fallbackNS));var l=void 0!==a.count&&"string"!=typeof a.count,g=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:A.languageUtils.toResolveHierarchy(a.lng||A.language,a.fallbackLng);c.forEach((function(e){A.isValidLookup(t)||(o=e,f.forEach((function(r){if(!A.isValidLookup(t)){i=r;var o,s,c=u,f=[c];if(A.i18nFormat&&A.i18nFormat.addLookupKeys)A.i18nFormat.addLookupKeys(f,u,r,e,a);else l&&(o=A.pluralResolver.getSuffix(r,a.count)),l&&g&&f.push(c+o),g&&f.push(c+="".concat(A.options.contextSeparator).concat(a.context)),l&&f.push(c+=o);for(;s=f.pop();)A.isValidLookup(t)||(n=s,t=A.getResource(r,e,s,a))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}]),t}(m);function L(e){return e.charAt(0).toUpperCase()+e.slice(1)}var k=function(){function e(t){s()(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=v.create("languageUtils")}return c()(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=L(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isWhitelisted(e)?i.push(e):r.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],G={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};function U(){var e={};return N.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:G[t.fc]}}))})),e}var j=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=U()}return c()(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=this,n=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var o=r.getSuffix(e,i);n.push("".concat(t).concat(o))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),o=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var A=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):A():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?A():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s()(this,e),this.logger=v.create("interpolator"),this.init(t,!0)}return c()(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e}),e.interpolation||(e.interpolation={escapeValue:!0});var r=e.interpolation;this.escape=void 0!==r.escape?r.escape:P,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?M(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?M(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?M(r.nestingPrefix):r.nestingPrefixEscaped||M("$t("),this.nestingSuffix=r.nestingSuffix?M(r.nestingSuffix):r.nestingSuffixEscaped||M(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,A,a=this;function s(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0)return D(t,e);var n=e.split(a.formatSeparator),i=n.shift().trim(),o=n.join(a.formatSeparator).trim();return a.format(D(t,i),o,r)};this.resetRegExp();var c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(A=0;(i=this.regexpUnescape.exec(e))&&(o=u(i[1].trim()),e=e.replace(i[0],o),this.regexpUnescape.lastIndex=0,!(++A>=this.maxReplaces)););for(A=0;i=this.regexp.exec(e);){if(void 0===(o=u(i[1].trim())))if("function"==typeof c){var l=c(e,i,n);o="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o="";else"string"==typeof o||this.useRawValueToEscape||(o=b(o));if(o=this.escapeValue?s(this.escape(o)):s(o),e=e.replace(i[0],o),this.regexp.lastIndex=0,++A>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=A()({},i);function a(e,t){if(e.indexOf(",")<0)return e;var r=e.split(",");e=r.shift();var n=r.join(",");n=(n=this.interpolate(n,o)).replace(/'/g,'"');try{o=JSON.parse(n),t&&(o=A()({},t,o))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(o.applyPostProcessor=!1;r=this.nestingRegexp.exec(e);){if((n=t(a.call(this,r[1].trim(),o),o))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=b(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}(),Y=r(729),H=r.n(Y);var K=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s()(this,t),i=g()(this,h()(t).call(this)),m.call(y()(y()(i))),i.backend=e,i.store=r,i.languageUtils=n.languageUtils,i.options=o,i.logger=v.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return d()(t,e),c()(t,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o=[],A=[],a=[],s=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?A.indexOf(a)<0&&A.push(a):(i.state[a]=1,n=!1,A.indexOf(a)<0&&A.push(a),o.indexOf(a)<0&&o.push(a),s.indexOf(t)<0&&s.push(t)))})),n||a.push(e)})),(o.length||A.length)&&this.queue.push({pending:A,loaded:{},errors:[],callback:n}),{toLoad:o,pending:A,toLoadLanguages:a,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=H()(n,2),o=i[0],A=i[1];t&&this.emit("failedLoading",o,A,t),r&&this.store.addResourceBundle(o,A,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,i,s,u,c,l;n=r.loaded,i=A,u=S(n,[o],Object),c=u.obj,l=u.k,c[l]=c[l]||[],s&&(c[l]=c[l].concat(i)),s||c[l].push(i),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,A=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(a,s){a&&s&&i<5?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,A)}),o):A(a,s)})):A(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=H()(n,2),o=i[0],A=i[1];this.read(o,A,"read",null,null,(function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(A," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(A," for language ").concat(o),i),t.loaded(e,n,i)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,A()({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n)}}]),t}(m);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===i()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i()(e[2])||"object"===i()(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function J(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function W(){}var z=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(s()(this,t),e=g()(this,h()(t).call(this)),m.call(y()(y()(e))),e.options=J(r),e.services={},e.logger=v,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),g()(e,y()(y()(e)));setTimeout((function(){e.init(r,n)}),0)}return e}return d()(t,e),c()(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(r=t,t={}),this.options=A()({},q(),this.options,J(t)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?v.init(n(this.modules.logger),this.options):v.init(null,this.options);var i=new k(this.options);this.store=new T(this.options.resources,this.options);var o=this.services;o.logger=v,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new j(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new V(this.options),o.backendConnector=new K(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}var a=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var s=Q(),u=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(n),r(t,n)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var r=[],n=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(this.language)n(this.language);else{var i=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);i.forEach((function(e){return n(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return n(e)})),this.services.backendConnector.load(r,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,r){var n=Q();return e||(e=this.languages),t||(t=this.options.ns),r||(r=W),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this,n=Q();this.emit("languageChanging",e);var i=function(e){e&&(r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.translator.language||r.translator.changeLanguage(e),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(e)),r.loadResources((function(i){!function(e,i){r.translator.changeLanguage(i),i&&(r.emit("languageChanged",i),r.logger.log("languageChanged",i)),n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var o=A()({},n);if("object"!==i()(n)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(s))}return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,r.t(t,o)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=t,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"loadNamespaces",value:function(e,t){var r=this,n=Q();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=Q();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,i=A()({},this.options,r,{isClone:!0}),o=new t(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.translator=new O(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(i,n),o.translator.options=o.options,o}}]),t}(m)),X=(t.default=z,z.changeLanguage.bind(z)),Z=z.cloneInstance.bind(z),$=z.createInstance.bind(z),ee=z.dir.bind(z),te=z.exists.bind(z),re=z.getFixedT.bind(z),ne=z.init.bind(z),ie=z.loadLanguages.bind(z),oe=z.loadNamespaces.bind(z),Ae=z.loadResources.bind(z),ae=z.off.bind(z),se=z.on.bind(z),ue=z.setDefaultNamespace.bind(z),ce=z.t.bind(z),le=z.use.bind(z)}])}));