@manycore/custom-sdk 1.13.6-alpha.0 → 1.13.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +120 -107
- package/index.js +8 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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.app=t(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):e.app=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=2074)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t,r){e.exports=r(1339)},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(1340),i=mr(n),o=r(560),A=mr(o),a=r(87),s=mr(a),u=r(150),c=mr(u),l=r(118),g=r(70),f=r(368),h=r(41),p=mr(h),d=r(369),I=r(109),y=mr(I),C=r(167),E=mr(C),B=r(444),v=mr(B),m=r(770),Q=mr(m),b=mr(r(561)),_=mr(r(771)),S=mr(r(19)),w=mr(r(33)),D=mr(r(56)),R=r(295),M=r(370),x=vr(r(13)),P=mr(r(562)),T=mr(r(772)),F=r(194),L=r(76),O=mr(r(40)),k=mr(r(43)),N=r(773),G=r(774),U=r(445),j=r(296),V=r(775),Y=r(446),H=r(563),K=r(564),q=r(1343),J=r(1344),W=r(1345),z=r(1346),X=r(130),Z=r(151),$=r(776),ee=r(1347),te=r(1348),re=r(1349),ne=r(371),ie=r(297),oe=vr(r(298)),Ae=vr(r(316)),ae=vr(r(784)),se=vr(r(1363)),ue=vr(r(1365)),ce=r(303),le=r(377),ge=r(170),fe=r(305),he=r(786),pe=r(304),de=r(378),Ie=r(379),ye=r(787),Ce=r(578),Ee=r(380),Be=r(306),ve=r(307),me=r(381),Qe=r(308),be=r(310),_e=r(154),Se=r(309),we=r(790),De=r(386),Re=r(385),Me=r(382),xe=r(453),Pe=r(388),Te=r(383),Fe=r(311),Le=r(454),Oe=r(312),ke=r(313),Ne=r(314),Ge=r(389),Ue=r(390),je=r(315),Ve=r(384),Ye=r(456),He=r(391),Ke=r(263),qe=r(392),Je=r(394),We=r(576),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(577),ot=r(579),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(387),pt=r(77),dt=r(458),It=r(565),yt=r(171),Ct=r(262),Et=r(372),Bt=r(198),vt=r(132),mt=r(375),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),Lt=r(570),Ot=r(393),kt=r(199),Nt=r(574),Gt=r(1367),Ut=r(26),jt=r(1377),Vt=vr(r(818)),Yt=vr(r(1381)),Ht=vr(r(819)),Kt=vr(r(299)),qt=vr(r(1382)),Jt=vr(r(88)),Wt=vr(r(1385)),zt=vr(r(461)),Xt=vr(r(302)),Zt=vr(r(153)),$t=vr(r(788)),er=vr(r(789)),tr=vr(r(374)),rr=vr(r(1387)),nr=vr(r(219)),ir=vr(r(1388)),or=vr(r(1389)),Ar=vr(r(823)),ar=vr(r(1396)),sr=vr(r(575)),ur=vr(r(320)),cr=vr(r(462)),lr=vr(r(218)),gr=r(1397),fr=vr(gr),hr=r(1398),pr=vr(hr),dr=vr(r(1399)),Ir=vr(r(1401)),yr=r(1402),Cr=vr(yr),Er=r(376),Br=r(395);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=O.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=L.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=Lt.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=Ot.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=Oe.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=Le.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.6';!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=2074)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t,r){e.exports=r(1339)},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(1340),i=mr(n),o=r(560),A=mr(o),a=r(87),s=mr(a),u=r(150),c=mr(u),l=r(118),g=r(70),f=r(368),h=r(41),p=mr(h),d=r(369),I=r(109),y=mr(I),C=r(167),E=mr(C),B=r(444),v=mr(B),m=r(770),Q=mr(m),b=mr(r(561)),_=mr(r(771)),S=mr(r(19)),w=mr(r(33)),D=mr(r(56)),R=r(295),M=r(370),x=vr(r(13)),P=mr(r(562)),T=mr(r(772)),F=r(194),L=r(76),O=mr(r(40)),k=mr(r(43)),N=r(773),G=r(774),U=r(445),j=r(296),V=r(775),Y=r(446),H=r(563),K=r(564),q=r(1343),J=r(1344),W=r(1345),z=r(1346),X=r(130),Z=r(151),$=r(776),ee=r(1347),te=r(1348),re=r(1349),ne=r(371),ie=r(297),oe=vr(r(298)),Ae=vr(r(316)),ae=vr(r(784)),se=vr(r(1363)),ue=vr(r(1365)),ce=r(303),le=r(377),ge=r(170),fe=r(305),he=r(786),pe=r(304),de=r(378),Ie=r(379),ye=r(787),Ce=r(578),Ee=r(380),Be=r(306),ve=r(307),me=r(381),Qe=r(308),be=r(310),_e=r(154),Se=r(309),we=r(790),De=r(386),Re=r(385),Me=r(382),xe=r(453),Pe=r(388),Te=r(383),Fe=r(311),Le=r(454),Oe=r(312),ke=r(313),Ne=r(314),Ge=r(389),Ue=r(390),je=r(315),Ve=r(384),Ye=r(456),He=r(391),Ke=r(263),qe=r(392),Je=r(394),We=r(576),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(577),ot=r(579),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(387),pt=r(77),dt=r(458),It=r(565),yt=r(171),Ct=r(262),Et=r(372),Bt=r(198),vt=r(132),mt=r(375),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),Lt=r(570),Ot=r(393),kt=r(199),Nt=r(574),Gt=r(1367),Ut=r(26),jt=r(1377),Vt=vr(r(818)),Yt=vr(r(1381)),Ht=vr(r(819)),Kt=vr(r(299)),qt=vr(r(1382)),Jt=vr(r(88)),Wt=vr(r(1385)),zt=vr(r(461)),Xt=vr(r(302)),Zt=vr(r(153)),$t=vr(r(788)),er=vr(r(789)),tr=vr(r(374)),rr=vr(r(1387)),nr=vr(r(219)),ir=vr(r(1388)),or=vr(r(1389)),Ar=vr(r(823)),ar=vr(r(1396)),sr=vr(r(575)),ur=vr(r(320)),cr=vr(r(462)),lr=vr(r(218)),gr=r(1397),fr=vr(gr),hr=r(1398),pr=vr(hr),dr=vr(r(1399)),Ir=vr(r(1401)),yr=r(1402),Cr=vr(yr),Er=r(376),Br=r(395);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=O.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=L.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=Lt.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=Ot.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=Oe.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=Le.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 L(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function O(e,t,r,n,i,o){e.executeSql(r,n,i,(function(e,A){A.code===A.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,A):L(e,t,(function(){e.executeSql(r,n,i,o)}),o)}),o):o(e,A)}),o)}function k(e,t,r,n){var i=this;e=c(e);var o=new A((function(o,A){i.ready().then((function(){void 0===t&&(t=null);var a=t,s=i._dbInfo;s.serializer.serialize(t,(function(t,u){u?A(u):s.db.transaction((function(r){O(r,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){A(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void o(k.apply(i,[e,a,r,n-1]));A(t)}}))}))})).catch(A)}));return s(o,r),o}function N(e){return new A((function(t,r){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}var G={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var i=new A((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(i){L(i,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=F,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"SELECT * FROM "+i.storeName,[],(function(r,n){for(var o=n.rows,A=o.length,a=0;a<A;a++){var s=o.item(a),u=s.value;if(u&&(u=i.serializer.deserialize(u)),void 0!==(u=e(u,s.key,a+1)))return void t(u)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=i.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){return k.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){O(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){O(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,r){var n=r.rows.item(0).c;e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var n=r.rows.length?r.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){O(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],i=0;i<r.rows.length;i++)n.push(r.rows.item(i).key);e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,i=this;return s(n=e.name?new A((function(t){var n;n=e.name===r.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(N(n))})).then((function(e){return new A((function(t,r){e.db.transaction((function(n){function i(e){return new A((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var o=[],a=0,s=e.storeNames.length;a<s;a++)o.push(i(e.storeNames[a]));A.all(o).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):A.reject("Invalid arguments"),t),n}};function U(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function j(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var V={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=U(e,this._defaultConfig),j()?(this._dbInfo=t,t.serializer=F,A.resolve()):A.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,i=n.length,o=localStorage.length,A=1,a=0;a<o;a++){var s=localStorage.key(a);if(0===s.indexOf(n)){var u=localStorage.getItem(s);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,s.substring(i),A++)))return u}}}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new A((function(i,o){var A=n._dbInfo;A.serializer.serialize(t,(function(t,n){if(n)o(n);else try{localStorage.setItem(A.keyPrefix+e,t),i(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return s(n,t),n},clear:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],i=0;i<r;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&n.push(o.substring(e.keyPrefix.length))}return n}));return s(r,e),r},dropInstance:function(e,t){if(t=l.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var n,i=this;return s(n=e.name?new A((function(t){e.storeName?t(U(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):A.reject("Invalid arguments"),t),n}},Y=function(e,t){for(var r,n,i=e.length,o=0;o<i;){if((r=e[o])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;o++}return!1},H=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},K={},q={},J={INDEXEDDB:S,WEBSQL:G,LOCALSTORAGE:V},W=[J.INDEXEDDB._driver,J.WEBSQL._driver,J.LOCALSTORAGE._driver],z=["dropInstance"],X=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(z),Z={description:"",driver:W.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function $(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function ee(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(H(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var te=new(function(){function e(t){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J)if(J.hasOwnProperty(r)){var n=J[r],i=n._driver;this[r]=i,K[i]||this.defineDriver(n)}this._defaultConfig=ee({},Z),this._config=ee({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new A((function(t,r){try{var n=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(i);for(var o=X.concat("_initStorage"),a=0,u=o.length;a<u;a++){var c=o[a];if((!Y(z,c)||e[c])&&"function"!=typeof e[c])return void r(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=A.reject(t);return s(r,arguments[arguments.length-1]),r}},r=0,n=z.length;r<n;r++){var i=z[r];e[i]||(e[i]=t(i))}}();var l=function(r){K[n]&&console.info("Redefining LocalForage driver: "+n),K[n]=e,q[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(l,r):l(!!e._support):l(!0)}catch(e){r(e)}}));return u(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=K[e]?A.resolve(K[e]):A.reject(new Error("Driver not found."));return u(n,t,r),n},e.prototype.getSerializer=function(e){var t=A.resolve(F);return u(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;H(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){n._config.driver=n.driver()}function a(e){return n._extend(e),o(),n._ready=n._initStorage(n._config),n._ready}var s=null!==this._driverSet?this._driverSet.catch((function(){return A.resolve()})):A.resolve();return this._driverSet=s.then((function(){var e=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var i=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(i).then(a).catch(r)}o();var s=new Error("No available storage method found.");return n._driverSet=A.reject(s),n._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return n._driverSet=A.reject(e),n._driverSet})),u(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!q[e]},e.prototype._extend=function(e){ee(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=X.length;e<t;e++)$(this,X[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=te},{3:3}]},{},[4])(4)},"object"===a(t)&&void 0!==e?e.exports=A():(i=[],void 0===(o="function"==typeof(n=A)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(144))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=function(){t.stop(),t.autoSaveTimer=window.setInterval((function(){t.state.dirty&&(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV||t.mergeState({autoSaveSignalCount:t.state.autoSaveSignalCount+1}))}),18e4)},t.stop=function(){t.autoSaveTimer&&(clearInterval(t.autoSaveTimer),t.autoSaveTimer=void 0)},t}return(0,n.__extends)(t,e),t.prototype.initState=function(){this.updateState({autoSaveSignalCount:0,dirty:!1})},t.prototype.markDirty=function(e){this.mergeState({dirty:e})},t}(i.default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logDocumentLoad=function(e,t){(0,n.sendKTrackerEvent)("toolLoad",{type:e,errorMsg:t})};var n=r(985)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ModelUpdateType",{enumerable:!0,get:function(){return i.ModelUpdateType}}),t.default=t.MultiBackupItem=void 0;var n=r(4),i=r(290),o=r(1993),A=r(676),a=r(2),s=r(1052);function u(e,t){var r=new Map;return e.forEach((function(e,n){r.set(n,t(e,n))})),r}var c=function(e){function t(t){var r=e.call(this,t)||this;return r.multiData=u(t,(function(e){return{data:new e.BackupItemImpl(e.model),BackupItemImpl:e.BackupItemImpl}})),r}return(0,n.__extends)(t,e),t.prototype.toModel=function(){return u(this.multiData,(function(e){return{model:e.data.toModel(),BackupItemImpl:e.BackupItemImpl}}))},t}(i.BackupItem);function l(e,t,r){var i=r.value;return(0,n.__assign)((0,n.__assign)({},r),{value:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.started)i.apply(this,e);else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw new Error("method "+t+" can only be called after app started.")}})}t.MultiBackupItem=c;var g=function(e){function t(r){var n=e.call(this,{getModel:function(){return u(n.documentSources,(function(e){var t=e.getModel();if(!t)throw new Error("MultiDocumentManager: getModel() return undefined for: "+e.key);return{model:t,BackupItemImpl:e.BackupItemImpl}}))},onUpdateModel:function(e,t){n.mapEachPrioritySync((function(r){r.forEach((function(r){var n=e.get(r.key);if(!n)throw new Error('No backup model for "'+r.key+"\", perhaps it's been added after this backup triggered.");r.onUpdateModel(n.model,t)}))}))},onUpdateState:r.onUpdateState,maxBackupStep:r.maxBackupStep,useHybridStorage:r.useHybridStorage})||this;return n.started=!1,n.cancelLoadToken=o.CancelToken.source(),n.id="kafDocument"+t.instanceCount++,n.monitoredRequestedKeySet=new Set,n.monitorSourceFetch=function(e,t,r){var i=e+r;return n.monitoredRequestedKeySet.has(i)?t:(n.monitoredRequestedKeySet.add(i),n.reportSource(e,t,r))},n.onModelChange=r.onModelChange||a.noop,n.onPause=r.onPause||a.noop,n.onToggleAutoBackup=r.onToggleAutoBackup||a.noop,n.onResume=r.onResume||a.noop,n}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"documentSources",{get:function(){return this.internalDocumentSources||(this.internalDocumentSources=new Map),this.internalDocumentSources},enumerable:!0,configurable:!0}),t.prototype.getBackupItemImpl=function(){return c},t.prototype.setId=function(e){this.id=e},t.prototype.getId=function(){return this.id},t.prototype.onModelChanges=function(e){this.started&&(this.requestCommit(),this.onModelChange())},t.prototype.toggleAutoBackup=function(t){e.prototype.toggleAutoBackup.call(this,t),this.onToggleAutoBackup(t)},t.prototype.commit=function(){e.prototype.commit.call(this)},t.prototype.onLoadSessionStart=function(){var e=(0,s.createDocumentLoadReporter)(),t=e.reportSource,r=e.statisticsPromise,n=e.getStatistics;(0,e.setTotal)(this.documentSources.size),this.loadStatisticsPromise=r,this.getStatisticsSync=n,this.reportSource=t,this.monitoredRequestedKeySet.clear()},t.prototype.createFetchDocumentPromises=function(e,r){var n=this,i=this.getDocumentsSortedByPriority(t.getDocFetchPriority),o=new Map;return i.reduce((function(t,i){return t.then((function(){var t=[];return i.documents.forEach((function(i){if(void 0!==i.fetch){var A=n.monitorSourceFetch(i.key,i.fetch({isInitialLoad:e,reloadInfo:r}),"fetch");t.push(A),o.set(i.key,A)}})),Promise.all(t)}))}),Promise.resolve()),o},t.prototype.openDocuments=function(){var e=this;this.onLoadSessionStart();var t=this.createFetchDocumentPromises(!0);return this.mapEachPriority((function(r){return Promise.all(r.map((function(r){return(t.get(r.key)||Promise.resolve()).then((function(t){return e.monitorSourceFetch(r.key,r.open(t),"open")}))})))}))},t.prototype.loadUntilCancel=function(e,t){var r=this;return this.cancelLoadToken=o.CancelToken.source(),Promise.race([e,this.cancelLoadToken.token.promise]).then((function(e){if((0,A.isCancel)(e))return e;t&&t(),r.requestCommit(),r.commit()}))},t.prototype.start=function(){var e=this;if(this.started)throw new Error("Cannot start twice");return this.loadUntilCancel(this.openDocuments(),(function(){e.started=!0,e.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!0,e.onDocumentChange),e.afterInit&&e.afterInit(e.onDocumentChange)})),e.toggleAutoBackup(!0)}))},t.prototype.reloadDocuments=function(e){var t=this;this.onLoadSessionStart();var r={data:e},n=this.createFetchDocumentPromises(!1,r);return this.mapEachPriority((function(e){return Promise.all(e.map((function(e){var i=e.reload;return i?(n.get(e.key)||Promise.resolve()).then((function(n){return t.monitorSourceFetch(e.key,i(r,n),"open")})):Promise.resolve()})))}))},t.prototype.reload=function(e){return this.clearBackupHistory(),this.pause(),this.loadUntilCancel(this.reloadDocuments(e),this.resume.bind(this))},t.prototype.pause=function(){this.toggleAutoBackup(!1),this.onPause(),this.started=!1},t.prototype.resume=function(){this.started=!0,this.onResume(),this.toggleAutoBackup(!0)},t.prototype.beforeDispose=function(){this.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!1,a.noop),e.beforeDispose&&e.beforeDispose()})),this.toggleAutoBackup(!1),this.cancelLoadToken.cancel("DocumentManager has been disposed"),this.started=!1},t.prototype.getLoadStatistics=function(e){return void 0===e&&(e=!0),e?(this.loadStatisticsPromise||console.error("Please wail until the document load completed"),this.loadStatisticsPromise):this.getStatisticsSync()},t.prototype.beforeSaveDocument=function(e){if(!this.started)return!1;var t=!0;return this.documentSources.forEach((function(r){r.beforeSaveDocument&&(r.beforeSaveDocument(e)||(t=!1))})),t},t.prototype.saveDocument=function(e,t){var r=this.generateActionId(),i={actionId:r};return t&&(i=(0,n.__assign)((0,n.__assign)({},t),{actionId:r})),this.mapEachPriority((function(t){return Promise.all(t.map((function(t){return t.saveDocument(e,i)})))}))},t.prototype.clearDocument=function(e,t){this.mapEachPrioritySync((function(r){r.forEach((function(r){t&&!t(r)||r.clearDocument({data:e})}))}))},t.prototype.addDocumentSource=function(e){var t=this;if(this.started)throw new Error("MultiDocumentManager: currently don't support to dynamicly add/remove document source after app started.");if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(e.updateListeners&&console.warn("[Deprecated]:updateListeners,请在 afterInit 方法内监听数据变化,在 beforeDispose 内移除监听"),!e.updateListeners&&!e.afterInit))throw Error("updateListeners 和 afterInit 请至少实现一个");var r=e.key;if(this.documentSources.get(r))throw new Error("MultiDocumentManager: duplicate document source key: "+e.key);this.documentSources.set(r,(0,n.__assign)((0,n.__assign)({},e),{onDocumentChange:function(){return t.onModelChanges(r)}}))},t.prototype.getDocumentsSortedByPriority=function(e){var t,r,n,i={};return t=this.documentSources,r=function(t,r){var n=e(t);i[n]||(i[n]=[]),i[n].push(t)},n=[],t.forEach((function(e,t){n.push(r(e,t))})),Object.keys(i).map((function(e){var t=parseFloat(e);return{priority:t,documents:i[t]}})).sort((function(e,t){return t.priority-e.priority}))},t.prototype.mapEachPriority=function(e){return this.getDocumentsSortedByPriority(t.getDocPriority).reduce((function(t,r){return t=t.then((function(){return e(r.documents,r.priority)}))}),Promise.resolve())},t.prototype.mapEachPrioritySync=function(e){this.getDocumentsSortedByPriority(t.getDocPriority).forEach((function(t){e(t.documents,t.priority)}))},t.prototype.generateActionId=function(){return Date.now()+"-"+this.id},t.instanceCount=0,t.getDocFetchPriority=function(e){return e.fetchPriority||0},t.getDocPriority=function(e){return e.priority||0},(0,n.__decorate)([l],t.prototype,"toggleAutoBackup",null),(0,n.__decorate)([l],t.prototype,"commit",null),t}(i.default);t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1994),i=function(){function e(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){return t=e}));var r=this;e((function(e){r.reason||(r.reason=new n.Cancel(e),t(r.reason))}))}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var t=function(){};return{token:new e((function(e){return t=e})),cancel:t}},e}();t.CancelToken=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.message=e}return e.prototype.__CANCEL__=function(){},e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e}();t.Cancel=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.scoped=function(e){return function(t,r,o){return(0,i.__assign)((0,i.__assign)({},o),{value:function(){for(var t,r,i=this,A=[],a=0;a<arguments.length;a++)A[a]=arguments[a];var s=A.find((function(e){var t;return!0===(null===(t=e)||void 0===t?void 0:t.isScope)}));if(!s||!s.valid)return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING?void(s?s.valid||console.warn("Scope is not valid!"):console.warn("No scope found!")):null===(t=o.value)||void 0===t?void 0:t.apply(this,A);var u=function(){s.push((function(){e.apply(i,A)}))};try{var c=null===(r=o.value)||void 0===r?void 0:r.apply(this,A);return c&&("object"===n(c)||"function"==typeof c)&&(c instanceof Promise||"function"==typeof c.then)?c.then(u):u(),c}catch(e){throw e}}})}},t.ScopeGroup=void 0;var i=r(4);var o=function(){function e(e,t,r,n){this.parent=e,this.onScopeDispose=t,this.pushChange=r,this.isValid=n,this.isScope=!0,this.disposed=!1}return Object.defineProperty(e.prototype,"valid",{get:function(){return!this.disposed&&this.isValid(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alive",{get:function(){return!this.disposed},enumerable:!0,configurable:!0}),e.prototype.push=function(e){this.valid?this.pushChange(this,e):console.warn("Scope is not valid!")},e.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.onScopeDispose(this))},e}(),A=function(){function e(){var e=this;this.changeStack=[],this.lockedScope=new Set,this.onScopeDispose=function(t){e.sequenceRestore(t)},this.pushChange=function(t,r){e.changeStack.push({scope:t,restore:r})},this.isScopeValid=function(t){for(var r=-1,n=e.changeStack.length-1;n>0;n--)if(e.changeStack[n].scope===t){r=n;break}return!e.lockedScope.has(t)&&(-1===r||r===e.changeStack.length-1)}}return e.prototype.sequenceRestore=function(e){for(var t,r,n=[];this.changeStack.length;){var o=this.changeStack[this.changeStack.length-1];if(o.scope.alive)break;this.changeStack.pop(),n.push(o)}try{for(var A=(0,i.__values)(n),a=A.next();!a.done;a=A.next()){a.value.restore()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=A.return)&&r.call(A)}finally{if(t)throw t.error}}},e.prototype.lock=function(e){e.parent===this&&this.lockedScope.add(e)},e.prototype.unLock=function(e){this.lockedScope.delete(e)},e.prototype.createScope=function(){return new o(this,this.onScopeDispose,this.pushChange,this.isScopeValid)},e.prototype.dispose=function(){for(;this.changeStack.length;){this.changeStack.pop().restore()}[].forEach((function(e){return e.alive&&e.dispose()}))},e}();t.ScopeGroup=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scopedState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Object.defineProperty(t.prototype,A,{value:e,writable:!1,enumerable:!1,configurable:!1}),(0,o.scopedObject)({diff:s,getter:c,restore:u})(t)}};var n=r(4),i=r(2),o=r(1083),A=Symbol("scoped_property");var a,s=(a=new Set,function(e,t){var r={};return Object.keys(e).forEach((function(e){a.add(e)})),Object.keys(t).forEach((function(e){a.add(e)})),a.forEach((function(n){e[n]!==t[n]&&(r[n]={from:e[n],to:t[n]})})),a.clear(),r});function u(e){var t=(0,n.__assign)({},this.state);Object.keys(e).forEach((function(r){var n=e[r];Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&n.to!==t[r]&&console.error("Scoped state "+r+" changed outside current scope!"),t[r]=n.from})),this.state=t}function c(){var e=this[A];return function(e,t){return t&&t.length?(0,i.pick)(e,t):(0,n.__assign)({},e)}(this.state,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"drawPolygonWithHole",{enumerable:!0,get:function(){return n.drawPolygonWithHole}}),Object.defineProperty(t,"drawBox",{enumerable:!0,get:function(){return n.drawBox}}),Object.defineProperty(t,"drawPolyline",{enumerable:!0,get:function(){return n.drawPolyline}}),Object.defineProperty(t,"drawLine",{enumerable:!0,get:function(){return n.drawLine}}),Object.defineProperty(t,"drawDashLine",{enumerable:!0,get:function(){return n.drawDashLine}}),Object.defineProperty(t,"drawPolygon",{enumerable:!0,get:function(){return n.drawPolygon}}),Object.defineProperty(t,"drawPolyDashLine",{enumerable:!0,get:function(){return n.drawPolyDashLine}}),Object.defineProperty(t,"drawSector",{enumerable:!0,get:function(){return n.drawSector}}),Object.defineProperty(t,"drawRect",{enumerable:!0,get:function(){return n.drawRect}});var n=r(1040)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"generatePopMesh",{enumerable:!0,get:function(){return n.generatePopMesh}}),Object.defineProperty(t,"updateMaterials",{enumerable:!0,get:function(){return n.updateMaterials}}),Object.defineProperty(t,"updateTransform",{enumerable:!0,get:function(){return n.updateTransform}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return n.loadComponent}});var n=r(1084)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ContainerType2D",{enumerable:!0,get:function(){return n.ContainerType2D}});var n=r(237)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.SelectControls2D}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(2001)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1059)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pureWithCustomizedCompare",{enumerable:!0,get:function(){return n.pureWithCustomizedCompare}}),Object.defineProperty(t,"pureWithPickKeys",{enumerable:!0,get:function(){return n.pureWithPickKeys}}),Object.defineProperty(t,"pureWithOmitKeys",{enumerable:!0,get:function(){return n.pureWithOmitKeys}});var n=r(2003)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pureWithCustomizedCompare=function e(t){void 0===t&&(t={});return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!(i=this.props,A=e,a=t,s=Object.keys(i),u=Object.keys(A),s.length===u.length&&s.every((function(e){return(a[e]||o)(i[e],A[e])}))&&(0,n.default)(this.state,r));var i,A,a,s,u},r}},t.pureWithPickKeys=function e(t){return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!function(e,t,r){return r.every((function(r){return o(e[r],t[r])}))}(this.props,e,t)||!(0,n.default)(this.state,r)},r}},t.pureWithOmitKeys=function e(t){var r=t.reduce((function(e,t){return e[t]=!0,e}),{});return function(t){return t.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+t.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),t.prototype.shouldComponentUpdate=function(e,t){return!function(e,t,r){var n=Object.keys(e).filter((function(e){return!r[e]})),i=Object.keys(t).filter((function(e){return!r[e]}));return n.length===i.length&&n.every((function(r){return o(e[r],t[r])}))}(this.props,e,r)||!(0,n.default)(this.state,t)},t}};var n=r(264),i=r(186);function o(e,t){return e===t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__expectedPublicAPIs__=void 0;t.__expectedPublicAPIs__=""},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RenderSystem2D",{enumerable:!0,get:function(){return n.RenderSystem2D}}),Object.defineProperty(t,"RenderSystem3D",{enumerable:!0,get:function(){return n.RenderSystem3D}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"InferenceSystem3D",{enumerable:!0,get:function(){return i.InferenceSystem3D}}),Object.defineProperty(t,"EntityListSystem",{enumerable:!0,get:function(){return o.EntityListSystem}}),Object.defineProperty(t,"VisibleEntityListSystem",{enumerable:!0,get:function(){return A.default}});var n=r(237),i=r(418),o=r(183),A=r(205)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectionFeature",{enumerable:!0,get:function(){return n.SelectionFeature}}),Object.defineProperty(t,"HintFeature",{enumerable:!0,get:function(){return i.HintFeature}}),Object.defineProperty(t,"WithObjectEventListenersFeature",{enumerable:!0,get:function(){return o.Feature}});var n=r(415),i=r(687),o=r(1021)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DocumentEvents",{enumerable:!0,get:function(){return n.DocumentEvents}}),Object.defineProperty(t,"combine",{enumerable:!0,get:function(){return n.combine}}),Object.defineProperty(t,"Language",{enumerable:!0,get:function(){return n.Language}}),Object.defineProperty(t,"EVENT_STOPPED",{enumerable:!0,get:function(){return n.EVENT_STOPPED}}),Object.defineProperty(t,"InteractionEventType",{enumerable:!0,get:function(){return n.InteractionEventType}});var n=r(1085)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(524),o=r(2012),A=r(708),a=r(709),s=function(){function e(){}return e.prototype.setPrecision=function(e){this.precisionMap=e},e.prototype.setGlobalUnit=function(e){var t=this.getGlobalUnitInfoMap(e);t&&(this.currentGlobalUnitInfoMap=t)},e.prototype.setGlobalLengthUnit=function(e){var t=this.getGlobalLengthUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{length:t}))},e.prototype.setGlobalAreaUnit=function(e){var t=this.getGlobalAreaUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{area:t}))},e.prototype.getDisplayText=function(e,t,r,n,o){var A;if(void 0===r&&(r=!1),o){if(o.customUnitInfo){if((0,a.getQuantityTypeForUnit)(o.customUnitInfo.unitType)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customUnitInfo.unitType and quantityType do not match.");return""}A=(0,a.getUnitInstance)(o.customUnitInfo.unitType),n=o.customUnitInfo.precision}if(o.customBaseUnit){if((0,a.getQuantityTypeForUnit)(o.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customBaseUnit and quantityType do not match.");return""}var s=(0,a.getDefaultBaseUnitForQuantity)(t);if(!s)return"";e=(0,a.convertBetweenUnits)(e,o.customBaseUnit,s)}}if(!A){var u=this.getGlobalUnitInfo(t),c=void 0;if(u){if(c=u.precision,this.precisionMap){var l=this.precisionMap.tool_length_and_precision,g=this.precisionMap.tool_area_and_precision;switch(t){case"length":l&&l.unit&&i.factorMap[l.unit]===u.unit.factor&&void 0!==l.precision&&(c=l.precision);break;case"area":g&&g.unit&&i.factorMap[g.unit]===u.unit.factor&&void 0!==g.precision&&(c=g.precision)}}A=u.unit,n=void 0===n?c:n}}if(A&&n)return A.getDisplayText(e,r,n);if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): illegal input.");return""},e.prototype.getValueFromDisplayText=function(e,t,r,n){var i;if(void 0===r&&(r=!1),n&&n.customUnit){if((0,a.getQuantityTypeForUnit)(n.customUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customUnit and quantityType do not match.");return 0}i=(0,a.getUnitInstance)(n.customUnit)}if(!i){var o=this.getGlobalUnitInfo(t);o&&(i=o.unit)}if(i){var A=i.getValueFromDisplayText(e,r);if(n&&n.customBaseUnit){if((0,a.getQuantityTypeForUnit)(n.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customBaseUnit and quantityType do not match.");return 0}var s=(0,a.getDefaultBaseUnitForQuantity)(t);s&&(A=(0,a.convertBetweenUnits)(A,s,n.customBaseUnit))}return A}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): 'currentGlobalUnitInfoMap' is not defined or illegal 'quantityType'");return 0},e.prototype.getGlobalUnitInfo=function(e){if(this.currentGlobalUnitInfoMap)return this.currentGlobalUnitInfoMap[e]},e.prototype.getGlobalUnitInfoMap=function(e){var t;switch(e){case A.GlobalUnitType.mm:t=o.globalUnitInfoMaps.metricSystem.millimeter;break;case A.GlobalUnitType.m:t=o.globalUnitInfoMaps.metricSystem.meter;break;case A.GlobalUnitType.ft:t=o.globalUnitInfoMaps.imperialSystem.foot;break;default:if(String(e).match(/^1\d{2}$/)){var r=this.getGlobalLengthUnitInfo(Number(String(e)[1])),n=this.getGlobalAreaUnitInfo(Number(String(e)[2]));r&&n&&(t={length:r,area:n})}else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}return t},e.prototype.getGlobalLengthUnitInfo=function(e){var t;switch(e){case i.LengthUnitType.mm:t=o.globalLengthUnitInfoMaps.metricSystem.millimeter;break;case i.LengthUnitType.m:t=o.globalLengthUnitInfoMaps.metricSystem.meter;break;case i.LengthUnitType.ft:t=o.globalLengthUnitInfoMaps.imperialSystem.foot;break;case i.LengthUnitType.in:t=o.globalLengthUnitInfoMaps.imperialSystem.inch;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalLengthUnitInfo(): illegal globalLengthUnitType")}return t},e.prototype.getGlobalAreaUnitInfo=function(e){var t;switch(e){case i.AreaUnitType.sqMm:t=o.globalAreaUnitInfoMaps.metricSystem.millimeter;break;case i.AreaUnitType.sqM:t=o.globalAreaUnitInfoMaps.metricSystem.meter;break;case i.AreaUnitType.sqFt:t=o.globalAreaUnitInfoMaps.imperialSystem.foot;break;case i.AreaUnitType.mats:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.mats;break;case i.AreaUnitType.tsubo:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.tsubo;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalAreaUnitInfo(): illegal globalAreaUnitType")}return t},e}();t.default=s},function(e,t,r){"use strict";var n=r(206);Object.defineProperty(t,"__esModule",{value:!0}),t.tsubo=t.mats=t.squareMillimeter=t.squareMeter=t.squareFoot=t.footAndInch=t.inch=t.millimeter=t.meter=void 0;var i=n(r(2010)),o=r(525),A=n(r(2011)),a=new i.default("m",o.FACTORS.m2mm,o.regexMap.number,o.regexMap.meterText);t.meter=a;var s=new i.default("mm",o.FACTORS.mm2mm,o.regexMap.number,o.regexMap.millimeterText);t.millimeter=s;var u=new i.default("''",o.FACTORS.inch2mm,o.regexMap.number,o.regexMap.inchText);t.inch=u;var c=new A.default;t.footAndInch=c;var l=new i.default("ft²",o.FACTORS.sqft2sqmm,o.regexMap.number,o.regexMap.squareFootText);t.squareFoot=l;var g=new i.default("m²",o.FACTORS.sqm2sqmm,o.regexMap.number,o.regexMap.squareMeterText);t.squareMeter=g;var f=new i.default("mm²",o.FACTORS.sqmm2sqmm,o.regexMap.number,o.regexMap.squareMillimeterText);t.squareMillimeter=f;var h=new i.default("mats",o.FACTORS.mats2sqmm,o.regexMap.number,o.regexMap.matsText);t.mats=h;var p=new i.default("tsubo",o.FACTORS.tsubo2sqmm,o.regexMap.number,o.regexMap.tsuboText);t.tsubo=p},function(e,t,r){"use strict";var n=r(206);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(1086),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.factor=r,this.regexWithoutUnit=n,this.regexWithUnit=o}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return t?"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r)).concat(this.name):"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r))}},{key:"getValueFromDisplayText",value:function(e,t){return t?this.getValueFromFirstNumber(this.regexWithUnit,e):this.getValueFromFirstNumber(this.regexWithoutUnit,e)}},{key:"getValueFromFirstNumber",value:function(e,t){var r=(0,A.testStringAndExtractNumbers)(e,t);return void 0!==r[0]?r[0]*this.factor:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=a},function(e,t,r){"use strict";var n=r(206);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(525),a=r(1086),s=function(){function e(){(0,i.default)(this,e),this.factor=0}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return this.getFootAndInchText(e)}},{key:"getValueFromDisplayText",value:function(e,t){return this.getValueFromFootAndInchText(e)}},{key:"getFootAndInchText",value:function(e){var t=(0,a.numberPrecisionOperationAndRound)(e/A.FACTORS.inch2mm,0),r=Math.floor(t/A.FACTORS.foot2inch),n=t-r*A.FACTORS.foot2inch;return"".concat(r,"'").concat(n,"''")}},{key:"getValueFromFootAndInchText",value:function(e){var t,r;return A.regexMap.number.test(e)||A.regexMap.inchText.test(e)?(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])):A.regexMap.footAndInchText.test(e)&&(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])*A.FACTORS.foot2inch,2===t.length&&(r+=Number(t[1]))),void 0!==r?r*A.FACTORS.inch2mm:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalLengthUnitInfoMaps=t.globalAreaUnitInfoMaps=t.globalUnitInfoMaps=void 0;var n=r(524),i={metricSystem:{meter:{length:{precision:.001,unit:n.meter},area:{precision:.01,unit:n.squareMeter}},millimeter:{length:{precision:1,unit:n.millimeter},area:{precision:.01,unit:n.squareMeter}}},imperialSystem:{foot:{length:{precision:1,unit:n.footAndInch},area:{precision:1,unit:n.squareFoot}}}};t.globalUnitInfoMaps=i;var o={metricSystem:{meter:{precision:.01,unit:n.squareMeter},millimeter:{precision:.01,unit:n.squareMillimeter}},imperialSystem:{foot:{precision:.01,unit:n.squareFoot}},JapaneseUnitSystem:{mats:{precision:.01,unit:n.mats},tsubo:{precision:.01,unit:n.tsubo}}};t.globalAreaUnitInfoMaps=o;var A={metricSystem:{meter:{precision:.001,unit:n.meter},millimeter:{precision:1,unit:n.millimeter}},imperialSystem:{foot:{precision:1,unit:n.footAndInch},inch:{precision:.01,unit:n.inch}}};t.globalLengthUnitInfoMaps=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.TransactionDocument}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"flatEntitiesCreator",{enumerable:!0,get:function(){return o.flatEntitiesCreator}}),Object.defineProperty(t,"HighlightSystem2D",{enumerable:!0,get:function(){return A.HighlightSystem2D}}),Object.defineProperty(t,"HighlightSystem3D",{enumerable:!0,get:function(){return A.HighlightSystem3D}});var n=r(2014),i=r(418),o=r(2018),A=r(511)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.default}});var n=r(2015)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2016),i=r(2017),o=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=i.TransactionDocumentStatus.None,this.onDocumentChange=function(e,r,n){t.status!==i.TransactionDocumentStatus.Aborting&&t.activeTransaction.record(e,r,n),t.status===i.TransactionDocumentStatus.None&&t.onBackupRecord&&t.onBackupRecord(e,r,n)},this.updateDocument=e.updateDocument,this.onBackupRecord=e.onBackupRecord,this.maxBackupStep=e.maxBackupStep||25,this.openTransaction()}return e.prototype.setMaxBackupStep=function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)},e.prototype.openTransaction=function(){this.redoStack.length=0,this.activeTransaction=this.createTransaction()},e.prototype.commitTransaction=function(){this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-(this.maxBackupStep+1)),this.undoStack.push(this.activeTransaction),this.openTransaction()},e.prototype.abortTransaction=function(){this.status=i.TransactionDocumentStatus.Aborting,this.activeTransaction.recover(),this.status=i.TransactionDocumentStatus.None,this.activeTransaction=this.createTransaction()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Undoing,this.undoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.redoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.redo=function(){return 0!==this.redoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Redoing,this.redoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.undoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.createTransaction=function(){return new n.default(this.updateDocument)},e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function e(e){this.updateDocument=e,this.records=new Map}return e.prototype.record=function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)},e.prototype.recover=function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){e.updateDocument(r,n,t)}))}))},e.prototype.isEmpty=function(){return 0===this.records.size},e}();t.default=n},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDocumentStatus=void 0,t.TransactionDocumentStatus=n,function(e){e[e.None=0]="None",e[e.Undoing=1]="Undoing",e[e.Redoing=2]="Redoing",e[e.Aborting=3]="Aborting"}(n||(t.TransactionDocumentStatus=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatEntitiesCreator=function(e){var t=[],r=[];return function(n){var i=t,o=r;if(n!==i){for(var A=[],a=i.length,s=n.length,u=0;u<a&&u<s;u++){if(i[u]!==(f=n[u]))break;A.push(o[u])}if(u===a)for(;u<s;u++)A.push(e(n[u]));else{for(var c=new Map,l=u;l<a;l++)c.set(i[l],o[l]);for(var g=u;g<s;g++){var f=n[g],h=c.get(f);void 0===h?A.push(e(f)):A.push(h)}}return t=n,r=A,Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK&&(Object.freeze(t),Object.freeze(r)),A}return r}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"perf",{enumerable:!0,get:function(){return n.perf}});var n=r(240)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KAFApp=void 0;var n=r(4),i=r(211),o=r(143),A=r(1087),a=r(1091),s=r(240),u=r(504),c=r(137),l=r(11),g=r(91);function f(e){var t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.position="absolute",t.style.top="0",t.style.width="100%",t.style.height="100%",document.body.appendChild(t)),t}var h={fpsDetectorEnabled:!0},p=function(){function t(){this.appNodeId="kaf-app-"+t.AppCount++,this.pluginManager=new i.PluginManager,this.started=!1,this.registerPlugin(A.AppServicePlugin)}return t.prototype.registerPlugin=function(e){if(this.started)throw new Error("KAFApp.registerPlugin: cannot register plugin after App is started.");return this.pluginManager.registerPlugin(e),this},t.prototype.getPlugin=function(e){return this.pluginManager.getPlugin(e)},t.prototype.start=function(t){var r=this;if(this.started)throw new Error("KAFApp.start: App is already started.");t=(0,n.__assign)((0,n.__assign)({},h),t),this.started=!0;var i=(0,s.measurePluginLoadTiming)(this.pluginManager);this.pluginManager.loadAll(),i();var p=this.pluginManager.getPlugin(A.AppServicePlugin);this.fpsDetector=new s.FpsDetector(p.logger),this.fpsDataMerger=new s.FpsDataMerger({onMerged:function(e){return p.logger.fpsMerged(e)}}),p.stateManager.toolbox[u.setAppIdSymbol](this.appNodeId),p.stateManager.document[u.setAppIdSymbol](this.appNodeId),t.fpsDetectorEnabled?this.keepLoggingFps():this.fpsDetector.dispose(),(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)&&(window.kafProfiler=(0,a.profiler)(),window.kafDebuger=(0,a.debugManager)()),(0,o.config)({onError:p.logger.error}),p.stateManager.document.start(),p.stateManager.document.getLoadStatistics().then((function(e){(0,s.setDocumentsTiming)(e,r.appNodeId)}));var d,I,y=p.getLayout();d=y&&l.createElement(y,null),I={logger:p.logger,fpsDetector:this.fpsDetector,fpsDataMerger:this.fpsDataMerger,kafCoreState:p.stateManager,nodeId:this.appNodeId},g.render(l.createElement(c.RootStateContext.Provider,{value:{rootState:I.kafCoreState}},l.createElement(A.App,{logger:I.logger,fpsDetector:I.fpsDetector,fpsDataMerger:I.fpsDataMerger,appNodeId:I.nodeId},d)),f(I.nodeId)),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kafApp=this)},t.prototype.dispose=function(){var e,t;this.pluginManager.unloadAll(),e={nodeId:this.appNodeId},t=f(e.nodeId),g.unmountComponentAtNode(t),t.remove(),this.fpsDetector.dispose(),this.started=!1},t.prototype.getAppNodeId=function(){return this.appNodeId},t.prototype.keepLoggingFps=function(){var e=this;this.fpsDetector.on("frame",(function(t,r){r&&e.fpsDataMerger.add(t.duration)})),(0,s.initPerf)()},t.AppCount=0,t}();t.KAFApp=p}).call(this,r(86))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MountedViews=void 0;var n=r(4),i=r(137),o=r(2),A=r(11),a=r(91),s=r(522),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=document.createElement("span"),t.viewKeyMap=new WeakMap,t}return(0,n.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props.mountedViews.map((function(t,r){return A.createElement(s.ViewMountOrderContext.Provider,{key:e.getViewKey(t),value:r},A.createElement(t,null))})).reverse();return a.createPortal(t,this.placeholder)},t.prototype.componentWillUnmount=function(){this.placeholder=void 0},t.prototype.getViewKey=function(e){var t=this.viewKeyMap.get(e);return void 0===t&&(t=(0,o.uniqueId)("mounted-view-"),this.viewKeyMap.set(e,t)),t},t}(A.PureComponent);t.MountedViews=u;var c=(0,i.connect)((function(e){return{root:e}}),(function(e){return{mountedViews:e.root.__INTERNAL__mountedAppViews}}),u);t.default=c},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppServicePlugin=void 0;var n=r(4),i=r(211),o=r(1089),A=r(706),a=r(689),s=r(694),u=r(284),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootState=new A.default,t.logger=new s.Logger,t.enableConflictSessionCheck=function(e,r){t.getSessionManager().prepareSession(e,r)},t}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"stateManager",{get:function(){return this.rootState},enumerable:!0,configurable:!0}),t.prototype.onInitialize=function(){var e=this;this.rootState=new A.default,this.rootState.initState(),this.kaf2AppService=this.dependencies.get(a.AppServicePlugin),this.rootState[A.RootState_setKaf2](this.kaf2AppService.state),this.rootState.toolbox.provideToolContext(u.ToolContextInternal,(function(){return{rootState:e.rootState}})),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kaf=this)},t.prototype.onDispose=function(){this.rootState.dispose(),this.getSessionManager().stopSessionChecking(),this.layout=void 0},t.prototype.setLayout=function(e){if(this.layout)throw new Error("Layout cannot be set twice.");this.layout=e},t.prototype.getLayout=function(){return this.layout},t.prototype.addDocumentSource=function(e){this.rootState.document.addDocumentSource(e)},t.prototype.mountView=function(e){this.rootState.__INTERNAL__addMountedAppView(e)},t.prototype.getSessionManager=function(){var e=this;return this.sessionManager||(this.sessionManager=new o.default((function(t){t?e.rootState.document.autoSave.start():e.rootState.document.autoSave.stop()}))),this.sessionManager},t.prototype.registerEntityDocument=function(e){this.kaf2AppService.registerDocument(e)},t.dependencies=[a.AppServicePlugin],t}(i.BasePlugin);t.AppServicePlugin=c},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(351),i=r(4),o=r(236),A=r(1085),a=r(699),s=r(11),u=r(240),c=r(1092),l=r(1093);r(2025);var g,f={"./DebugComponent.module.scss":{"debug-root":"ui-debug-root_47b7b","debug-button":"ui-debug-button_73a33","debug-setting":"ui-debug-setting_bb0cc","debug-setting-row":"ui-debug-setting-row_94ade","debug-setting-row-title":"ui-debug-setting-row-title_6b6be","debug-setting-row-content":"ui-debug-setting-row-content_fc85a","debug-setting-item":"ui-debug-setting-item_6ac86","debug-setting-item-label":"ui-debug-setting-item-label_9289f","profile-wrapper":"ui-profile-wrapper_f26ef","profile-visible":"ui-profile-visible_b5bbc"}};g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.render=function(){return null},t}(a.default);var h=null;try{h=localStorage.getItem("__kafPerfEnabled__")}catch(e){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw e}if("1"===h||null===h&&(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)){g=function(e){function t(t){var r=e.call(this,t)||this;return r.switchProfile=function(e){var t=e.target.checked;r.setState({showProfile:t}),t||r.cleanRenderProfile()},r.switchDebug=function(e){var t=e.target.checked;r.setState({showDebug:t})},r.switchLanguage=function(e){var t=e.target.checked,r=window,n=t?A.Language.EN_US:A.Language.ZH_CN;try{r.kafDebuger.set("lang",n,!0),r.localStorage["local-language"]=n}catch(e){}window.location.reload()},r.switchAxis=function(e){var t=e.target.checked;r.setState({showAxis:t}),window.kafDebuger.set("axis3d",t)},r.onKey=function(e){e&&192==e.keyCode&&r.recordCurrentState()},r.state=r.state||{},r.state.showProfile=!1,r.state.showDebug=!0,r.state.showAxis=!1,r}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.initPixi(),document.body.addEventListener("keydown",this.onKey,!1)},t.prototype.render=function(){var e=this,t=this.state.showDebug;return s.createElement("div",{className:"ui-debug-root_47b7b",style:{display:t?"block":"none"}},this.renderDebugButton(),s.createElement("div",{ref:function(t){return e.elProfiler=t},className:(0,n.default)("profile-wrapper "+(this.state.showProfile?"profile-visible":""),f)}))},t.prototype.renderDebugButton=function(){return s.createElement("div",{className:"ui-debug-button_73a33"},s.createElement(u.Stats,null),this.renderSettingPanel())},t.prototype.renderSettingPanel=function(){var e=this.state.views,t="";try{t=window.localStorage["local-language"]}catch(e){}return s.createElement("div",{className:"ui-debug-setting_bb0cc"},s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"基本"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showProfile,onChange:this.switchProfile}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"性能(旧)")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showDebug,onChange:this.switchDebug}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"调试")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:t===A.Language.EN_US,onChange:this.switchLanguage}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"英文")),this.renderAxisSwitch())),s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"性能"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Timing,null)),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Profiling,null)))),e.map((function(e,t){return s.createElement("div",{key:e.key,className:"ui-debug-setting-row_94ade"},e.content)})))},t.prototype.renderAxisSwitch=function(){return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV?s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showAxis,onChange:this.switchAxis}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"坐标系")):null},t.prototype.renderProfile=function(){var e="",t=this.recordState||this.dumpProfile(),r=t.normalCosts,n=t.normalCounts,i=t.totalValues;e="时间统计\n\n",r.sort((function(e,t){return t.time-e.time})),r.forEach((function(t){e+=t.key+" "+t.time+" "+t.count+"\n"})),this.pxCostsText.text=e,e="计数统计\n\n",n.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxCountsText.text=e,e="全局计数\n\n",i.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxInfoText.text=e},t.prototype.cleanRenderProfile=function(){this.pxCostsText.text="",this.pxCountsText.text="",this.pxInfoText.text=""},t.prototype.dumpProfile=function(){var e,t,r,n,i=(0,l.profiler)().dump(),o=Object.values(i.costs);e=[];for(var A=0,a=o.length;A<a;++A)n=o[A],(0,c.isCrcp)(n.key)||e.push(n);var s=Object.values(i.counts).sort((function(e,t){return t.count-e.count}));t=[];for(A=0,a=s.length;A<a;++A)n=s[A],(0,c.isCrcp)(n.key)||t.push(n);var u=i.totals;return(r=Object.keys(u).map((function(e){return{key:e,count:u[e]}}))).sort((function(e,t){return t.count-e.count})),{normalCosts:e.length<50?e:e.slice(0,50),normalCounts:t.length<50?t:t.slice(0,50),totalValues:r.length<50?r:r.slice(0,50),datas:i.datas}},t.prototype.recordCurrentState=function(){this.recordState?this.recordState=void 0:(this.recordState=this.dumpProfile(),window.__pd=this.recordState.datas[this.recordState.datas.length-1])},t.prototype.initPixi=function(){var e=this;if(this.elProfiler){this.pxApp=new o.Application(3e3,1200,{backgroundColor:0});var t=this.pxApp;this.elProfiler.appendChild(t.view);var r=function(e,r){void 0===r&&(r=5);var n=new o.Text("",{fontSize:20,fill:65280,align:"left"});return n.x=e,n.y=r,t.stage.addChild(n),n};this.pxCostsText=r(500),this.pxCountsText=r(1e3),this.pxInfoText=r(1500);var n=Date.now();t.ticker.add((function(){Date.now()-n<1e3||(n=Date.now(),e.state.showProfile&&e.renderProfile())}))}},t}(a.default)}var p=g;t.default=p}).call(this,r(86))},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DisplayInfoMesh",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"DisplayInfoDrawable",{enumerable:!0,get:function(){return i.default}});var n=r(2027),i=r(2032)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(139),o=r(83),A=r(1094),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.meshBuilder=new A.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.state.loadingStatus}),(function(e){return t.setState({loadingStatus:e})}),(function(e,r){return t.onMeshCreated(e,r)}),(function(){return t.notifyWorldUpdate()})),t.componentInstances=t.meshBuilder.componentInstances,t.state={},t}return(0,n.__extends)(t,e),t.prototype.onMeshCreated=function(e,t){},t.prototype.buildMesh=function(){var e=this.meshBuilder.createMesh();return e.visible=void 0===this.props.visible||this.props.visible,e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),this.meshBuilder.updateMesh(this.mesh);var n=this.props.visible;this.mesh.visible=void 0===n||n},t.prototype.componentWillUnmount=function(){this.meshBuilder.disposeMesh(),e.prototype.componentWillUnmount.call(this)},t=(0,n.__decorate)([i.default],t)}(o.default);t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(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(2030),i=function(){function e(e){this.props=e}return e.prototype.create=function(){var e=(0,n.createMesh)(this.props);return(0,n.applyTransform)(e,this.props),e},e.prototype.update=function(e){(0,n.applyTransform)(e,this.props)},e.prototype.dispose=function(){},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMesh=u,t.applyTransform=c,t.default=void 0;var n=r(4),i=r(6),o=r(98),A=r(5),a=r(235),s=r(83);function u(e){var t=e.size,r=new i.BoxBufferGeometry(t.x,t.y,t.z),n=new i.EdgesBufferGeometry(r,1),o=new i.LineBasicMaterial({color:16722688,depthTest:!1});return new i.LineSegments(n,o)}function c(e,t){var r=t.position,n=t.pivot,i=t.scale,s=t.rotation;e.position.copy((0,a.vector3ToThree)(A.default.add(r,n||new A.default))),e.scale.copy((0,a.vector3ToThree)(i)),e.rotation.copy((0,a.eulerToThree)((new o.default).setFromVector3(s))),e.renderOrder=1}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.buildMesh=function(){var e=u(this.props);return c(e,this.props),e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),c(this.mesh,this.props)},t}(s.default);t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseQueue=void 0;var n=function(){function e(e){var t=this;this.isCanceled=!1,this.hasSuccess=!1,this.hasFailure=!1,this.promise=Promise.all(e.map((function(e){return e.then((function(){t.hasSuccess=!0}),(function(){t.hasFailure=!0}))}))).then((function(){return{hasSuccess:t.hasSuccess,hasFailure:t.hasFailure,isCanceled:t.isCanceled}}))}return e.prototype.setCanceled=function(){this.isCanceled=!0},e}();t.PromiseQueue=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(34),o=r(1094),A=r(2),a=function(){function e(e){this.props=e}return e.prototype.create=function(e){var t=this;return this.meshBuilder=new o.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.loadingStatus}),(function(e){return t.loadingStatus=e}),A.noop,e),this.meshBuilder.createMesh()},e.prototype.update=function(e){this.meshBuilder.updateMesh(e)},e.prototype.dispose=function(e){this.meshBuilder.disposeMesh()},(0,n.__decorate)([i.observable],e.prototype,"loadingStatus",void 0),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastHandledSignalCount=0,t}return(0,n.__extends)(t,e),t.prototype.componentWillMount=function(){this.lastHandledSignalCount=this.props.autoSaveSignalCount,this.props.rootState.document.autoSave.start()},t.prototype.componentWillReceiveProps=function(e){e.autoSaveSignalCount!==this.lastHandledSignalCount&&(this.props.rootState.document.saveDocument(!0),this.lastHandledSignalCount=e.autoSaveSignalCount)},t.prototype.render=function(){return null},t}(r(11).Component),A=(0,i.connect)((function(e){return{autoSave:e.document.autoSave}}),(function(e){return{autoSaveSignalCount:e.autoSave.autoSaveSignalCount}}),o);t.default=A},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1105);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2036);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2037);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.createReactContext=exports.PureComponent=exports.Component=void 0;var React=_interopRequireWildcard(__webpack_require__(11)),_async=__webpack_require__(1105),enterModule;function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(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(331);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2039);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1100);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(711);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1101);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(1102);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(710);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(1103);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(1104);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.tde=void 0;var n,i=r(331),o=r(711);(n=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(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(2041);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2042);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1106);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1107);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(2043);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Service=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(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__(712),_util=__webpack_require__(79),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(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__(712),_util=__webpack_require__(79),_ServiceFramework=__webpack_require__(1107),enterModule,EAppOrder;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(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(1108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2045);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1109);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1110);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(2046);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Monitor=void 0;var _AXR2=__webpack_require__(884),_Collector=__webpack_require__(422),_IdleWorker=__webpack_require__(1108),_PerfLog=__webpack_require__(1109),_TimeLog=__webpack_require__(1110),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function defaultSendLog(e,t){console.log(e,t)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(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";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={interceptors:!0,RequestClient:!0,parseCDN:!0,RequestClientParam:!0};Object.defineProperty(t,"RequestClient",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"parseCDN",{enumerable:!0,get:function(){return s.parseCDN}}),Object.defineProperty(t,"RequestClientParam",{enumerable:!0,get:function(){return u.RequestClientParam}}),t.interceptors=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(r,o,A):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r(31));t.interceptors=o;var A,a=(A=r(2049))&&A.__esModule?A:{default:A},s=r(1111),u=r(1112),c=r(2050);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(2052);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=i,t.default=function(e,t){if(t){var r=e[t];return void(r&&(e[t]=i(r)))}return function(t,r){var o,A,a;(0,n.isBoolean)(e)?(A=t[r],o=e):e.axios?(A=e.axios,o=e.isOss,a=e.isCoohom):A=e,A&&(t[r]=i(A,o,a))}};var n=r(2);function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.defaults.retry=!0,e.defaults.retryTimes=t?5:1,e.defaults.retryDelay=1e3,e.defaults.__retryCount=0,e.interceptors.request.use((function(e){return e.retry&&e.__retryCount&&(e.headers["x-retry"]=e.__retryCount),e})),e.interceptors.response.use(void 0,(function(t){var n=t.config;return n&&n.retry?(n.__retryCount=n.__retryCount||0,n.retryTimes=n.retryTimes||0,n.__retryCount>=n.retryTimes?Promise.reject(t):(n.__retryCount+=1,r&&n.url&&n.url.startsWith("/gateway")&&(n.url=n.url.replace("/gateway","")),new Promise((function(e){setTimeout((function(){e()}),n.retryDelay||0)})).then((function(){return e(n)})))):Promise.reject(t)})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(1)),i=o(r(678));function o(e){return e&&e.__esModule?e:{default:e}}function A(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){s=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(s)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},c=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e;return(e=t.client).request.apply(e,arguments)},this.get=function(){var e;return(e=t.client).get.apply(e,arguments)},this.delete=function(){var e;return(e=t.client).delete.apply(e,arguments)},this.post=function(){var e;return(e=t.client).post.apply(e,arguments)},this.put=function(){var e;return(e=t.client).put.apply(e,arguments)},this.encryptedRequest=function(){var e;return(e=t.encryptedClient).request.apply(e,arguments)},this.encryptedGet=function(){var e;return(e=t.encryptedClient).get.apply(e,arguments)},this.encryptedDelete=function(){var e;return(e=t.encryptedClient).delete.apply(e,arguments)},this.encryptedPost=function(){var e;return(e=t.encryptedClient).post.apply(e,arguments)},this.encryptedPut=function(){var e;return(e=t.encryptedClient).put.apply(e,arguments)},this.gzipRequest=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).request.apply(e,arguments):(r=t.encryptedClient).request.apply(r,arguments)},this.gzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).get.apply(e,arguments):(r=t.encryptedClient).get.apply(r,arguments)},this.ossGzipGet=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return u(t,void 0,void 0,n.default.mark((function e(){var t,o,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=function(){return u(this,void 0,void 0,n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.default.wasmLoaded||!(o<20)){e.next=7;break}return t=new Promise((function(e){setTimeout((function(){e()}),1e3)})),o++,e.next=5,t;case 5:return e.next=7,A();case 7:case"end":return e.stop()}}),e)})))},o=0,e.next=4,A();case 4:return e.abrupt("return",(t=this.ossGzippedEncryptClient).get.apply(t,r));case 5:case"end":return e.stop()}}),e,this)})))},this.ossDegradedGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.ossDegradedGzippedEncryptClient).get.apply(e,arguments):(r=t.ossDegradedEncryptedClient).get.apply(r,arguments)},this.pbGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).get.apply(e,arguments):(r=t.pbEncryptedClient).get.apply(r,arguments)},this.gzipDelete=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).delete.apply(e,arguments):(r=t.encryptedClient).delete.apply(r,arguments)},this.gzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).post.apply(e,arguments):(r=t.encryptedClient).post.apply(r,arguments)},this.pbGzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).post.apply(e,arguments):(r=t.pbEncryptedClient).post.apply(r,arguments)},this.gzipPut=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).put.apply(e,arguments):(r=t.encryptedClient).put.apply(r,arguments)}}var t,r,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){var t,r=A(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.request&&(this.client.interceptors.request.use(n.request.beforeSend),this.encryptedClient.interceptors.request.use(n.request.beforeSend),this.gzippedEncryptClient.interceptors.request.use(n.request.beforeSend)),n.response&&(this.client.interceptors.response.use(n.response.afterReceive),this.encryptedClient.interceptors.response.use(n.response.afterReceive),this.gzippedEncryptClient.interceptors.response.use(n.response.afterReceive))}}catch(e){r.e(e)}finally{r.f()}}}])&&s(t.prototype,r),o&&s(t,o),e}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"doTaskPolling",{enumerable:!0,get:function(){return n.doTaskPolling}});var n=r(2051)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doTaskPolling=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2?arguments[2]:void 0;return new Promise((function(n,A){var a=r;(function(e){return o(this,void 0,void 0,i.default.mark((function t(){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.taskPromise,o=e.createStatusOptions,t.abrupt("return",r.then((function(e){return o(e,{resolve:n,reject:A})})));case 2:case"end":return t.stop()}}),t)})))})(e).then((function(e){void 0!==e&&function e(t){return o(this,void 0,void 0,i.default.mark((function r(){var o,s,u,c,l,g,f;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:f=function(){setTimeout((function(){return e(t)}),l)},o=t.url,s=t.params,u=void 0===s?{}:s,c=t.interval,l=void 0===c?3e3:c,g=t.handlePolling,a(o,{params:u}).then((function(e){return g(e.data,{resolve:n,reject:A,next:f})}));case 3:case"end":return r.stop()}}),r)})))}(e)})).catch((function(e){return A(e)})),setTimeout((function(){return A("Time out")}),t)}))};var n,i=(n=r(1))&&n.__esModule?n:{default:n};var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseCode=void 0,t.ResponseCode=n,function(e){e.success="0",e.error="-1"}(n||(t.ResponseCode=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachedService=void 0;var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(47),A=r(356),a=r(2054),s=r(2055),u=r(2059),c=r(2061);function l(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=new A.ServiceConfig,this._resourceService=new s.ResourceDataService(this._config),this._paramModelGetAttachedService=new a.ParamModelGetAttachedService(this._config,this._resourceService),this._paramModelUpdateAttachedService=new c.ParamModelUpdateAttachedService(this._config,this._paramModelGetAttachedService),this._paramModelAssemblyUpdateAttachedService=new u.ParamModelAssemblyUpdateAttachedService(this._config,this._paramModelUpdateAttachedService),this._config[A.__INTERNAL__setHelper]({modelHandler:this._paramModelUpdateAttachedService.modelHandler,getAttachedsByData:this._paramModelGetAttachedService.getAttachedsByData,getRequestClient:this._config[A.__INTERNAL__getRequestClient]})}var t,r,n;return t=e,(r=[{key:"updateAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){var n,A,a,s;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.beforeAttached(),n=new Set,A=new Set,e.forEach((function(e){e instanceof o.CoreParamModel?n.add(e.getRootOrAccessory()):e instanceof o.CoreParamModelAssembly&&A.add(e)})),a=[],n.size&&a.push(this._paramModelUpdateAttachedService.updateModelAttacheds(l(n),t)),A.size&&a.push(this._paramModelAssemblyUpdateAttachedService.updateAssemblyAttacheds(l(A),t)),r.next=9,Promise.all(a);case 9:return s=r.sent,this.afterAttached(),r.abrupt("return",s);case 12:case"end":return r.stop()}}),r,this)})))}},{key:"beforeAttached",value:function(){}},{key:"afterAttached",value:function(){}},{key:"updateModelAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"updateAssemblyAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"config",get:function(){return this._config}},{key:"paramModelGetAttachedService",get:function(){return this._paramModelGetAttachedService}},{key:"paramModelUpdateAttachedService",get:function(){return this._paramModelUpdateAttachedService}}])&&f(t.prototype,r),n&&f(t,n),e}();t.AttachedService=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelGetAttachedService=void 0;var n=h(r(1)),i=h(r(592)),o=h(r(208)),A=r(1113),a=r(1001),s=r(2),u=h(r(125)),c=r(714),l=r(713),g=r(1114),f=r(356);function h(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};function E(e,t){if(e.length<=0)return[];var r=e.map((function(e){return{model:e,nodeNumber:B(e)}})).sort((function(e,t){return e.nodeNumber-t.nodeNumber}));if(r[0].nodeNumber>=t)return r.map((function(e){return[e.model]}));for(var n=[],i=[],o=0,A=0,a=r.length;A<a;A++){var s=r[A];o+s.nodeNumber<=t?(o+=s.nodeNumber,i.push(s.model)):(n.push(i),i=[s.model],o=s.nodeNumber)}return i.length>0&&n.push(i),n}function B(e){return e.children.reduce((function(e,t){return e+B(t)}),1)}function v(e){var t=[],r=[];return e.forEach((function(e){t.push.apply(t,I(e.rebuildModels)),r.push.apply(r,I(e.failedModels))})),{rebuildModels:t,failedModels:r}}var m=function(){function e(t,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.resourceService=r,this.getAttachedsByModel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.map((function(e){var t=e.serialize(void 0,!0,!0);return{id:e.getId(),data:t,matrix:e.getConcatenatedMatrix()}}));return i.getAttachedsByData(r.map((function(e){return e.data})),t).then((function(e){return Object.assign(Object.assign({},e),{requestModels:r})}))},this.getAttachedsByData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C(i,void 0,void 0,n.default.mark((function r(){var i,A,a,s,u,c,l,g,f,h,p,d,y,B=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getAttachSwitch();case 2:return i=r.sent,A=i.isNew,a=i.nodeLimit,s=new o.default,A?(c=E(e,a),u=c.map((function(e){return B.requestAttacheds({paramModelDatas:e,context:s,params:t})}))):u=e.map((function(e){return B.requestAttacheds({paramModelDatas:[e],context:s,params:t})})),r.next=8,u.reduce((function(e,t){return C(B,void 0,void 0,n.default.mark((function r(){var i,o,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return i=r.sent,r.next=5,e;case 5:return(o=r.sent).attachedModels.push(i.attachedModels),i.paramModelTasks.length>0&&(A=o.paramModelTasks).push.apply(A,I(i.paramModelTasks)),r.abrupt("return",o);case 9:case"end":return r.stop()}}),r)})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 8:return l=r.sent,g=l.attachedModels,f=l.paramModelTasks,r.next=13,this.processParamModelTasks(f,s);case 13:return h=r.sent,p=h.result,d=h.errorParamModelIds,y=d.reduce((function(t,r){var n=e.find((function(e){return e.id===r}));return n&&t.push(n),t}),[]),r.abrupt("return",Object.assign(Object.assign({},v([].concat(I(g),I(p),[{rebuildModels:[],failedModels:y}]))),{requestModels:e,context:s}));case 18:case"end":return r.stop()}}),r,this)})))},this.rawRequestAttacheds=function(e){return C(i,void 0,void 0,n.default.mark((function t(){var r,i,o,A,a,u,g,h,p,d,y,C,E=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.paramModelDatas,i=e.context,o=e.params,A=e.isRetry,a=void 0!==A&&A,t.next=3,this.config[f.__INTERNAL__getParamModelBackEndParam](r,o);case 3:if(u=t.sent,g=r.map((function(e){return Object.assign({id:e.id,paramModelData:e,retryCount:a?1:void 0,calWireFrames:!0,needCustomFaceData:!1,needResourceData:!1},u)})),t.prev=5,!l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_ENABLE){t.next=12;break}return t.next=9,this.requestAttachedV4NonPb(g);case 9:h=t.sent,t.next=15;break;case 12:return t.next=14,this.originalRequestAttacheds(g);case 14:h=t.sent;case 15:return p=(0,s.map)(h.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})),t.next=18,this.applyAttachedResource(h,i);case 18:if(d=t.sent,y=(d.errorMessages||[]).reduce((function(e,t){if(t.errCode===c.PARAM_MODEL_TOO_BIG_ERROR)return e;var n=r.find((function(e){return e.id===t.paramModelId}));return n&&e.push(n),e}),[]),a||!(y.length>0)){t.next=23;break}return C={attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:[]},paramModelTasks:[]},t.abrupt("return",Promise.all([C].concat(I(y.map((function(e){return E.retryRequestAttacheds({paramModelDatas:[e],context:i,params:o,isRetry:!0})}))))).then((function(e){return{attachedModels:v((0,s.map)(e,"attachedModels")),paramModelTasks:[]}})));case 23:return t.abrupt("return",{attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:y},paramModelTasks:p});case 26:return t.prev=26,t.t0=t.catch(5),t.abrupt("return",{attachedModels:{rebuildModels:[],failedModels:r},paramModelTasks:[]});case 29:case"end":return t.stop()}}),t,this,[[5,26]])})))},this.requestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.retryRequestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.getAttachSwitch=(0,u.default)((function(){return i.config[f.__INTERNAL__getRequestClient]().get("/dcs-model/api/attach/switch").then((function(e){return e.data}),(function(){return{nodeLimit:1,isNew:!1}}))}),Object.assign({promise:!0},c.memoizeValues))}var t,r,h;return t=e,(r=[{key:"processParamModelTasks",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i,o,A,a,u;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=function(e){return C(this,void 0,void 0,n.default.mark((function r(){var c,g,f,h,p,d=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=(0,s.chunk)(e,l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_CHUNK_SIZE),r.next=3,c.reduce((function(e,r){return C(d,void 0,void 0,n.default.mark((function i(){var A,u,c,l;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,a.requestAttachedTasksNonPb(r);case 3:return u=n.sent,n.next=6,a.applyAttachedResource(u,t);case 6:return c=n.sent,n.next=9,e;case 9:l=n.sent,(A=l.paramModelTasks).push.apply(A,I((0,s.map)(u.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})))),l.attachedModels.push({rebuildModels:(0,s.uniqBy)(c.models,"id")||[],failedModels:[]}),n.next=18;break;case 14:return n.prev=14,n.t0=n.catch(0),o.push.apply(o,I((0,s.map)(r,"paramModelId"))),n.abrupt("return",e);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),i,null,[[0,14]])})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 3:if(g=r.sent,f=g.attachedModels,h=g.paramModelTasks,i.push.apply(i,I(f)),!(A<l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_COUNT&&h.length>0)){r.next=16;break}return A++,p=new Promise((function(e){setTimeout((function(){e()}),l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_DELAY||0)})),r.next=12,p;case 12:return r.next=14,u(h);case 14:r.next=17;break;case 16:o.push.apply(o,I((0,s.map)(h,"paramModelId")));case 17:case"end":return r.stop()}}),r)})))},i=[],o=[],A=0,a=this,r.next=7,u(e);case 7:return r.abrupt("return",{result:i,errorParamModelIds:o});case 8:case"end":return r.stop()}}),r,this)})))}},{key:"originalRequestAttacheds",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodel",e);case 2:return r=t.sent,t.abrupt("return",r.data);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedV4NonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model/api/c/parammodel/v4/plain",{requestData:e},{extra:{isRequestBodyJson:!0}});case 2:return r=t.sent,i=r.data,o=A.dcs_model_attach.PBParamModelResponseDataV3.decode(i).toJSON(),(0,g.removeKeys)(o,["FULL_NAME"]),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedTasksNonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model-task/api/site/parammodel/result/plain",A.dcs_model_attach.PBParamModelTaskQueryRequests.create({requests:e}));case 2:return r=t.sent,i=A.dcs_model_attach.PBParamModelResponseDataV3.decode(r.data).toJSON(),(0,g.removeKeys)(i,["FULL_NAME"]),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"applyAttachedResource",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.resourceService.updateParamModelDataWithResource(e);case 2:return i=r.sent,t.addCustomResources(i),r.abrupt("return",i);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"createParams",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var o,A,a;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e.getRootOrAccessory(),A=o.serialize(void 0,!0,!0),a={paramModelData:A,variableParams:[t]},r.next=6,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodeldata/param/update",a).then((function(e){for(var r=e.data,n=function(e){var n=r.children.find((function(r){return r.id===t.paramModelPath[e]}));if(!n)return{v:void 0};r=n},o=1;o<t.paramModelPath.length;o++){var A=n(o);if("object"===p(A))return A.v}var a=(r.params||[]).find((function(e){var r;return e.name===(null===(r=t.paramOperates[0])||void 0===r?void 0:r.param.name)}));if(a)return new i.default(a)}));case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(0),r.abrupt("return",void 0);case 12:case"end":return r.stop()}}),r,this,[[0,9]])})))}}])&&d(t.prototype,r),h&&d(t,h),e}();t.ParamModelGetAttachedService=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceDataService=void 0;var n=A(r(1)),i=A(r(2056)),o=r(356);function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g,f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};!function(e){e.Array="Array",e.Object="Object"}(g||(g={}));var h=new i.default({maxAge:36e5,max:200}),p=function(e,t,r){var n,i=u(e.keys());try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.split("_")[0]===t)if(o.split("_")[1].split(",").includes(r.toString())&&e.get(o))return o}}catch(e){i.e(e)}finally{i.f()}return""},d=function(e,t){return function(r,i,o){return f(void 0,void 0,void 0,n.default.mark((function A(){var a,s,c,l,f,d;return n.default.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:a=o===g.Array?[]:{},c=r.sort(),l=u(c),A.prev=3,d=n.default.mark((function r(){var o,A,u,l,g;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=f.value,A=p(h,i,o),u=void 0,A?(s=A,u=h.get(s)):(s="".concat(i,"_").concat(c.toString()),u=e(c),h.set(s,u)),r.prev=4,r.next=7,u;case 7:l=r.sent,Array.isArray(a)&&t?(g=l.find((function(e){return e[t.dataItemFilterField]===o})))&&a.push(g):l[o]&&(a[o]=l[o]),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(4),h.del(s);case 14:case"end":return r.stop()}}),r,null,[[4,11]])})),l.s();case 6:if((f=l.n()).done){A.next=10;break}return A.delegateYield(d(),"t0",8);case 8:A.next=6;break;case 10:A.next=15;break;case 12:A.prev=12,A.t1=A.catch(3),l.e(A.t1);case 15:return A.prev=15,l.f(),A.finish(15);case 18:return A.abrupt("return",a);case 19:case"end":return A.stop()}}),A,null,[[3,12,15,18]])})))}},I=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSpecificProductData=function(e){return function(t){return f(r,void 0,void 0,n.default.mark((function r(){var i,A=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.length){r.next=2;break}return r.abrupt("return",[]);case 2:return r.next=4,d((function(t){return f(A,void 0,void 0,n.default.mark((function r(){var i,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 3:return i=r.sent,A=i.data,r.abrupt("return",null==A?void 0:A.d[e]);case 8:return r.prev=8,r.t0=r.catch(0),r.abrupt("return",[]);case 11:case"end":return r.stop()}}),r,this,[[0,8]])})))}),{dataItemFilterField:"brandGoodId"})(t,e,g.Array);case 4:return i=r.sent,r.abrupt("return",i);case 6:case"end":return r.stop()}}),r)})))}},this.resourceObtainList=[{targetField:"hardwares",idField:"hardwareBgIds",handler:this.getSpecificProductData("hardwares"),dataType:g.Array},{targetField:"textures",idField:"textureBgIds",handler:this.getSpecificProductData("textures"),dataType:g.Array},{targetField:"virtualModels",idField:"virtualModelBgIds",handler:this.getSpecificProductData("virtualModels"),dataType:g.Array},{targetField:"paramModelProducts",idField:"paramModelBgIds",handler:this.getSpecificProductData("paramModelProducts"),dataType:g.Array},{targetField:"moldings",idField:"moldingBgIds",handler:this.getSpecificProductData("moldings"),dataType:g.Array},{targetField:"paramPackages",idField:"obsParamPackageIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/parampackage",{obsParamPackageIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"id"}),dataType:g.Array},{targetField:"displayInfoMap",idField:"hardwareBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displayinfo",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"displayInfoMap",idField:"textureBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displaymaterial",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"fitRules",idField:"obsRuleIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/fitrule",{obsRuleIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"obsRuleId"}),dataType:g.Array}]}var t,r,i;return t=e,(r=[{key:"updateParamModelDataWithResource",value:function(e){return f(this,void 0,void 0,n.default.mark((function t(){var r,i=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.assign({},e),t.next=3,Promise.all(this.resourceObtainList.map((function(e){return f(i,void 0,void 0,n.default.mark((function t(){var i,o,A,s,u,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.targetField,o=e.idField,A=e.handler,s=e.dataType,!(u=r[o]||[]).length){t.next=7;break}return t.next=5,A(u,i,s);case 5:c=t.sent,s===g.Array?r[i]=r[i]?[].concat(a(r[i]),a(c)):c:r[i]=r[i]?Object.assign(Object.assign({},r[i]),c):c;case 7:case"end":return t.stop()}}),t)})))})));case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t,this)})))}}])&&s(t.prototype,r),i&&s(t,i),e}();t.ResourceDataService=I},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(2057),A=Symbol("max"),a=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),g=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=function(){return 1},I=function(){function e(t){if(n(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[A]=t.max||1/0;var r=t.length||d;if(this[s]="function"!=typeof r?d:r,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0,this[l]=t.dispose,this[g]=t.noDisposeOnSet||!1,this[p]=t.updateAgeOnGet||!1,this.reset()}var t,r,I;return t=e,(r=[{key:"max",get:function(){return this[A]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[A]=e||1/0,E(this)}},{key:"allowStale",get:function(){return this[u]},set:function(e){this[u]=!!e}},{key:"maxAge",get:function(){return this[c]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,E(this)}},{key:"lengthCalculator",get:function(){return this[s]},set:function(e){var t=this;"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[a]=0,this[f].forEach((function(e){e.length=t[s](e.value,e.key),t[a]+=e.length}))),E(this)}},{key:"length",get:function(){return this[a]}},{key:"itemCount",get:function(){return this[f].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var r=this[f].tail;null!==r;){var n=r.prev;m(this,e,r,t),r=n}}},{key:"forEach",value:function(e,t){t=t||this;for(var r=this[f].head;null!==r;){var n=r.next;m(this,e,r,t),r=n}}},{key:"keys",value:function(){return this[f].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[f].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[l]&&this[f]&&this[f].length&&this[f].forEach((function(t){return e[l](t.key,t.value)})),this[h]=new Map,this[f]=new o,this[a]=0}},{key:"dump",value:function(){var e=this;return this[f].map((function(t){return!C(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[f]}},{key:"set",value:function(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");var n=r?Date.now():0,i=this[s](t,e);if(this[h].has(e)){if(i>this[A])return B(this,this[h].get(e)),!1;var o=this[h].get(e).value;return this[l]&&(this[g]||this[l](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[a]+=i-o.length,o.length=i,this.get(e),E(this),!0}var u=new v(e,t,i,n,r);return u.length>this[A]?(this[l]&&this[l](e,t),!1):(this[a]+=u.length,this[f].unshift(u),this[h].set(e,this[f].head),E(this),!0)}},{key:"has",value:function(e){if(!this[h].has(e))return!1;var t=this[h].get(e).value;return!C(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[f].tail;return e?(B(this,e),e.value):null}},{key:"del",value:function(e){B(this,this[h].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{var o=i-t;o>0&&this.set(n.k,n.v,o)}}}},{key:"prune",value:function(){var e=this;this[h].forEach((function(t,r){return y(e,r,!1)}))}}])&&i(t.prototype,r),I&&i(t,I),e}(),y=function(e,t,r){var n=e[h].get(t);if(n){var i=n.value;if(C(e,i)){if(B(e,n),!e[u])return}else r&&(e[p]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return i.value}},C=function(e,t){if(!t||!t.maxAge&&!e[c])return!1;var r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},E=function(e){if(e[a]>e[A])for(var t=e[f].tail;e[a]>e[A]&&null!==t;){var r=t.prev;B(e,t),t=r}},B=function(e,t){if(t){var r=t.value;e[l]&&e[l](r.key,r.value),e[a]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}},v=function e(t,r,i,o,A){n(this,e),this.key=t,this.value=r,this.length=i,this.now=o,this.maxAge=A||0},m=function(e,t,r,n){var i=r.value;C(e,i)&&(B(e,r),e[u]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=I},function(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function A(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)A(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,n=this.head;null!==n&&r<e;r++)n=n.next;var o=[];for(r=0;n&&r<t;r++)o.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(r=0;r<(arguments.length<=2?0:arguments.length-2);r++)n=i(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(2058)(n)}catch(e){}},function(e,t,r){"use strict";r.r(t),function(e){var t=r(1),n=r.n(t);e.exports=function(e){e.prototype[Symbol.iterator]=n.a.mark((function e(){var t;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}}.call(this,r(887)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyUpdateAttachedService=void 0;var n,i=(n=r(208))&&n.__esModule?n:{default:n},o=r(243),A=r(2),a=r(356),s=r(2060);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.paramModelService=r}var t,r,n;return t=e,(r=[{key:"updateAssemblyAttacheds",value:function(e,t){var r=this,n=Object.assign(Object.assign({},this.config[a.__INTERNAL__getDefaultParams]()),t),i=this.config[a.__INTERNAL__chunkParamAssemblyModels](e,n).map((function(e){return r.updateAssemblyAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(i)}},{key:"updateAssemblyAttachedsInternal",value:function(e,t){var r=[],n=[];e.forEach((function(e){e.isTemplateAssembly()?r.push(e):n.push(e)}));var i=[];return n.length>0&&i.push(this.updateInstanceAttacheds(n,t)),r.length>0&&i.push(this.updateTemplateAttacheds(r,t)),Promise.all(i)}},{key:"updateInstanceAttacheds",value:function(e,t){var r=(0,A.flatMap)(e,(function(e){return e.getParamModels()}));return this.paramModelService.updateModelAttacheds(r,t)}},{key:"updateTemplateAttacheds",value:function(e,t){var r=this,n=t.excludeAccessories,i=e.map((function(e){return r.updateTemplateAttached(e,t)}));if(!n){var a=(0,A.flatMap)(e,(function(e){return o.ParamModelUtils.collectAccessories(e.getParamModels())}));a.length>0&&i.push(this.paramModelService.updateModelAttacheds(a,t))}return Promise.all(i)}},{key:"updateTemplateAttached",value:function(e,t){var r=t.applyTransform,n=e.serialize(void 0,!1,{includeAccessory:!1,isRootWorldMatrix:!0});return(0,s.getTemplateAttachedByData)(n,t,this.config).then((function(t){var n=new i.default;n.addCustomResources(t);var o=e.getPosition().clone(),A=e.getRotation().clone(),a=t.assemblyDatas[0];if(a)e.parse(a,n,{isRootWorldMatrix:!0});else{e.applyResource(n,!0);var s,c=e.getMatrix4(),l=u(e.getParamModels());try{for(l.s();!(s=l.n()).done;){var g=s.value;g.setMatrix4(c.clone().multiply(g.getMatrix4()))}}catch(e){l.e(e)}finally{l.f()}}("function"==typeof r?r(e.getId()):r)||e.updateTransform(o,A),e.setHasAttached(!0),e.getParamModels().forEach((function(e){return e.setHasAttached(!0)}))}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyUpdateAttachedService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateAttachedByData=function(e,t,r){return A(this,void 0,void 0,i.default.mark((function n(){var A,a,s;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r[o.__INTERNAL__getParamModelAssemblyBackEndParam]([e],t);case 2:return A=n.sent,a=[Object.assign({id:e.id,assemblyData:e,calWireFrames:!0},A)],n.next=6,r[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/assemblymodel",a);case 6:return s=n.sent,n.abrupt("return",s.data);case 8:case"end":return n.stop()}}),n)})))};var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(356);var A=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelUpdateAttachedService=void 0;var n=r(243),i=r(356),o=r(2062);function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAttached=r,this.modelHandler=function(e,t){var r=t.applyTransform;return n.getAttached.getAttachedsByModel(e,t).then((function(t){return n.applyAttached(e,t,r)}))},this.applyAttached=function(e,t,r){var n=t.rebuildModels,i=t.failedModels,A=t.context,a=t.requestModels;e.forEach((function(e){if(e.setHasAttached(!0),i.find((function(t){return t.id===e.id})))e.setLegal(!1);else{var t=e.getMatrix4(),s=e.getPosition().clone(),u=e.getRotation().clone(),c=n.find((function(t){return t.id===e.id}));c?e.parse(c,A):e.applyResource(A,!0);var l=a?a.find((function(t){return t.id===e.id})).matrix:void 0,g=e.getMatrix4();(0,o.handleTransform)(e,{applyTransform:r,position:s,rotation:u,matrix:t,requestMatrix:l,responseMatrix:g})}}))}}var t,r,a;return t=e,(r=[{key:"updateModelAttacheds",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},this.config[i.__INTERNAL__getDefaultParams]()),r),o=this.config[i.__INTERNAL__chunkParamModels](e,n),A=o.map((function(e){return t.updateAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(A)}},{key:"updateAttachedsInternal",value:function(e,t){return t.excludeAccessories||(e=n.ParamModelUtils.flattenModels(e)),this.modelHandlerWrapper(e,t)}},{key:"modelHandlerWrapper",value:function(e,t){var r=this,n=new Map,o=this.config[i.__INTERNAL__getParamModelHandlers]();e.forEach((function(e){var t=o.find((function(t){return t.filter(e)})),i=t?t.attachHandler:r.modelHandler,A=n.get(i);void 0===A&&(A=[],n.set(i,A)),A.push(e)}));var A=[];return n.forEach((function(e,r){return A.push(r(e,t))})),Promise.all(A)}}])&&A(t.prototype,r),a&&A(t,a),e}();t.ParamModelUpdateAttachedService=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleTransform=function(e,t){var r=t.applyTransform,o=t.position,A=t.rotation,a=t.matrix,s=t.requestMatrix,u=t.responseMatrix;if("function"==typeof r?r(e.getId()):r){if(!a||!s||!u)return;if(!n.default.equals(s,a)){var c=(new i.default).getInverse(s).premultiply(a);e.setMatrix4(u.clone().premultiply(c))}}else{if(!o||!A)return;e.setPosition(o),e.setRotation(A)}};var n=o(r(114)),i=o(r(44));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2064);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2069);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelDataService=void 0;var n=p(r(1)),i=r(47),o=r(10),A=r(1113),a=p(r(5)),s=p(r(125)),u=r(2065),c=r(1115),l=r(714),g=r(713),f=r(1114),h=r(108);function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},y=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.noCacheGetParamModelDataByBrandGoodId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return I(r,void 0,void 0,n.default.mark((function r(){var i,o,a,s;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!g.COMMON_ENV.PARAM_MODEL_DATA_PB_ENABLE){r.next=18;break}return i=u.util.toJSONOptions.defaults||!0,u.util.toJSONOptions.defaults=!0,r.prev=3,r.next=6,this.config.requestClient.pbGzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"/v2?cache=").concat(t));case 6:return o=r.sent,a=A.dcs_model.PBParamModelViewData.decode(o.data).toJSON(),(0,f.removeKeys)(a,["FULL_NAME"]),r.abrupt("return",a);case 12:return r.prev=12,r.t0=r.catch(3),r.abrupt("return",Promise.reject(r.t0));case 15:return r.prev=15,u.util.toJSONOptions.defaults=i,r.finish(15);case 18:return r.next=20,this.config.requestClient.gzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"?cache=").concat(t));case 20:return s=r.sent,r.abrupt("return",s.data);case 22:case"end":return r.stop()}}),r,this,[[3,12,15,18]])})))},this.getParamModelDataByBrandGoodId=(0,s.default)((function(e){return r.noCacheGetParamModelDataByBrandGoodId(e,!0)}),Object.assign({promise:!0},l.memoizeValues))}var t,r,p;return t=e,(r=[{key:"getParamModelByProduct",value:function(e){return I(this,void 0,void 0,n.default.mark((function t(){var r,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getParamModelDataByBrandGoodId(e.brandGoodId);case 2:return r=t.sent,o=(new this.config.paramModelConstructor).parse(r.paramModelData,(new i.CoreCustomContext).addProduct(e)),(0,h.attach)(o,(0,h.toAttachedMap)(r)),o.setSize(this.calcSizeByProduct(o,e)),o.assignUniqueId(),(0,c.updatePositionByOffGround)(o,0),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"calcSizeByProduct",value:function(e,t){var r=t.size;return new a.default(r&&r.x||e.getParsedValue(o.ParamName.WIDTH),r&&r.y||e.getParsedValue(o.ParamName.DEPTH),r&&r.z||e.getParsedValue(o.ParamName.HEIGHT))}}])&&d(t.prototype,r),p&&d(t,p),e}();t.ParamModelDataService=y},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeInferBoundingBox=u,t.computeInferBoxHeight=function(e){var t=u(e).boundingBox;return Math.abs(t.max.z-t.min.z)};var n=s(r(396)),i=s(r(141)),o=s(r(98)),A=s(r(44)),a=s(r(5));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.getPosition().clone(),r=e.getRotation().clone(),s=e.getBox3(),u=n.default.reorderToBackend(r).z,c=(new A.default).compose(t.clone().negate(),(new o.default).setFromVector3(new a.default(0,0,-u))),l=s.getPoints().map((function(e){return e.clone().applyMatrix4(c)}));return{boundingBox:(new i.default).setFromPoints(l),position:t,rotationZ:u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isModelTop=function(e){return!(e instanceof n.CoreParamModel)||e.isRoot()&&!e.getAssembly()};var n=r(47)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTransform=function(e,t){var r=t.position,n=t.rotation,a=t.scale;if(e instanceof i.CoreParamModel)r&&e.setPosition(r),n&&e.setRotation(n),a&&e.setScale(a);else{var s=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getPosition(),"x","y","z")),r)),u=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getRotation(),"x","y","z")),n)),c=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getScale(),"x","y","z")),a));e.updateTransform(s,u,c)}};var n,i=r(47),o=(n=r(5))&&n.__esModule?n:{default:n},A=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyDataService=void 0;var n,i=r(47),o=r(850),A=r(465),a=(n=r(125))&&n.__esModule?n:{default:n},s=r(1115),u=r(714),c=r(108);function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAssemblyDataByBrandGoodId=(0,a.default)((function(e,t){return r.config.requestClient.gzipGet("/dcs-model/api/c/assemblydata",{params:{bgid:e,assemblycollectiondataid:t}}).then((function(e){return e.data}))}),Object.assign({promise:!0},u.memoizeValues))}var t,r,n;return t=e,(r=[{key:"getAssemblyByProduct",value:function(e,t){return this.getAssemblyDataByBrandGoodId(t.brandGoodId,t.assemblyCollectionDataId).then((function(r){var n,a=r.assemblyData;(0,A.isAssemblyCollectionProduct)(t)?(a.collectBrandGoodId||(a=Object.assign(Object.assign({},a),{collectBrandGoodId:t.brandGoodId})),n=t.assembly):n=!0;var u=(0,o.parseAssembly)(a,new i.CoreCustomContext,n,e.paramModelAssemblyConstructor);return(0,c.attach)(u,(0,c.toAttachedMap)(r)),(0,s.updatePositionByOffGround)(u,0),u.assignUniqueId()}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyDataService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={response:{afterReceive:function(e){if(e.headers&&e.headers.hasOwnProperty("x-qunhe-bizcode")){var t={errorCodeData:e.data,response:e};return Promise.reject(t)}return e}}};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.point=e,this.offset=t};t.default=n},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.lengths=e,this.intersections=[]}return e.prototype.addIntersection=function(e){this.intersections.push(e)},e.prototype.getPoints=function(){return this.intersections.map((function(e){return e.point}))},e.prototype.getPointsInside=function(e){var t,r,i=[];try{for(var o=n(this.intersections),A=o.next();!A.done;A=o.next()){var a=A.value;a.offset.x>-e&&a.offset.x<this.lengths.x+e&&a.offset.y>-e&&a.offset.y<this.lengths.y+e&&i.push(a.point)}}catch(e){t={error:e}}finally{try{A&&!A.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i},e}();t.default=i},function(e,t,r){},function(e,t,r){"use strict";r.r(t),r.d(t,"FittingDesignService",(function(){return Ev})),r.d(t,"IntersectedService",(function(){return $v})),r.d(t,"CustomModelService",(function(){return um})),r.d(t,"FittingHintService",(function(){return Im})),r.d(t,"FittingModelService",(function(){return Dm})),r.d(t,"ECameraMode",(function(){return Sm})),r.d(t,"ECameraMoveDirection",(function(){return wm})),r.d(t,"ModelCameraService",(function(){return Om})),r.d(t,"ModelHintService",(function(){return Hm})),r.d(t,"ModelService",(function(){return oQ})),r.d(t,"ESelectedType",(function(){return fQ})),r.d(t,"ESetSelectType",(function(){return hQ})),r.d(t,"ModelViewerSelectionService",(function(){return IQ})),r.d(t,"ModelViewerSelectionV2Service",(function(){return SQ})),r.d(t,"ModelViewerService",(function(){return OQ})),r.d(t,"PlankPathService",(function(){return ob})),r.d(t,"ModelValidateService",(function(){return hb})),r.d(t,"SceneService",(function(){return vb})),r.d(t,"Application",(function(){return I_})),r.d(t,"EIntersectedCreatedType",(function(){return g})),r.d(t,"EIntersectedType",(function(){return l})),r.d(t,"EFittingType",(function(){return c})),r.d(t,"ELanguage",(function(){return de})),r.d(t,"FITTING_PARAM_GEOMETRY_COLOR_KEY",(function(){return Be})),r.d(t,"FITTING_PARAM_GEOMETRY_OPACITY_KEY",(function(){return ve})),r.d(t,"CUSTOM_MODEL_CATEGORY_FILTER",(function(){return me})),r.d(t,"EPointType",(function(){return _})),r.d(t,"ELineType",(function(){return S})),r.d(t,"EDesignMode",(function(){return ye})),r.d(t,"ETriggerType",(function(){return Ce})),r.d(t,"EModelType",(function(){return Ee})),r.d(t,"KEYBOARD_KEY",(function(){return _e})),r.d(t,"EIntersectModelType",(function(){return d})),r.d(t,"EProductDirection",(function(){return I})),r.d(t,"EPlankPathType",(function(){return Qe})),r.d(t,"EElementType",(function(){return be})),r.d(t,"EToolType",(function(){return lg}));r(730),r(1338);var n,i,o,A,a=r(1),s=r.n(a),u=r(3);!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL",e.ORDER_AUDIT="ORDER_AUDIT"}(n||(n={})),function(e){e.TRUE="true",e.FALSE="false"}(i||(i={})),function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(o||(o={})),function(e){e.Intersect="intersect",e.Validity="validity",e.Rule="rule"}(A||(A={}));var c,l,g,f,h,p,d,I,y,C,E,B,v,m,Q,b,_,S,w,D,R,M="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),x=new Array(36);function P(e,t,r){return void 0===r&&(r="-"),[t,e].map((function(e){return e.replace(new RegExp("^"+r+"+|"+r+"+$","g"),"")})).filter((function(e){return!!e.trim()})).join(r)}!function(e){e[e.GROOVE=1]="GROOVE",e[e.HOLE=2]="HOLE",e[e.HARDWARE=3]="HARDWARE",e[e.HARDWARE_GROOVE=4]="HARDWARE_GROOVE",e.INTERSECTED="intersected"}(c||(c={})),function(e){e.SHELL="1",e.FACE="2"}(l||(l={})),function(e){e[e.BOTH_PLANK=0]="BOTH_PLANK",e[e.PLANK_FURNITURE=1]="PLANK_FURNITURE"}(g||(g={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.LOCK=1]="LOCK",e[e.UNLOCK=2]="UNLOCK",e[e.RAW=3]="RAW"}(f||(f={})),function(e){e.Space="spaceDivision"}(h||(h={})),function(e){e[e.CAD=7]="CAD",e[e.JPG=2]="JPG",e[e.PDF=3]="PDF"}(p||(p={})),function(e){e[e.PLANK=0]="PLANK",e[e.HARDWARE=1]="HARDWARE",e[e.PRODUCT=2]="PRODUCT"}(d||(d={})),function(e){e[e.XY=0]="XY",e[e.YZ=1]="YZ",e[e.XZ=2]="XZ"}(I||(I={})),function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=6]="TEMPLATE_ASSEMBLY"}(y||(y={})),function(e){e.MINIAPP_APPEND="$$miniappAppend"}(C||(C={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE",e[e.BZ_STORE=2]="BZ_STORE"}(E||(E={})),function(e){e.NAME="name",e.REMARK="remark",e.POSITION="position",e.ROTATION="rotation",e.TOOL_TYPE="toolType"}(B||(B={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(v||(v={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(m||(m={})),function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(Q||(Q={})),function(e){e.number="number",e.string="string",e.boolean="boolean"}(b||(b={})),function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE",e[e.ELLIPSE=4]="ELLIPSE"}(_||(_={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(S||(S={})),function(e){e.Wardrobe="Wardrobe",e.WardrobeCopy="WardrobeCopy",e.Cabinet="Cabinet",e.CabinetCopy="CabinetCopy",e.DoorWindow="DoorWindow",e.DoorWindowCopy="DoorWindowCopy",e.CustomGroup="CustomGroup"}(w||(w={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(D||(D={})),function(e){e.Design="Design",e.Audit="Audit",e.Production="Production"}(R||(R={}));var F,L,O,k,N=[[D.Cabinet,0],[D.Wardrobe,1],[D.DoorWindow,2],[D.CabinetCopy,4],[D.WardrobeCopy,5],[D.DoorWindowCopy,6]],G=[[R.Design,0],[R.Audit,1],[R.Production,2]],U=new Map(N),j=(new Map(G),new Map(N.map((function(e){return e.reverse()}))),new Map(G.map((function(e){return e.reverse()}))),[[D.Cabinet,w.Cabinet],[D.Wardrobe,w.Wardrobe],[D.DoorWindow,w.DoorWindow],[D.CabinetCopy,w.CabinetCopy],[D.WardrobeCopy,w.WardrobeCopy],[D.DoorWindowCopy,w.DoorWindowCopy]]),V=new Map(j);new Map(j.map((function(e){return e.reverse()})));!function(e){e.waiting="waiting",e.assigned="assigned",e.running="running",e.finished="finished",e.abnormal="abnormal",e.failed="failed"}(F||(F={})),function(e){e.BODY="BODY",e.BACK="BACK",e.DOOR="DOOR"}(L||(L={})),function(e){e.LineSeg="LineSeg",e.Arc="Arc"}(O||(O={})),function(e){e.PLANK="PLANK",e.FITTING="FITTING",e.AUXILIARY="AUXILIARY"}(k||(k={}));
|
|
66
|
+
*/A=function(){return function e(t,r,n){function i(A,a){if(!r[A]){if(!t[A]){if(o)return o(A,!0);var s=new Error("Cannot find module '"+A+"'");throw s.code="MODULE_NOT_FOUND",s}var u=r[A]={exports:{}};t[A][0].call(u.exports,(function(e){var r=t[A][1][e];return i(r||e)}),u,u.exports,e,t,r,n)}return r[A].exports}for(var o=!1,A=0;A<n.length;A++)i(n[A]);return i}({1:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,A=new i(c),a=e.document.createTextNode("");A.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var s=new e.MessageChannel;s.port1.onmessage=c,r=function(){s.port2.postMessage(0)}}var u=[];function c(){var e,t;n=!0;for(var r=u.length;r;){for(t=u,u=[],e=-1;++e<r;)t[e]();r=u.length}n=!1}t.exports=function(e){1!==u.push(e)||n||r()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var n=e(1);function i(){}var o={},A=["REJECTED"],s=["FULFILLED"],u=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function g(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return o.reject(e,t)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function f(e){var t=e&&e.then;if(e&&("object"===a(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var A=p((function(){t(i,n)}));"error"===A.status&&n(A.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===A)return this;var r=new this.constructor(i);return this.state!==u?g(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){g(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){o.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){g(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=s,e.outcome=t;for(var i=-1,A=e.queue.length;++i<A;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=A,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A=new Array(r),a=0,s=-1,u=new this(i);++s<r;)c(e[s],s);return u;function c(e,i){t.resolve(e).then((function(e){A[i]=e,++a!==r||n||(n=!0,o.resolve(u,A))}),(function(e){n||(n=!0,o.reject(u,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A,a=-1,s=new this(i);++a<r;)A=e[a],t.resolve(A).then((function(e){n||(n=!0,o.resolve(s,e))}),(function(e){n||(n=!0,o.reject(s,e))}));return s}},{1:1}],3:[function(e,t,n){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},i=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var A=Promise;function s(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function l(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var g=void 0,f={},h=Object.prototype.toString;function p(e){return"boolean"==typeof g?A.resolve(g):function(e){return new A((function(t){var r=e.transaction("local-forage-detect-blob-support","readwrite"),n=o([""]);r.objectStore("local-forage-detect-blob-support").put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return g=e}))}function d(e){var t=f[e.name],r={};r.promise=new A((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function I(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function y(e,t){var r=f[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function C(e,t){return new A((function(r,n){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);d(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var A=i.open.apply(i,o);t&&(A.onupgradeneeded=function(t){var r=A.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore("local-forage-detect-blob-support")}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),A.onerror=function(e){e.preventDefault(),n(A.error)},A.onsuccess=function(){r(A.result),I(e)}}))}function E(e){return C(e,!1)}function B(e){return C(e,!0)}function v(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,i=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||r){if(r){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function m(e){return o([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}(atob(e.data))],{type:e.type})}function Q(e){return e&&e.__local_forage_encoded_blob}function b(e){var t=this,r=t._initReady().then((function(){var e=f[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(r,e,e),r}function _(e,t,r,n){void 0===n&&(n=1);try{var i=e.db.transaction(e.storeName,t);r(null,i)}catch(i){if(n>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return A.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),B(e)})).then((function(){return function(e){d(e);for(var t=f[e.name],r=t.forages,n=0;n<r.length;n++){var i=r[n];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,E(e).then((function(t){return e.db=t,v(e)?B(e):t})).then((function(n){e.db=t.db=n;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=n})).catch((function(t){throw y(e,t),t}))}(e).then((function(){_(e,t,r,n-1)}))})).catch(r);r(i)}}var S={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var i=f[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},f[r.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=b);var o=[];function a(){return A.resolve()}for(var s=0;s<i.forages.length;s++){var u=i.forages[s];u!==t&&o.push(u._initReady().catch(a))}var c=i.forages.slice(0);return A.all(o).then((function(){return r.db=i.db,E(r)})).then((function(e){return r.db=e,v(r,t._defaultConfig.version)?B(r):e})).then((function(e){r.db=i.db=e,t._dbInfo=r;for(var n=0;n<c.length;n++){var o=c[n];o!==t&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))},_support:function(){try{if(!i||!i.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).openCursor(),a=1;A.onsuccess=function(){var r=A.result;if(r){var n=r.value;Q(n)&&(n=m(n));var i=e(n,r.key,a++);void 0!==i?t(i):r.continue()}else t()},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).get(e);A.onsuccess=function(){var e=A.result;void 0===e&&(e=null),Q(e)&&(e=m(e)),t(e)},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=new A((function(r,i){var o;n.ready().then((function(){return o=n._dbInfo,"[object Blob]"===h.call(t)?p(o.db).then((function(e){return e?t:(r=t,new A((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:r.type})},n.readAsBinaryString(r)})));var r})):t})).then((function(t){_(n._dbInfo,"readwrite",(function(o,A){if(o)return i(o);try{var a=A.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var s=a.put(t,e);A.oncomplete=function(){void 0===t&&(t=null),r(t)},A.onabort=A.onerror=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readwrite",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){n(A.error)},o.onabort=function(){var e=A.error?A.error:A.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readwrite",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){e<0?t(null):r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName),a=!1,s=A.openKeyCursor();s.onsuccess=function(){var r=s.result;r?0===e||a?t(r.key):(a=!0,r.advance(e)):t(null)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),A=[];o.onsuccess=function(){var t=o.result;t?(A.push(t.key),t.continue()):e(A)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,o=this;if(e.name){var a=e.name===r.name&&o._dbInfo.db,u=a?A.resolve(o._dbInfo.db):E(e).then((function(t){var r=f[e.name],n=r.forages;r.db=t;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=t;return t}));n=e.storeName?u.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;d(e);var n=f[e.name],o=n.forages;t.close();for(var a=0;a<o.length;a++){var s=o[a];s._dbInfo.db=null,s._dbInfo.version=r}return new A((function(t,n){var o=i.open(e.name,r);o.onerror=function(e){o.result.close(),n(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<o.length;t++){var r=o[t];r._dbInfo.db=e,I(r._dbInfo)}})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}})):u.then((function(t){d(e);var r=f[e.name],n=r.forages;t.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new A((function(t,r){var n=i.deleteDatabase(e.name);n.onerror=n.onblocked=function(e){var t=n.result;t&&t.close(),r(e)},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}})).then((function(e){r.db=e;for(var t=0;t<n.length;t++)I(n[t]._dbInfo)})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}))}else n=A.reject("Invalid arguments");return s(n,t),n}},w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=/^~~local_forage_type~([^~]+)~/,R="__lfsc__:".length,M=R+"arbf".length,x=Object.prototype.toString;function P(e){var t,r,n,i,o,A=.75*e.length,a=e.length,s=0;"="===e[e.length-1]&&(A--,"="===e[e.length-2]&&A--);var u=new ArrayBuffer(A),c=new Uint8Array(u);for(t=0;t<a;t+=4)r=w.indexOf(e[t]),n=w.indexOf(e[t+1]),i=w.indexOf(e[t+2]),o=w.indexOf(e[t+3]),c[s++]=r<<2|n>>4,c[s++]=(15&n)<<4|i>>2,c[s++]=(3&i)<<6|63&o;return u}function T(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=w[r[t]>>2],n+=w[(3&r[t])<<4|r[t+1]>>4],n+=w[(15&r[t+1])<<2|r[t+2]>>6],n+=w[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var F={serialize:function(e,t){var r="";if(e&&(r=x.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===x.call(e.buffer))){var n,i="__lfsc__:";e instanceof ArrayBuffer?(n=e,i+="arbf"):(n=e.buffer,"[object Int8Array]"===r?i+="si08":"[object Uint8Array]"===r?i+="ui08":"[object Uint8ClampedArray]"===r?i+="uic8":"[object Int16Array]"===r?i+="si16":"[object Uint16Array]"===r?i+="ur16":"[object Int32Array]"===r?i+="si32":"[object Uint32Array]"===r?i+="ui32":"[object Float32Array]"===r?i+="fl32":"[object Float64Array]"===r?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+T(n))}else if("[object Blob]"===r){var o=new FileReader;o.onload=function(){var r="~~local_forage_type~"+e.type+"~"+T(this.result);t("__lfsc__:blob"+r)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,R))return JSON.parse(e);var t,r=e.substring(M),n=e.substring(R,M);if("blob"===n&&D.test(r)){var i=r.match(D);t=i[1],r=r.substring(i[0].length)}var A=P(r);switch(n){case"arbf":return A;case"blob":return o([A],{type:t});case"si08":return new Int8Array(A);case"ui08":return new Uint8Array(A);case"uic8":return new Uint8ClampedArray(A);case"si16":return new Int16Array(A);case"ur16":return new Uint16Array(A);case"si32":return new Int32Array(A);case"ui32":return new Uint32Array(A);case"fl32":return new Float32Array(A);case"fl64":return new Float64Array(A);default:throw new Error("Unkown type: "+n)}},stringToBuffer:P,bufferToString:T};function L(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function O(e,t,r,n,i,o){e.executeSql(r,n,i,(function(e,A){A.code===A.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,A):L(e,t,(function(){e.executeSql(r,n,i,o)}),o)}),o):o(e,A)}),o)}function k(e,t,r,n){var i=this;e=c(e);var o=new A((function(o,A){i.ready().then((function(){void 0===t&&(t=null);var a=t,s=i._dbInfo;s.serializer.serialize(t,(function(t,u){u?A(u):s.db.transaction((function(r){O(r,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){A(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void o(k.apply(i,[e,a,r,n-1]));A(t)}}))}))})).catch(A)}));return s(o,r),o}function N(e){return new A((function(t,r){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}var G={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var i=new A((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(i){L(i,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=F,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"SELECT * FROM "+i.storeName,[],(function(r,n){for(var o=n.rows,A=o.length,a=0;a<A;a++){var s=o.item(a),u=s.value;if(u&&(u=i.serializer.deserialize(u)),void 0!==(u=e(u,s.key,a+1)))return void t(u)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=i.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){return k.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){O(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){O(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,r){var n=r.rows.item(0).c;e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){O(r,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var n=r.rows.length?r.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){O(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],i=0;i<r.rows.length;i++)n.push(r.rows.item(i).key);e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,i=this;return s(n=e.name?new A((function(t){var n;n=e.name===r.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(N(n))})).then((function(e){return new A((function(t,r){e.db.transaction((function(n){function i(e){return new A((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var o=[],a=0,s=e.storeNames.length;a<s;a++)o.push(i(e.storeNames[a]));A.all(o).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):A.reject("Invalid arguments"),t),n}};function U(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function j(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var V={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=U(e,this._defaultConfig),j()?(this._dbInfo=t,t.serializer=F,A.resolve()):A.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,i=n.length,o=localStorage.length,A=1,a=0;a<o;a++){var s=localStorage.key(a);if(0===s.indexOf(n)){var u=localStorage.getItem(s);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,s.substring(i),A++)))return u}}}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new A((function(i,o){var A=n._dbInfo;A.serializer.serialize(t,(function(t,n){if(n)o(n);else try{localStorage.setItem(A.keyPrefix+e,t),i(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return s(n,t),n},clear:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],i=0;i<r;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&n.push(o.substring(e.keyPrefix.length))}return n}));return s(r,e),r},dropInstance:function(e,t){if(t=l.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var n,i=this;return s(n=e.name?new A((function(t){e.storeName?t(U(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):A.reject("Invalid arguments"),t),n}},Y=function(e,t){for(var r,n,i=e.length,o=0;o<i;){if((r=e[o])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;o++}return!1},H=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},K={},q={},J={INDEXEDDB:S,WEBSQL:G,LOCALSTORAGE:V},W=[J.INDEXEDDB._driver,J.WEBSQL._driver,J.LOCALSTORAGE._driver],z=["dropInstance"],X=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(z),Z={description:"",driver:W.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function $(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function ee(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(H(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var te=new(function(){function e(t){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J)if(J.hasOwnProperty(r)){var n=J[r],i=n._driver;this[r]=i,K[i]||this.defineDriver(n)}this._defaultConfig=ee({},Z),this._config=ee({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new A((function(t,r){try{var n=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(i);for(var o=X.concat("_initStorage"),a=0,u=o.length;a<u;a++){var c=o[a];if((!Y(z,c)||e[c])&&"function"!=typeof e[c])return void r(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=A.reject(t);return s(r,arguments[arguments.length-1]),r}},r=0,n=z.length;r<n;r++){var i=z[r];e[i]||(e[i]=t(i))}}();var l=function(r){K[n]&&console.info("Redefining LocalForage driver: "+n),K[n]=e,q[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(l,r):l(!!e._support):l(!0)}catch(e){r(e)}}));return u(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=K[e]?A.resolve(K[e]):A.reject(new Error("Driver not found."));return u(n,t,r),n},e.prototype.getSerializer=function(e){var t=A.resolve(F);return u(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;H(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){n._config.driver=n.driver()}function a(e){return n._extend(e),o(),n._ready=n._initStorage(n._config),n._ready}var s=null!==this._driverSet?this._driverSet.catch((function(){return A.resolve()})):A.resolve();return this._driverSet=s.then((function(){var e=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var i=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(i).then(a).catch(r)}o();var s=new Error("No available storage method found.");return n._driverSet=A.reject(s),n._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return n._driverSet=A.reject(e),n._driverSet})),u(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!q[e]},e.prototype._extend=function(e){ee(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=X.length;e<t;e++)$(this,X[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=te},{3:3}]},{},[4])(4)},"object"===a(t)&&void 0!==e?e.exports=A():(i=[],void 0===(o="function"==typeof(n=A)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(144))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=function(){t.stop(),t.autoSaveTimer=window.setInterval((function(){t.state.dirty&&(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV||t.mergeState({autoSaveSignalCount:t.state.autoSaveSignalCount+1}))}),18e4)},t.stop=function(){t.autoSaveTimer&&(clearInterval(t.autoSaveTimer),t.autoSaveTimer=void 0)},t}return(0,n.__extends)(t,e),t.prototype.initState=function(){this.updateState({autoSaveSignalCount:0,dirty:!1})},t.prototype.markDirty=function(e){this.mergeState({dirty:e})},t}(i.default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logDocumentLoad=function(e,t){(0,n.sendKTrackerEvent)("toolLoad",{type:e,errorMsg:t})};var n=r(985)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ModelUpdateType",{enumerable:!0,get:function(){return i.ModelUpdateType}}),t.default=t.MultiBackupItem=void 0;var n=r(4),i=r(290),o=r(1993),A=r(676),a=r(2),s=r(1052);function u(e,t){var r=new Map;return e.forEach((function(e,n){r.set(n,t(e,n))})),r}var c=function(e){function t(t){var r=e.call(this,t)||this;return r.multiData=u(t,(function(e){return{data:new e.BackupItemImpl(e.model),BackupItemImpl:e.BackupItemImpl}})),r}return(0,n.__extends)(t,e),t.prototype.toModel=function(){return u(this.multiData,(function(e){return{model:e.data.toModel(),BackupItemImpl:e.BackupItemImpl}}))},t}(i.BackupItem);function l(e,t,r){var i=r.value;return(0,n.__assign)((0,n.__assign)({},r),{value:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.started)i.apply(this,e);else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw new Error("method "+t+" can only be called after app started.")}})}t.MultiBackupItem=c;var g=function(e){function t(r){var n=e.call(this,{getModel:function(){return u(n.documentSources,(function(e){var t=e.getModel();if(!t)throw new Error("MultiDocumentManager: getModel() return undefined for: "+e.key);return{model:t,BackupItemImpl:e.BackupItemImpl}}))},onUpdateModel:function(e,t){n.mapEachPrioritySync((function(r){r.forEach((function(r){var n=e.get(r.key);if(!n)throw new Error('No backup model for "'+r.key+"\", perhaps it's been added after this backup triggered.");r.onUpdateModel(n.model,t)}))}))},onUpdateState:r.onUpdateState,maxBackupStep:r.maxBackupStep,useHybridStorage:r.useHybridStorage})||this;return n.started=!1,n.cancelLoadToken=o.CancelToken.source(),n.id="kafDocument"+t.instanceCount++,n.monitoredRequestedKeySet=new Set,n.monitorSourceFetch=function(e,t,r){var i=e+r;return n.monitoredRequestedKeySet.has(i)?t:(n.monitoredRequestedKeySet.add(i),n.reportSource(e,t,r))},n.onModelChange=r.onModelChange||a.noop,n.onPause=r.onPause||a.noop,n.onToggleAutoBackup=r.onToggleAutoBackup||a.noop,n.onResume=r.onResume||a.noop,n}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"documentSources",{get:function(){return this.internalDocumentSources||(this.internalDocumentSources=new Map),this.internalDocumentSources},enumerable:!0,configurable:!0}),t.prototype.getBackupItemImpl=function(){return c},t.prototype.setId=function(e){this.id=e},t.prototype.getId=function(){return this.id},t.prototype.onModelChanges=function(e){this.started&&(this.requestCommit(),this.onModelChange())},t.prototype.toggleAutoBackup=function(t){e.prototype.toggleAutoBackup.call(this,t),this.onToggleAutoBackup(t)},t.prototype.commit=function(){e.prototype.commit.call(this)},t.prototype.onLoadSessionStart=function(){var e=(0,s.createDocumentLoadReporter)(),t=e.reportSource,r=e.statisticsPromise,n=e.getStatistics;(0,e.setTotal)(this.documentSources.size),this.loadStatisticsPromise=r,this.getStatisticsSync=n,this.reportSource=t,this.monitoredRequestedKeySet.clear()},t.prototype.createFetchDocumentPromises=function(e,r){var n=this,i=this.getDocumentsSortedByPriority(t.getDocFetchPriority),o=new Map;return i.reduce((function(t,i){return t.then((function(){var t=[];return i.documents.forEach((function(i){if(void 0!==i.fetch){var A=n.monitorSourceFetch(i.key,i.fetch({isInitialLoad:e,reloadInfo:r}),"fetch");t.push(A),o.set(i.key,A)}})),Promise.all(t)}))}),Promise.resolve()),o},t.prototype.openDocuments=function(){var e=this;this.onLoadSessionStart();var t=this.createFetchDocumentPromises(!0);return this.mapEachPriority((function(r){return Promise.all(r.map((function(r){return(t.get(r.key)||Promise.resolve()).then((function(t){return e.monitorSourceFetch(r.key,r.open(t),"open")}))})))}))},t.prototype.loadUntilCancel=function(e,t){var r=this;return this.cancelLoadToken=o.CancelToken.source(),Promise.race([e,this.cancelLoadToken.token.promise]).then((function(e){if((0,A.isCancel)(e))return e;t&&t(),r.requestCommit(),r.commit()}))},t.prototype.start=function(){var e=this;if(this.started)throw new Error("Cannot start twice");return this.loadUntilCancel(this.openDocuments(),(function(){e.started=!0,e.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!0,e.onDocumentChange),e.afterInit&&e.afterInit(e.onDocumentChange)})),e.toggleAutoBackup(!0)}))},t.prototype.reloadDocuments=function(e){var t=this;this.onLoadSessionStart();var r={data:e},n=this.createFetchDocumentPromises(!1,r);return this.mapEachPriority((function(e){return Promise.all(e.map((function(e){var i=e.reload;return i?(n.get(e.key)||Promise.resolve()).then((function(n){return t.monitorSourceFetch(e.key,i(r,n),"open")})):Promise.resolve()})))}))},t.prototype.reload=function(e){return this.clearBackupHistory(),this.pause(),this.loadUntilCancel(this.reloadDocuments(e),this.resume.bind(this))},t.prototype.pause=function(){this.toggleAutoBackup(!1),this.onPause(),this.started=!1},t.prototype.resume=function(){this.started=!0,this.onResume(),this.toggleAutoBackup(!0)},t.prototype.beforeDispose=function(){this.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!1,a.noop),e.beforeDispose&&e.beforeDispose()})),this.toggleAutoBackup(!1),this.cancelLoadToken.cancel("DocumentManager has been disposed"),this.started=!1},t.prototype.getLoadStatistics=function(e){return void 0===e&&(e=!0),e?(this.loadStatisticsPromise||console.error("Please wail until the document load completed"),this.loadStatisticsPromise):this.getStatisticsSync()},t.prototype.beforeSaveDocument=function(e){if(!this.started)return!1;var t=!0;return this.documentSources.forEach((function(r){r.beforeSaveDocument&&(r.beforeSaveDocument(e)||(t=!1))})),t},t.prototype.saveDocument=function(e,t){var r=this.generateActionId(),i={actionId:r};return t&&(i=(0,n.__assign)((0,n.__assign)({},t),{actionId:r})),this.mapEachPriority((function(t){return Promise.all(t.map((function(t){return t.saveDocument(e,i)})))}))},t.prototype.clearDocument=function(e,t){this.mapEachPrioritySync((function(r){r.forEach((function(r){t&&!t(r)||r.clearDocument({data:e})}))}))},t.prototype.addDocumentSource=function(e){var t=this;if(this.started)throw new Error("MultiDocumentManager: currently don't support to dynamicly add/remove document source after app started.");if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(e.updateListeners&&console.warn("[Deprecated]:updateListeners,请在 afterInit 方法内监听数据变化,在 beforeDispose 内移除监听"),!e.updateListeners&&!e.afterInit))throw Error("updateListeners 和 afterInit 请至少实现一个");var r=e.key;if(this.documentSources.get(r))throw new Error("MultiDocumentManager: duplicate document source key: "+e.key);this.documentSources.set(r,(0,n.__assign)((0,n.__assign)({},e),{onDocumentChange:function(){return t.onModelChanges(r)}}))},t.prototype.getDocumentsSortedByPriority=function(e){var t,r,n,i={};return t=this.documentSources,r=function(t,r){var n=e(t);i[n]||(i[n]=[]),i[n].push(t)},n=[],t.forEach((function(e,t){n.push(r(e,t))})),Object.keys(i).map((function(e){var t=parseFloat(e);return{priority:t,documents:i[t]}})).sort((function(e,t){return t.priority-e.priority}))},t.prototype.mapEachPriority=function(e){return this.getDocumentsSortedByPriority(t.getDocPriority).reduce((function(t,r){return t=t.then((function(){return e(r.documents,r.priority)}))}),Promise.resolve())},t.prototype.mapEachPrioritySync=function(e){this.getDocumentsSortedByPriority(t.getDocPriority).forEach((function(t){e(t.documents,t.priority)}))},t.prototype.generateActionId=function(){return Date.now()+"-"+this.id},t.instanceCount=0,t.getDocFetchPriority=function(e){return e.fetchPriority||0},t.getDocPriority=function(e){return e.priority||0},(0,n.__decorate)([l],t.prototype,"toggleAutoBackup",null),(0,n.__decorate)([l],t.prototype,"commit",null),t}(i.default);t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1994),i=function(){function e(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){return t=e}));var r=this;e((function(e){r.reason||(r.reason=new n.Cancel(e),t(r.reason))}))}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var t=function(){};return{token:new e((function(e){return t=e})),cancel:t}},e}();t.CancelToken=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.message=e}return e.prototype.__CANCEL__=function(){},e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e}();t.Cancel=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.scoped=function(e){return function(t,r,o){return(0,i.__assign)((0,i.__assign)({},o),{value:function(){for(var t,r,i=this,A=[],a=0;a<arguments.length;a++)A[a]=arguments[a];var s=A.find((function(e){var t;return!0===(null===(t=e)||void 0===t?void 0:t.isScope)}));if(!s||!s.valid)return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING?void(s?s.valid||console.warn("Scope is not valid!"):console.warn("No scope found!")):null===(t=o.value)||void 0===t?void 0:t.apply(this,A);var u=function(){s.push((function(){e.apply(i,A)}))};try{var c=null===(r=o.value)||void 0===r?void 0:r.apply(this,A);return c&&("object"===n(c)||"function"==typeof c)&&(c instanceof Promise||"function"==typeof c.then)?c.then(u):u(),c}catch(e){throw e}}})}},t.ScopeGroup=void 0;var i=r(4);var o=function(){function e(e,t,r,n){this.parent=e,this.onScopeDispose=t,this.pushChange=r,this.isValid=n,this.isScope=!0,this.disposed=!1}return Object.defineProperty(e.prototype,"valid",{get:function(){return!this.disposed&&this.isValid(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alive",{get:function(){return!this.disposed},enumerable:!0,configurable:!0}),e.prototype.push=function(e){this.valid?this.pushChange(this,e):console.warn("Scope is not valid!")},e.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.onScopeDispose(this))},e}(),A=function(){function e(){var e=this;this.changeStack=[],this.lockedScope=new Set,this.onScopeDispose=function(t){e.sequenceRestore(t)},this.pushChange=function(t,r){e.changeStack.push({scope:t,restore:r})},this.isScopeValid=function(t){for(var r=-1,n=e.changeStack.length-1;n>0;n--)if(e.changeStack[n].scope===t){r=n;break}return!e.lockedScope.has(t)&&(-1===r||r===e.changeStack.length-1)}}return e.prototype.sequenceRestore=function(e){for(var t,r,n=[];this.changeStack.length;){var o=this.changeStack[this.changeStack.length-1];if(o.scope.alive)break;this.changeStack.pop(),n.push(o)}try{for(var A=(0,i.__values)(n),a=A.next();!a.done;a=A.next()){a.value.restore()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=A.return)&&r.call(A)}finally{if(t)throw t.error}}},e.prototype.lock=function(e){e.parent===this&&this.lockedScope.add(e)},e.prototype.unLock=function(e){this.lockedScope.delete(e)},e.prototype.createScope=function(){return new o(this,this.onScopeDispose,this.pushChange,this.isScopeValid)},e.prototype.dispose=function(){for(;this.changeStack.length;){this.changeStack.pop().restore()}[].forEach((function(e){return e.alive&&e.dispose()}))},e}();t.ScopeGroup=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scopedState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Object.defineProperty(t.prototype,A,{value:e,writable:!1,enumerable:!1,configurable:!1}),(0,o.scopedObject)({diff:s,getter:c,restore:u})(t)}};var n=r(4),i=r(2),o=r(1083),A=Symbol("scoped_property");var a,s=(a=new Set,function(e,t){var r={};return Object.keys(e).forEach((function(e){a.add(e)})),Object.keys(t).forEach((function(e){a.add(e)})),a.forEach((function(n){e[n]!==t[n]&&(r[n]={from:e[n],to:t[n]})})),a.clear(),r});function u(e){var t=(0,n.__assign)({},this.state);Object.keys(e).forEach((function(r){var n=e[r];Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&n.to!==t[r]&&console.error("Scoped state "+r+" changed outside current scope!"),t[r]=n.from})),this.state=t}function c(){var e=this[A];return function(e,t){return t&&t.length?(0,i.pick)(e,t):(0,n.__assign)({},e)}(this.state,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"drawPolygonWithHole",{enumerable:!0,get:function(){return n.drawPolygonWithHole}}),Object.defineProperty(t,"drawBox",{enumerable:!0,get:function(){return n.drawBox}}),Object.defineProperty(t,"drawPolyline",{enumerable:!0,get:function(){return n.drawPolyline}}),Object.defineProperty(t,"drawLine",{enumerable:!0,get:function(){return n.drawLine}}),Object.defineProperty(t,"drawDashLine",{enumerable:!0,get:function(){return n.drawDashLine}}),Object.defineProperty(t,"drawPolygon",{enumerable:!0,get:function(){return n.drawPolygon}}),Object.defineProperty(t,"drawPolyDashLine",{enumerable:!0,get:function(){return n.drawPolyDashLine}}),Object.defineProperty(t,"drawSector",{enumerable:!0,get:function(){return n.drawSector}}),Object.defineProperty(t,"drawRect",{enumerable:!0,get:function(){return n.drawRect}});var n=r(1040)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"generatePopMesh",{enumerable:!0,get:function(){return n.generatePopMesh}}),Object.defineProperty(t,"updateMaterials",{enumerable:!0,get:function(){return n.updateMaterials}}),Object.defineProperty(t,"updateTransform",{enumerable:!0,get:function(){return n.updateTransform}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return n.loadComponent}});var n=r(1084)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ContainerType2D",{enumerable:!0,get:function(){return n.ContainerType2D}});var n=r(237)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.SelectControls2D}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(2001)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1059)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pureWithCustomizedCompare",{enumerable:!0,get:function(){return n.pureWithCustomizedCompare}}),Object.defineProperty(t,"pureWithPickKeys",{enumerable:!0,get:function(){return n.pureWithPickKeys}}),Object.defineProperty(t,"pureWithOmitKeys",{enumerable:!0,get:function(){return n.pureWithOmitKeys}});var n=r(2003)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pureWithCustomizedCompare=function e(t){void 0===t&&(t={});return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!(i=this.props,A=e,a=t,s=Object.keys(i),u=Object.keys(A),s.length===u.length&&s.every((function(e){return(a[e]||o)(i[e],A[e])}))&&(0,n.default)(this.state,r));var i,A,a,s,u},r}},t.pureWithPickKeys=function e(t){return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!function(e,t,r){return r.every((function(r){return o(e[r],t[r])}))}(this.props,e,t)||!(0,n.default)(this.state,r)},r}},t.pureWithOmitKeys=function e(t){var r=t.reduce((function(e,t){return e[t]=!0,e}),{});return function(t){return t.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+t.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),t.prototype.shouldComponentUpdate=function(e,t){return!function(e,t,r){var n=Object.keys(e).filter((function(e){return!r[e]})),i=Object.keys(t).filter((function(e){return!r[e]}));return n.length===i.length&&n.every((function(r){return o(e[r],t[r])}))}(this.props,e,r)||!(0,n.default)(this.state,t)},t}};var n=r(264),i=r(186);function o(e,t){return e===t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__expectedPublicAPIs__=void 0;t.__expectedPublicAPIs__=""},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RenderSystem2D",{enumerable:!0,get:function(){return n.RenderSystem2D}}),Object.defineProperty(t,"RenderSystem3D",{enumerable:!0,get:function(){return n.RenderSystem3D}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"InferenceSystem3D",{enumerable:!0,get:function(){return i.InferenceSystem3D}}),Object.defineProperty(t,"EntityListSystem",{enumerable:!0,get:function(){return o.EntityListSystem}}),Object.defineProperty(t,"VisibleEntityListSystem",{enumerable:!0,get:function(){return A.default}});var n=r(237),i=r(418),o=r(183),A=r(205)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectionFeature",{enumerable:!0,get:function(){return n.SelectionFeature}}),Object.defineProperty(t,"HintFeature",{enumerable:!0,get:function(){return i.HintFeature}}),Object.defineProperty(t,"WithObjectEventListenersFeature",{enumerable:!0,get:function(){return o.Feature}});var n=r(415),i=r(687),o=r(1021)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DocumentEvents",{enumerable:!0,get:function(){return n.DocumentEvents}}),Object.defineProperty(t,"combine",{enumerable:!0,get:function(){return n.combine}}),Object.defineProperty(t,"Language",{enumerable:!0,get:function(){return n.Language}}),Object.defineProperty(t,"EVENT_STOPPED",{enumerable:!0,get:function(){return n.EVENT_STOPPED}}),Object.defineProperty(t,"InteractionEventType",{enumerable:!0,get:function(){return n.InteractionEventType}});var n=r(1085)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(524),o=r(2012),A=r(708),a=r(709),s=function(){function e(){}return e.prototype.setPrecision=function(e){this.precisionMap=e},e.prototype.setGlobalUnit=function(e){var t=this.getGlobalUnitInfoMap(e);t&&(this.currentGlobalUnitInfoMap=t)},e.prototype.setGlobalLengthUnit=function(e){var t=this.getGlobalLengthUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{length:t}))},e.prototype.setGlobalAreaUnit=function(e){var t=this.getGlobalAreaUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{area:t}))},e.prototype.getDisplayText=function(e,t,r,n,o){var A;if(void 0===r&&(r=!1),o){if(o.customUnitInfo){if((0,a.getQuantityTypeForUnit)(o.customUnitInfo.unitType)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customUnitInfo.unitType and quantityType do not match.");return""}A=(0,a.getUnitInstance)(o.customUnitInfo.unitType),n=o.customUnitInfo.precision}if(o.customBaseUnit){if((0,a.getQuantityTypeForUnit)(o.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customBaseUnit and quantityType do not match.");return""}var s=(0,a.getDefaultBaseUnitForQuantity)(t);if(!s)return"";e=(0,a.convertBetweenUnits)(e,o.customBaseUnit,s)}}if(!A){var u=this.getGlobalUnitInfo(t),c=void 0;if(u){if(c=u.precision,this.precisionMap){var l=this.precisionMap.tool_length_and_precision,g=this.precisionMap.tool_area_and_precision;switch(t){case"length":l&&l.unit&&i.factorMap[l.unit]===u.unit.factor&&void 0!==l.precision&&(c=l.precision);break;case"area":g&&g.unit&&i.factorMap[g.unit]===u.unit.factor&&void 0!==g.precision&&(c=g.precision)}}A=u.unit,n=void 0===n?c:n}}if(A&&n)return A.getDisplayText(e,r,n);if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): illegal input.");return""},e.prototype.getValueFromDisplayText=function(e,t,r,n){var i;if(void 0===r&&(r=!1),n&&n.customUnit){if((0,a.getQuantityTypeForUnit)(n.customUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customUnit and quantityType do not match.");return 0}i=(0,a.getUnitInstance)(n.customUnit)}if(!i){var o=this.getGlobalUnitInfo(t);o&&(i=o.unit)}if(i){var A=i.getValueFromDisplayText(e,r);if(n&&n.customBaseUnit){if((0,a.getQuantityTypeForUnit)(n.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customBaseUnit and quantityType do not match.");return 0}var s=(0,a.getDefaultBaseUnitForQuantity)(t);s&&(A=(0,a.convertBetweenUnits)(A,s,n.customBaseUnit))}return A}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): 'currentGlobalUnitInfoMap' is not defined or illegal 'quantityType'");return 0},e.prototype.getGlobalUnitInfo=function(e){if(this.currentGlobalUnitInfoMap)return this.currentGlobalUnitInfoMap[e]},e.prototype.getGlobalUnitInfoMap=function(e){var t;switch(e){case A.GlobalUnitType.mm:t=o.globalUnitInfoMaps.metricSystem.millimeter;break;case A.GlobalUnitType.m:t=o.globalUnitInfoMaps.metricSystem.meter;break;case A.GlobalUnitType.ft:t=o.globalUnitInfoMaps.imperialSystem.foot;break;default:if(String(e).match(/^1\d{2}$/)){var r=this.getGlobalLengthUnitInfo(Number(String(e)[1])),n=this.getGlobalAreaUnitInfo(Number(String(e)[2]));r&&n&&(t={length:r,area:n})}else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}return t},e.prototype.getGlobalLengthUnitInfo=function(e){var t;switch(e){case i.LengthUnitType.mm:t=o.globalLengthUnitInfoMaps.metricSystem.millimeter;break;case i.LengthUnitType.m:t=o.globalLengthUnitInfoMaps.metricSystem.meter;break;case i.LengthUnitType.ft:t=o.globalLengthUnitInfoMaps.imperialSystem.foot;break;case i.LengthUnitType.in:t=o.globalLengthUnitInfoMaps.imperialSystem.inch;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalLengthUnitInfo(): illegal globalLengthUnitType")}return t},e.prototype.getGlobalAreaUnitInfo=function(e){var t;switch(e){case i.AreaUnitType.sqMm:t=o.globalAreaUnitInfoMaps.metricSystem.millimeter;break;case i.AreaUnitType.sqM:t=o.globalAreaUnitInfoMaps.metricSystem.meter;break;case i.AreaUnitType.sqFt:t=o.globalAreaUnitInfoMaps.imperialSystem.foot;break;case i.AreaUnitType.mats:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.mats;break;case i.AreaUnitType.tsubo:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.tsubo;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalAreaUnitInfo(): illegal globalAreaUnitType")}return t},e}();t.default=s},function(e,t,r){"use strict";var n=r(206);Object.defineProperty(t,"__esModule",{value:!0}),t.tsubo=t.mats=t.squareMillimeter=t.squareMeter=t.squareFoot=t.footAndInch=t.inch=t.millimeter=t.meter=void 0;var i=n(r(2010)),o=r(525),A=n(r(2011)),a=new i.default("m",o.FACTORS.m2mm,o.regexMap.number,o.regexMap.meterText);t.meter=a;var s=new i.default("mm",o.FACTORS.mm2mm,o.regexMap.number,o.regexMap.millimeterText);t.millimeter=s;var u=new i.default("''",o.FACTORS.inch2mm,o.regexMap.number,o.regexMap.inchText);t.inch=u;var c=new A.default;t.footAndInch=c;var l=new i.default("ft²",o.FACTORS.sqft2sqmm,o.regexMap.number,o.regexMap.squareFootText);t.squareFoot=l;var g=new i.default("m²",o.FACTORS.sqm2sqmm,o.regexMap.number,o.regexMap.squareMeterText);t.squareMeter=g;var f=new i.default("mm²",o.FACTORS.sqmm2sqmm,o.regexMap.number,o.regexMap.squareMillimeterText);t.squareMillimeter=f;var h=new i.default("mats",o.FACTORS.mats2sqmm,o.regexMap.number,o.regexMap.matsText);t.mats=h;var p=new i.default("tsubo",o.FACTORS.tsubo2sqmm,o.regexMap.number,o.regexMap.tsuboText);t.tsubo=p},function(e,t,r){"use strict";var n=r(206);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(1086),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.factor=r,this.regexWithoutUnit=n,this.regexWithUnit=o}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return t?"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r)).concat(this.name):"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r))}},{key:"getValueFromDisplayText",value:function(e,t){return t?this.getValueFromFirstNumber(this.regexWithUnit,e):this.getValueFromFirstNumber(this.regexWithoutUnit,e)}},{key:"getValueFromFirstNumber",value:function(e,t){var r=(0,A.testStringAndExtractNumbers)(e,t);return void 0!==r[0]?r[0]*this.factor:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=a},function(e,t,r){"use strict";var n=r(206);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(525),a=r(1086),s=function(){function e(){(0,i.default)(this,e),this.factor=0}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return this.getFootAndInchText(e)}},{key:"getValueFromDisplayText",value:function(e,t){return this.getValueFromFootAndInchText(e)}},{key:"getFootAndInchText",value:function(e){var t=(0,a.numberPrecisionOperationAndRound)(e/A.FACTORS.inch2mm,0),r=Math.floor(t/A.FACTORS.foot2inch),n=t-r*A.FACTORS.foot2inch;return"".concat(r,"'").concat(n,"''")}},{key:"getValueFromFootAndInchText",value:function(e){var t,r;return A.regexMap.number.test(e)||A.regexMap.inchText.test(e)?(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])):A.regexMap.footAndInchText.test(e)&&(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])*A.FACTORS.foot2inch,2===t.length&&(r+=Number(t[1]))),void 0!==r?r*A.FACTORS.inch2mm:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalLengthUnitInfoMaps=t.globalAreaUnitInfoMaps=t.globalUnitInfoMaps=void 0;var n=r(524),i={metricSystem:{meter:{length:{precision:.001,unit:n.meter},area:{precision:.01,unit:n.squareMeter}},millimeter:{length:{precision:1,unit:n.millimeter},area:{precision:.01,unit:n.squareMeter}}},imperialSystem:{foot:{length:{precision:1,unit:n.footAndInch},area:{precision:1,unit:n.squareFoot}}}};t.globalUnitInfoMaps=i;var o={metricSystem:{meter:{precision:.01,unit:n.squareMeter},millimeter:{precision:.01,unit:n.squareMillimeter}},imperialSystem:{foot:{precision:.01,unit:n.squareFoot}},JapaneseUnitSystem:{mats:{precision:.01,unit:n.mats},tsubo:{precision:.01,unit:n.tsubo}}};t.globalAreaUnitInfoMaps=o;var A={metricSystem:{meter:{precision:.001,unit:n.meter},millimeter:{precision:1,unit:n.millimeter}},imperialSystem:{foot:{precision:1,unit:n.footAndInch},inch:{precision:.01,unit:n.inch}}};t.globalLengthUnitInfoMaps=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.TransactionDocument}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"flatEntitiesCreator",{enumerable:!0,get:function(){return o.flatEntitiesCreator}}),Object.defineProperty(t,"HighlightSystem2D",{enumerable:!0,get:function(){return A.HighlightSystem2D}}),Object.defineProperty(t,"HighlightSystem3D",{enumerable:!0,get:function(){return A.HighlightSystem3D}});var n=r(2014),i=r(418),o=r(2018),A=r(511)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.default}});var n=r(2015)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2016),i=r(2017),o=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=i.TransactionDocumentStatus.None,this.onDocumentChange=function(e,r,n){t.status!==i.TransactionDocumentStatus.Aborting&&t.activeTransaction.record(e,r,n),t.status===i.TransactionDocumentStatus.None&&t.onBackupRecord&&t.onBackupRecord(e,r,n)},this.updateDocument=e.updateDocument,this.onBackupRecord=e.onBackupRecord,this.maxBackupStep=e.maxBackupStep||25,this.openTransaction()}return e.prototype.setMaxBackupStep=function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)},e.prototype.openTransaction=function(){this.redoStack.length=0,this.activeTransaction=this.createTransaction()},e.prototype.commitTransaction=function(){this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-(this.maxBackupStep+1)),this.undoStack.push(this.activeTransaction),this.openTransaction()},e.prototype.abortTransaction=function(){this.status=i.TransactionDocumentStatus.Aborting,this.activeTransaction.recover(),this.status=i.TransactionDocumentStatus.None,this.activeTransaction=this.createTransaction()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Undoing,this.undoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.redoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.redo=function(){return 0!==this.redoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Redoing,this.redoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.undoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.createTransaction=function(){return new n.default(this.updateDocument)},e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function e(e){this.updateDocument=e,this.records=new Map}return e.prototype.record=function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)},e.prototype.recover=function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){e.updateDocument(r,n,t)}))}))},e.prototype.isEmpty=function(){return 0===this.records.size},e}();t.default=n},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDocumentStatus=void 0,t.TransactionDocumentStatus=n,function(e){e[e.None=0]="None",e[e.Undoing=1]="Undoing",e[e.Redoing=2]="Redoing",e[e.Aborting=3]="Aborting"}(n||(t.TransactionDocumentStatus=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatEntitiesCreator=function(e){var t=[],r=[];return function(n){var i=t,o=r;if(n!==i){for(var A=[],a=i.length,s=n.length,u=0;u<a&&u<s;u++){if(i[u]!==(f=n[u]))break;A.push(o[u])}if(u===a)for(;u<s;u++)A.push(e(n[u]));else{for(var c=new Map,l=u;l<a;l++)c.set(i[l],o[l]);for(var g=u;g<s;g++){var f=n[g],h=c.get(f);void 0===h?A.push(e(f)):A.push(h)}}return t=n,r=A,Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK&&(Object.freeze(t),Object.freeze(r)),A}return r}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"perf",{enumerable:!0,get:function(){return n.perf}});var n=r(240)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KAFApp=void 0;var n=r(4),i=r(211),o=r(143),A=r(1087),a=r(1091),s=r(240),u=r(504),c=r(137),l=r(11),g=r(91);function f(e){var t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.position="absolute",t.style.top="0",t.style.width="100%",t.style.height="100%",document.body.appendChild(t)),t}var h={fpsDetectorEnabled:!0},p=function(){function t(){this.appNodeId="kaf-app-"+t.AppCount++,this.pluginManager=new i.PluginManager,this.started=!1,this.registerPlugin(A.AppServicePlugin)}return t.prototype.registerPlugin=function(e){if(this.started)throw new Error("KAFApp.registerPlugin: cannot register plugin after App is started.");return this.pluginManager.registerPlugin(e),this},t.prototype.getPlugin=function(e){return this.pluginManager.getPlugin(e)},t.prototype.start=function(t){var r=this;if(this.started)throw new Error("KAFApp.start: App is already started.");t=(0,n.__assign)((0,n.__assign)({},h),t),this.started=!0;var i=(0,s.measurePluginLoadTiming)(this.pluginManager);this.pluginManager.loadAll(),i();var p=this.pluginManager.getPlugin(A.AppServicePlugin);this.fpsDetector=new s.FpsDetector(p.logger),this.fpsDataMerger=new s.FpsDataMerger({onMerged:function(e){return p.logger.fpsMerged(e)}}),p.stateManager.toolbox[u.setAppIdSymbol](this.appNodeId),p.stateManager.document[u.setAppIdSymbol](this.appNodeId),t.fpsDetectorEnabled?this.keepLoggingFps():this.fpsDetector.dispose(),(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)&&(window.kafProfiler=(0,a.profiler)(),window.kafDebuger=(0,a.debugManager)()),(0,o.config)({onError:p.logger.error}),p.stateManager.document.start(),p.stateManager.document.getLoadStatistics().then((function(e){(0,s.setDocumentsTiming)(e,r.appNodeId)}));var d,I,y=p.getLayout();d=y&&l.createElement(y,null),I={logger:p.logger,fpsDetector:this.fpsDetector,fpsDataMerger:this.fpsDataMerger,kafCoreState:p.stateManager,nodeId:this.appNodeId},g.render(l.createElement(c.RootStateContext.Provider,{value:{rootState:I.kafCoreState}},l.createElement(A.App,{logger:I.logger,fpsDetector:I.fpsDetector,fpsDataMerger:I.fpsDataMerger,appNodeId:I.nodeId},d)),f(I.nodeId)),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kafApp=this)},t.prototype.dispose=function(){var e,t;this.pluginManager.unloadAll(),e={nodeId:this.appNodeId},t=f(e.nodeId),g.unmountComponentAtNode(t),t.remove(),this.fpsDetector.dispose(),this.started=!1},t.prototype.getAppNodeId=function(){return this.appNodeId},t.prototype.keepLoggingFps=function(){var e=this;this.fpsDetector.on("frame",(function(t,r){r&&e.fpsDataMerger.add(t.duration)})),(0,s.initPerf)()},t.AppCount=0,t}();t.KAFApp=p}).call(this,r(86))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MountedViews=void 0;var n=r(4),i=r(137),o=r(2),A=r(11),a=r(91),s=r(522),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=document.createElement("span"),t.viewKeyMap=new WeakMap,t}return(0,n.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props.mountedViews.map((function(t,r){return A.createElement(s.ViewMountOrderContext.Provider,{key:e.getViewKey(t),value:r},A.createElement(t,null))})).reverse();return a.createPortal(t,this.placeholder)},t.prototype.componentWillUnmount=function(){this.placeholder=void 0},t.prototype.getViewKey=function(e){var t=this.viewKeyMap.get(e);return void 0===t&&(t=(0,o.uniqueId)("mounted-view-"),this.viewKeyMap.set(e,t)),t},t}(A.PureComponent);t.MountedViews=u;var c=(0,i.connect)((function(e){return{root:e}}),(function(e){return{mountedViews:e.root.__INTERNAL__mountedAppViews}}),u);t.default=c},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppServicePlugin=void 0;var n=r(4),i=r(211),o=r(1089),A=r(706),a=r(689),s=r(694),u=r(284),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootState=new A.default,t.logger=new s.Logger,t.enableConflictSessionCheck=function(e,r){t.getSessionManager().prepareSession(e,r)},t}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"stateManager",{get:function(){return this.rootState},enumerable:!0,configurable:!0}),t.prototype.onInitialize=function(){var e=this;this.rootState=new A.default,this.rootState.initState(),this.kaf2AppService=this.dependencies.get(a.AppServicePlugin),this.rootState[A.RootState_setKaf2](this.kaf2AppService.state),this.rootState.toolbox.provideToolContext(u.ToolContextInternal,(function(){return{rootState:e.rootState}})),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kaf=this)},t.prototype.onDispose=function(){this.rootState.dispose(),this.getSessionManager().stopSessionChecking(),this.layout=void 0},t.prototype.setLayout=function(e){if(this.layout)throw new Error("Layout cannot be set twice.");this.layout=e},t.prototype.getLayout=function(){return this.layout},t.prototype.addDocumentSource=function(e){this.rootState.document.addDocumentSource(e)},t.prototype.mountView=function(e){this.rootState.__INTERNAL__addMountedAppView(e)},t.prototype.getSessionManager=function(){var e=this;return this.sessionManager||(this.sessionManager=new o.default((function(t){t?e.rootState.document.autoSave.start():e.rootState.document.autoSave.stop()}))),this.sessionManager},t.prototype.registerEntityDocument=function(e){this.kaf2AppService.registerDocument(e)},t.dependencies=[a.AppServicePlugin],t}(i.BasePlugin);t.AppServicePlugin=c},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(351),i=r(4),o=r(236),A=r(1085),a=r(699),s=r(11),u=r(240),c=r(1092),l=r(1093);r(2025);var g,f={"./DebugComponent.module.scss":{"debug-root":"ui-debug-root_47b7b","debug-button":"ui-debug-button_73a33","debug-setting":"ui-debug-setting_bb0cc","debug-setting-row":"ui-debug-setting-row_94ade","debug-setting-row-title":"ui-debug-setting-row-title_6b6be","debug-setting-row-content":"ui-debug-setting-row-content_fc85a","debug-setting-item":"ui-debug-setting-item_6ac86","debug-setting-item-label":"ui-debug-setting-item-label_9289f","profile-wrapper":"ui-profile-wrapper_f26ef","profile-visible":"ui-profile-visible_b5bbc"}};g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.render=function(){return null},t}(a.default);var h=null;try{h=localStorage.getItem("__kafPerfEnabled__")}catch(e){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw e}if("1"===h||null===h&&(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)){g=function(e){function t(t){var r=e.call(this,t)||this;return r.switchProfile=function(e){var t=e.target.checked;r.setState({showProfile:t}),t||r.cleanRenderProfile()},r.switchDebug=function(e){var t=e.target.checked;r.setState({showDebug:t})},r.switchLanguage=function(e){var t=e.target.checked,r=window,n=t?A.Language.EN_US:A.Language.ZH_CN;try{r.kafDebuger.set("lang",n,!0),r.localStorage["local-language"]=n}catch(e){}window.location.reload()},r.switchAxis=function(e){var t=e.target.checked;r.setState({showAxis:t}),window.kafDebuger.set("axis3d",t)},r.onKey=function(e){e&&192==e.keyCode&&r.recordCurrentState()},r.state=r.state||{},r.state.showProfile=!1,r.state.showDebug=!0,r.state.showAxis=!1,r}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.initPixi(),document.body.addEventListener("keydown",this.onKey,!1)},t.prototype.render=function(){var e=this,t=this.state.showDebug;return s.createElement("div",{className:"ui-debug-root_47b7b",style:{display:t?"block":"none"}},this.renderDebugButton(),s.createElement("div",{ref:function(t){return e.elProfiler=t},className:(0,n.default)("profile-wrapper "+(this.state.showProfile?"profile-visible":""),f)}))},t.prototype.renderDebugButton=function(){return s.createElement("div",{className:"ui-debug-button_73a33"},s.createElement(u.Stats,null),this.renderSettingPanel())},t.prototype.renderSettingPanel=function(){var e=this.state.views,t="";try{t=window.localStorage["local-language"]}catch(e){}return s.createElement("div",{className:"ui-debug-setting_bb0cc"},s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"基本"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showProfile,onChange:this.switchProfile}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"性能(旧)")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showDebug,onChange:this.switchDebug}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"调试")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:t===A.Language.EN_US,onChange:this.switchLanguage}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"英文")),this.renderAxisSwitch())),s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"性能"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Timing,null)),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Profiling,null)))),e.map((function(e,t){return s.createElement("div",{key:e.key,className:"ui-debug-setting-row_94ade"},e.content)})))},t.prototype.renderAxisSwitch=function(){return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV?s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showAxis,onChange:this.switchAxis}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"坐标系")):null},t.prototype.renderProfile=function(){var e="",t=this.recordState||this.dumpProfile(),r=t.normalCosts,n=t.normalCounts,i=t.totalValues;e="时间统计\n\n",r.sort((function(e,t){return t.time-e.time})),r.forEach((function(t){e+=t.key+" "+t.time+" "+t.count+"\n"})),this.pxCostsText.text=e,e="计数统计\n\n",n.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxCountsText.text=e,e="全局计数\n\n",i.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxInfoText.text=e},t.prototype.cleanRenderProfile=function(){this.pxCostsText.text="",this.pxCountsText.text="",this.pxInfoText.text=""},t.prototype.dumpProfile=function(){var e,t,r,n,i=(0,l.profiler)().dump(),o=Object.values(i.costs);e=[];for(var A=0,a=o.length;A<a;++A)n=o[A],(0,c.isCrcp)(n.key)||e.push(n);var s=Object.values(i.counts).sort((function(e,t){return t.count-e.count}));t=[];for(A=0,a=s.length;A<a;++A)n=s[A],(0,c.isCrcp)(n.key)||t.push(n);var u=i.totals;return(r=Object.keys(u).map((function(e){return{key:e,count:u[e]}}))).sort((function(e,t){return t.count-e.count})),{normalCosts:e.length<50?e:e.slice(0,50),normalCounts:t.length<50?t:t.slice(0,50),totalValues:r.length<50?r:r.slice(0,50),datas:i.datas}},t.prototype.recordCurrentState=function(){this.recordState?this.recordState=void 0:(this.recordState=this.dumpProfile(),window.__pd=this.recordState.datas[this.recordState.datas.length-1])},t.prototype.initPixi=function(){var e=this;if(this.elProfiler){this.pxApp=new o.Application(3e3,1200,{backgroundColor:0});var t=this.pxApp;this.elProfiler.appendChild(t.view);var r=function(e,r){void 0===r&&(r=5);var n=new o.Text("",{fontSize:20,fill:65280,align:"left"});return n.x=e,n.y=r,t.stage.addChild(n),n};this.pxCostsText=r(500),this.pxCountsText=r(1e3),this.pxInfoText=r(1500);var n=Date.now();t.ticker.add((function(){Date.now()-n<1e3||(n=Date.now(),e.state.showProfile&&e.renderProfile())}))}},t}(a.default)}var p=g;t.default=p}).call(this,r(86))},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DisplayInfoMesh",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"DisplayInfoDrawable",{enumerable:!0,get:function(){return i.default}});var n=r(2027),i=r(2032)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(139),o=r(83),A=r(1094),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.meshBuilder=new A.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.state.loadingStatus}),(function(e){return t.setState({loadingStatus:e})}),(function(e,r){return t.onMeshCreated(e,r)}),(function(){return t.notifyWorldUpdate()})),t.componentInstances=t.meshBuilder.componentInstances,t.state={},t}return(0,n.__extends)(t,e),t.prototype.onMeshCreated=function(e,t){},t.prototype.buildMesh=function(){var e=this.meshBuilder.createMesh();return e.visible=void 0===this.props.visible||this.props.visible,e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),this.meshBuilder.updateMesh(this.mesh);var n=this.props.visible;this.mesh.visible=void 0===n||n},t.prototype.componentWillUnmount=function(){this.meshBuilder.disposeMesh(),e.prototype.componentWillUnmount.call(this)},t=(0,n.__decorate)([i.default],t)}(o.default);t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(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(2030),i=function(){function e(e){this.props=e}return e.prototype.create=function(){var e=(0,n.createMesh)(this.props);return(0,n.applyTransform)(e,this.props),e},e.prototype.update=function(e){(0,n.applyTransform)(e,this.props)},e.prototype.dispose=function(){},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMesh=u,t.applyTransform=c,t.default=void 0;var n=r(4),i=r(6),o=r(98),A=r(5),a=r(235),s=r(83);function u(e){var t=e.size,r=new i.BoxBufferGeometry(t.x,t.y,t.z),n=new i.EdgesBufferGeometry(r,1),o=new i.LineBasicMaterial({color:16722688,depthTest:!1});return new i.LineSegments(n,o)}function c(e,t){var r=t.position,n=t.pivot,i=t.scale,s=t.rotation;e.position.copy((0,a.vector3ToThree)(A.default.add(r,n||new A.default))),e.scale.copy((0,a.vector3ToThree)(i)),e.rotation.copy((0,a.eulerToThree)((new o.default).setFromVector3(s))),e.renderOrder=1}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.buildMesh=function(){var e=u(this.props);return c(e,this.props),e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),c(this.mesh,this.props)},t}(s.default);t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseQueue=void 0;var n=function(){function e(e){var t=this;this.isCanceled=!1,this.hasSuccess=!1,this.hasFailure=!1,this.promise=Promise.all(e.map((function(e){return e.then((function(){t.hasSuccess=!0}),(function(){t.hasFailure=!0}))}))).then((function(){return{hasSuccess:t.hasSuccess,hasFailure:t.hasFailure,isCanceled:t.isCanceled}}))}return e.prototype.setCanceled=function(){this.isCanceled=!0},e}();t.PromiseQueue=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(34),o=r(1094),A=r(2),a=function(){function e(e){this.props=e}return e.prototype.create=function(e){var t=this;return this.meshBuilder=new o.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.loadingStatus}),(function(e){return t.loadingStatus=e}),A.noop,e),this.meshBuilder.createMesh()},e.prototype.update=function(e){this.meshBuilder.updateMesh(e)},e.prototype.dispose=function(e){this.meshBuilder.disposeMesh()},(0,n.__decorate)([i.observable],e.prototype,"loadingStatus",void 0),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastHandledSignalCount=0,t}return(0,n.__extends)(t,e),t.prototype.componentWillMount=function(){this.lastHandledSignalCount=this.props.autoSaveSignalCount,this.props.rootState.document.autoSave.start()},t.prototype.componentWillReceiveProps=function(e){e.autoSaveSignalCount!==this.lastHandledSignalCount&&(this.props.rootState.document.saveDocument(!0),this.lastHandledSignalCount=e.autoSaveSignalCount)},t.prototype.render=function(){return null},t}(r(11).Component),A=(0,i.connect)((function(e){return{autoSave:e.document.autoSave}}),(function(e){return{autoSaveSignalCount:e.autoSave.autoSaveSignalCount}}),o);t.default=A},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1105);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2036);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2037);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.createReactContext=exports.PureComponent=exports.Component=void 0;var React=_interopRequireWildcard(__webpack_require__(11)),_async=__webpack_require__(1105),enterModule;function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(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(331);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2039);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1100);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(711);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1101);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(1102);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(710);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(1103);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(1104);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.tde=void 0;var n,i=r(331),o=r(711);(n=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(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(2041);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2042);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1106);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1107);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(2043);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Service=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(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__(712),_util=__webpack_require__(79),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(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__(712),_util=__webpack_require__(79),_ServiceFramework=__webpack_require__(1107),enterModule,EAppOrder;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(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(1108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2045);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1109);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1110);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(2046);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Monitor=void 0;var _AXR2=__webpack_require__(884),_Collector=__webpack_require__(422),_IdleWorker=__webpack_require__(1108),_PerfLog=__webpack_require__(1109),_TimeLog=__webpack_require__(1110),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function defaultSendLog(e,t){console.log(e,t)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(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";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={interceptors:!0,RequestClient:!0,parseCDN:!0,RequestClientParam:!0};Object.defineProperty(t,"RequestClient",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"parseCDN",{enumerable:!0,get:function(){return s.parseCDN}}),Object.defineProperty(t,"RequestClientParam",{enumerable:!0,get:function(){return u.RequestClientParam}}),t.interceptors=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(r,o,A):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r(31));t.interceptors=o;var A,a=(A=r(2049))&&A.__esModule?A:{default:A},s=r(1111),u=r(1112),c=r(2050);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(2052);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=i,t.default=function(e,t){if(t){var r=e[t];return void(r&&(e[t]=i(r)))}return function(t,r){var o,A,a;(0,n.isBoolean)(e)?(A=t[r],o=e):e.axios?(A=e.axios,o=e.isOss,a=e.isCoohom):A=e,A&&(t[r]=i(A,o,a))}};var n=r(2);function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.defaults.retry=!0,e.defaults.retryTimes=t?5:1,e.defaults.retryDelay=1e3,e.defaults.__retryCount=0,e.interceptors.request.use((function(e){return e.retry&&e.__retryCount&&(e.headers["x-retry"]=e.__retryCount),e})),e.interceptors.response.use(void 0,(function(t){var n=t.config;return n&&n.retry?(n.__retryCount=n.__retryCount||0,n.retryTimes=n.retryTimes||0,n.__retryCount>=n.retryTimes?Promise.reject(t):(n.__retryCount+=1,r&&n.url&&n.url.startsWith("/gateway")&&(n.url=n.url.replace("/gateway","")),new Promise((function(e){setTimeout((function(){e()}),n.retryDelay||0)})).then((function(){return e(n)})))):Promise.reject(t)})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(1)),i=o(r(678));function o(e){return e&&e.__esModule?e:{default:e}}function A(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){s=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(s)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},c=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e;return(e=t.client).request.apply(e,arguments)},this.get=function(){var e;return(e=t.client).get.apply(e,arguments)},this.delete=function(){var e;return(e=t.client).delete.apply(e,arguments)},this.post=function(){var e;return(e=t.client).post.apply(e,arguments)},this.put=function(){var e;return(e=t.client).put.apply(e,arguments)},this.encryptedRequest=function(){var e;return(e=t.encryptedClient).request.apply(e,arguments)},this.encryptedGet=function(){var e;return(e=t.encryptedClient).get.apply(e,arguments)},this.encryptedDelete=function(){var e;return(e=t.encryptedClient).delete.apply(e,arguments)},this.encryptedPost=function(){var e;return(e=t.encryptedClient).post.apply(e,arguments)},this.encryptedPut=function(){var e;return(e=t.encryptedClient).put.apply(e,arguments)},this.gzipRequest=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).request.apply(e,arguments):(r=t.encryptedClient).request.apply(r,arguments)},this.gzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).get.apply(e,arguments):(r=t.encryptedClient).get.apply(r,arguments)},this.ossGzipGet=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return u(t,void 0,void 0,n.default.mark((function e(){var t,o,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=function(){return u(this,void 0,void 0,n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.default.wasmLoaded||!(o<20)){e.next=7;break}return t=new Promise((function(e){setTimeout((function(){e()}),1e3)})),o++,e.next=5,t;case 5:return e.next=7,A();case 7:case"end":return e.stop()}}),e)})))},o=0,e.next=4,A();case 4:return e.abrupt("return",(t=this.ossGzippedEncryptClient).get.apply(t,r));case 5:case"end":return e.stop()}}),e,this)})))},this.ossDegradedGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.ossDegradedGzippedEncryptClient).get.apply(e,arguments):(r=t.ossDegradedEncryptedClient).get.apply(r,arguments)},this.pbGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).get.apply(e,arguments):(r=t.pbEncryptedClient).get.apply(r,arguments)},this.gzipDelete=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).delete.apply(e,arguments):(r=t.encryptedClient).delete.apply(r,arguments)},this.gzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).post.apply(e,arguments):(r=t.encryptedClient).post.apply(r,arguments)},this.pbGzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).post.apply(e,arguments):(r=t.pbEncryptedClient).post.apply(r,arguments)},this.gzipPut=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).put.apply(e,arguments):(r=t.encryptedClient).put.apply(r,arguments)}}var t,r,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){var t,r=A(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.request&&(this.client.interceptors.request.use(n.request.beforeSend),this.encryptedClient.interceptors.request.use(n.request.beforeSend),this.gzippedEncryptClient.interceptors.request.use(n.request.beforeSend)),n.response&&(this.client.interceptors.response.use(n.response.afterReceive),this.encryptedClient.interceptors.response.use(n.response.afterReceive),this.gzippedEncryptClient.interceptors.response.use(n.response.afterReceive))}}catch(e){r.e(e)}finally{r.f()}}}])&&s(t.prototype,r),o&&s(t,o),e}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"doTaskPolling",{enumerable:!0,get:function(){return n.doTaskPolling}});var n=r(2051)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doTaskPolling=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2?arguments[2]:void 0;return new Promise((function(n,A){var a=r;(function(e){return o(this,void 0,void 0,i.default.mark((function t(){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.taskPromise,o=e.createStatusOptions,t.abrupt("return",r.then((function(e){return o(e,{resolve:n,reject:A})})));case 2:case"end":return t.stop()}}),t)})))})(e).then((function(e){void 0!==e&&function e(t){return o(this,void 0,void 0,i.default.mark((function r(){var o,s,u,c,l,g,f;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:f=function(){setTimeout((function(){return e(t)}),l)},o=t.url,s=t.params,u=void 0===s?{}:s,c=t.interval,l=void 0===c?3e3:c,g=t.handlePolling,a(o,{params:u}).then((function(e){return g(e.data,{resolve:n,reject:A,next:f})}));case 3:case"end":return r.stop()}}),r)})))}(e)})).catch((function(e){return A(e)})),setTimeout((function(){return A("Time out")}),t)}))};var n,i=(n=r(1))&&n.__esModule?n:{default:n};var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseCode=void 0,t.ResponseCode=n,function(e){e.success="0",e.error="-1"}(n||(t.ResponseCode=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachedService=void 0;var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(47),A=r(356),a=r(2054),s=r(2055),u=r(2059),c=r(2061);function l(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=new A.ServiceConfig,this._resourceService=new s.ResourceDataService(this._config),this._paramModelGetAttachedService=new a.ParamModelGetAttachedService(this._config,this._resourceService),this._paramModelUpdateAttachedService=new c.ParamModelUpdateAttachedService(this._config,this._paramModelGetAttachedService),this._paramModelAssemblyUpdateAttachedService=new u.ParamModelAssemblyUpdateAttachedService(this._config,this._paramModelUpdateAttachedService),this._config[A.__INTERNAL__setHelper]({modelHandler:this._paramModelUpdateAttachedService.modelHandler,getAttachedsByData:this._paramModelGetAttachedService.getAttachedsByData,getRequestClient:this._config[A.__INTERNAL__getRequestClient]})}var t,r,n;return t=e,(r=[{key:"updateAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){var n,A,a,s;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.beforeAttached(),n=new Set,A=new Set,e.forEach((function(e){e instanceof o.CoreParamModel?n.add(e.getRootOrAccessory()):e instanceof o.CoreParamModelAssembly&&A.add(e)})),a=[],n.size&&a.push(this._paramModelUpdateAttachedService.updateModelAttacheds(l(n),t)),A.size&&a.push(this._paramModelAssemblyUpdateAttachedService.updateAssemblyAttacheds(l(A),t)),r.next=9,Promise.all(a);case 9:return s=r.sent,this.afterAttached(),r.abrupt("return",s);case 12:case"end":return r.stop()}}),r,this)})))}},{key:"beforeAttached",value:function(){}},{key:"afterAttached",value:function(){}},{key:"updateModelAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"updateAssemblyAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"config",get:function(){return this._config}},{key:"paramModelGetAttachedService",get:function(){return this._paramModelGetAttachedService}},{key:"paramModelUpdateAttachedService",get:function(){return this._paramModelUpdateAttachedService}}])&&f(t.prototype,r),n&&f(t,n),e}();t.AttachedService=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelGetAttachedService=void 0;var n=h(r(1)),i=h(r(592)),o=h(r(208)),A=r(1113),a=r(1001),s=r(2),u=h(r(125)),c=r(714),l=r(713),g=r(1114),f=r(356);function h(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};function E(e,t){if(e.length<=0)return[];var r=e.map((function(e){return{model:e,nodeNumber:B(e)}})).sort((function(e,t){return e.nodeNumber-t.nodeNumber}));if(r[0].nodeNumber>=t)return r.map((function(e){return[e.model]}));for(var n=[],i=[],o=0,A=0,a=r.length;A<a;A++){var s=r[A];o+s.nodeNumber<=t?(o+=s.nodeNumber,i.push(s.model)):(n.push(i),i=[s.model],o=s.nodeNumber)}return i.length>0&&n.push(i),n}function B(e){return e.children.reduce((function(e,t){return e+B(t)}),1)}function v(e){var t=[],r=[];return e.forEach((function(e){t.push.apply(t,I(e.rebuildModels)),r.push.apply(r,I(e.failedModels))})),{rebuildModels:t,failedModels:r}}var m=function(){function e(t,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.resourceService=r,this.getAttachedsByModel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.map((function(e){var t=e.serialize(void 0,!0,!0);return{id:e.getId(),data:t,matrix:e.getConcatenatedMatrix()}}));return i.getAttachedsByData(r.map((function(e){return e.data})),t).then((function(e){return Object.assign(Object.assign({},e),{requestModels:r})}))},this.getAttachedsByData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C(i,void 0,void 0,n.default.mark((function r(){var i,A,a,s,u,c,l,g,f,h,p,d,y,B=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getAttachSwitch();case 2:return i=r.sent,A=i.isNew,a=i.nodeLimit,s=new o.default,A?(c=E(e,a),u=c.map((function(e){return B.requestAttacheds({paramModelDatas:e,context:s,params:t})}))):u=e.map((function(e){return B.requestAttacheds({paramModelDatas:[e],context:s,params:t})})),r.next=8,u.reduce((function(e,t){return C(B,void 0,void 0,n.default.mark((function r(){var i,o,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return i=r.sent,r.next=5,e;case 5:return(o=r.sent).attachedModels.push(i.attachedModels),i.paramModelTasks.length>0&&(A=o.paramModelTasks).push.apply(A,I(i.paramModelTasks)),r.abrupt("return",o);case 9:case"end":return r.stop()}}),r)})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 8:return l=r.sent,g=l.attachedModels,f=l.paramModelTasks,r.next=13,this.processParamModelTasks(f,s);case 13:return h=r.sent,p=h.result,d=h.errorParamModelIds,y=d.reduce((function(t,r){var n=e.find((function(e){return e.id===r}));return n&&t.push(n),t}),[]),r.abrupt("return",Object.assign(Object.assign({},v([].concat(I(g),I(p),[{rebuildModels:[],failedModels:y}]))),{requestModels:e,context:s}));case 18:case"end":return r.stop()}}),r,this)})))},this.rawRequestAttacheds=function(e){return C(i,void 0,void 0,n.default.mark((function t(){var r,i,o,A,a,u,g,h,p,d,y,C,E=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.paramModelDatas,i=e.context,o=e.params,A=e.isRetry,a=void 0!==A&&A,t.next=3,this.config[f.__INTERNAL__getParamModelBackEndParam](r,o);case 3:if(u=t.sent,g=r.map((function(e){return Object.assign({id:e.id,paramModelData:e,retryCount:a?1:void 0,calWireFrames:!0,needCustomFaceData:!1,needResourceData:!1},u)})),t.prev=5,!l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_ENABLE){t.next=12;break}return t.next=9,this.requestAttachedV4NonPb(g);case 9:h=t.sent,t.next=15;break;case 12:return t.next=14,this.originalRequestAttacheds(g);case 14:h=t.sent;case 15:return p=(0,s.map)(h.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})),t.next=18,this.applyAttachedResource(h,i);case 18:if(d=t.sent,y=(d.errorMessages||[]).reduce((function(e,t){if(t.errCode===c.PARAM_MODEL_TOO_BIG_ERROR)return e;var n=r.find((function(e){return e.id===t.paramModelId}));return n&&e.push(n),e}),[]),a||!(y.length>0)){t.next=23;break}return C={attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:[]},paramModelTasks:[]},t.abrupt("return",Promise.all([C].concat(I(y.map((function(e){return E.retryRequestAttacheds({paramModelDatas:[e],context:i,params:o,isRetry:!0})}))))).then((function(e){return{attachedModels:v((0,s.map)(e,"attachedModels")),paramModelTasks:[]}})));case 23:return t.abrupt("return",{attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:y},paramModelTasks:p});case 26:return t.prev=26,t.t0=t.catch(5),t.abrupt("return",{attachedModels:{rebuildModels:[],failedModels:r},paramModelTasks:[]});case 29:case"end":return t.stop()}}),t,this,[[5,26]])})))},this.requestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.retryRequestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.getAttachSwitch=(0,u.default)((function(){return i.config[f.__INTERNAL__getRequestClient]().get("/dcs-model/api/attach/switch").then((function(e){return e.data}),(function(){return{nodeLimit:1,isNew:!1}}))}),Object.assign({promise:!0},c.memoizeValues))}var t,r,h;return t=e,(r=[{key:"processParamModelTasks",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i,o,A,a,u;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=function(e){return C(this,void 0,void 0,n.default.mark((function r(){var c,g,f,h,p,d=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=(0,s.chunk)(e,l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_CHUNK_SIZE),r.next=3,c.reduce((function(e,r){return C(d,void 0,void 0,n.default.mark((function i(){var A,u,c,l;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,a.requestAttachedTasksNonPb(r);case 3:return u=n.sent,n.next=6,a.applyAttachedResource(u,t);case 6:return c=n.sent,n.next=9,e;case 9:l=n.sent,(A=l.paramModelTasks).push.apply(A,I((0,s.map)(u.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})))),l.attachedModels.push({rebuildModels:(0,s.uniqBy)(c.models,"id")||[],failedModels:[]}),n.next=18;break;case 14:return n.prev=14,n.t0=n.catch(0),o.push.apply(o,I((0,s.map)(r,"paramModelId"))),n.abrupt("return",e);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),i,null,[[0,14]])})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 3:if(g=r.sent,f=g.attachedModels,h=g.paramModelTasks,i.push.apply(i,I(f)),!(A<l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_COUNT&&h.length>0)){r.next=16;break}return A++,p=new Promise((function(e){setTimeout((function(){e()}),l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_DELAY||0)})),r.next=12,p;case 12:return r.next=14,u(h);case 14:r.next=17;break;case 16:o.push.apply(o,I((0,s.map)(h,"paramModelId")));case 17:case"end":return r.stop()}}),r)})))},i=[],o=[],A=0,a=this,r.next=7,u(e);case 7:return r.abrupt("return",{result:i,errorParamModelIds:o});case 8:case"end":return r.stop()}}),r,this)})))}},{key:"originalRequestAttacheds",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodel",e);case 2:return r=t.sent,t.abrupt("return",r.data);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedV4NonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model/api/c/parammodel/v4/plain",{requestData:e},{extra:{isRequestBodyJson:!0}});case 2:return r=t.sent,i=r.data,o=A.dcs_model_attach.PBParamModelResponseDataV3.decode(i).toJSON(),(0,g.removeKeys)(o,["FULL_NAME"]),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedTasksNonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model-task/api/site/parammodel/result/plain",A.dcs_model_attach.PBParamModelTaskQueryRequests.create({requests:e}));case 2:return r=t.sent,i=A.dcs_model_attach.PBParamModelResponseDataV3.decode(r.data).toJSON(),(0,g.removeKeys)(i,["FULL_NAME"]),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"applyAttachedResource",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.resourceService.updateParamModelDataWithResource(e);case 2:return i=r.sent,t.addCustomResources(i),r.abrupt("return",i);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"createParams",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var o,A,a;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e.getRootOrAccessory(),A=o.serialize(void 0,!0,!0),a={paramModelData:A,variableParams:[t]},r.next=6,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodeldata/param/update",a).then((function(e){for(var r=e.data,n=function(e){var n=r.children.find((function(r){return r.id===t.paramModelPath[e]}));if(!n)return{v:void 0};r=n},o=1;o<t.paramModelPath.length;o++){var A=n(o);if("object"===p(A))return A.v}var a=(r.params||[]).find((function(e){var r;return e.name===(null===(r=t.paramOperates[0])||void 0===r?void 0:r.param.name)}));if(a)return new i.default(a)}));case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(0),r.abrupt("return",void 0);case 12:case"end":return r.stop()}}),r,this,[[0,9]])})))}}])&&d(t.prototype,r),h&&d(t,h),e}();t.ParamModelGetAttachedService=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceDataService=void 0;var n=A(r(1)),i=A(r(2056)),o=r(356);function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g,f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};!function(e){e.Array="Array",e.Object="Object"}(g||(g={}));var h=new i.default({maxAge:36e5,max:200}),p=function(e,t,r){var n,i=u(e.keys());try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.split("_")[0]===t)if(o.split("_")[1].split(",").includes(r.toString())&&e.get(o))return o}}catch(e){i.e(e)}finally{i.f()}return""},d=function(e,t){return function(r,i,o){return f(void 0,void 0,void 0,n.default.mark((function A(){var a,s,c,l,f,d;return n.default.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:a=o===g.Array?[]:{},c=r.sort(),l=u(c),A.prev=3,d=n.default.mark((function r(){var o,A,u,l,g;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=f.value,A=p(h,i,o),u=void 0,A?(s=A,u=h.get(s)):(s="".concat(i,"_").concat(c.toString()),u=e(c),h.set(s,u)),r.prev=4,r.next=7,u;case 7:l=r.sent,Array.isArray(a)&&t?(g=l.find((function(e){return e[t.dataItemFilterField]===o})))&&a.push(g):l[o]&&(a[o]=l[o]),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(4),h.del(s);case 14:case"end":return r.stop()}}),r,null,[[4,11]])})),l.s();case 6:if((f=l.n()).done){A.next=10;break}return A.delegateYield(d(),"t0",8);case 8:A.next=6;break;case 10:A.next=15;break;case 12:A.prev=12,A.t1=A.catch(3),l.e(A.t1);case 15:return A.prev=15,l.f(),A.finish(15);case 18:return A.abrupt("return",a);case 19:case"end":return A.stop()}}),A,null,[[3,12,15,18]])})))}},I=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSpecificProductData=function(e){return function(t){return f(r,void 0,void 0,n.default.mark((function r(){var i,A=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.length){r.next=2;break}return r.abrupt("return",[]);case 2:return r.next=4,d((function(t){return f(A,void 0,void 0,n.default.mark((function r(){var i,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 3:return i=r.sent,A=i.data,r.abrupt("return",null==A?void 0:A.d[e]);case 8:return r.prev=8,r.t0=r.catch(0),r.abrupt("return",[]);case 11:case"end":return r.stop()}}),r,this,[[0,8]])})))}),{dataItemFilterField:"brandGoodId"})(t,e,g.Array);case 4:return i=r.sent,r.abrupt("return",i);case 6:case"end":return r.stop()}}),r)})))}},this.resourceObtainList=[{targetField:"hardwares",idField:"hardwareBgIds",handler:this.getSpecificProductData("hardwares"),dataType:g.Array},{targetField:"textures",idField:"textureBgIds",handler:this.getSpecificProductData("textures"),dataType:g.Array},{targetField:"virtualModels",idField:"virtualModelBgIds",handler:this.getSpecificProductData("virtualModels"),dataType:g.Array},{targetField:"paramModelProducts",idField:"paramModelBgIds",handler:this.getSpecificProductData("paramModelProducts"),dataType:g.Array},{targetField:"moldings",idField:"moldingBgIds",handler:this.getSpecificProductData("moldings"),dataType:g.Array},{targetField:"paramPackages",idField:"obsParamPackageIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/parampackage",{obsParamPackageIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"id"}),dataType:g.Array},{targetField:"displayInfoMap",idField:"hardwareBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displayinfo",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"displayInfoMap",idField:"textureBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displaymaterial",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"fitRules",idField:"obsRuleIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/fitrule",{obsRuleIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"obsRuleId"}),dataType:g.Array}]}var t,r,i;return t=e,(r=[{key:"updateParamModelDataWithResource",value:function(e){return f(this,void 0,void 0,n.default.mark((function t(){var r,i=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.assign({},e),t.next=3,Promise.all(this.resourceObtainList.map((function(e){return f(i,void 0,void 0,n.default.mark((function t(){var i,o,A,s,u,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.targetField,o=e.idField,A=e.handler,s=e.dataType,!(u=r[o]||[]).length){t.next=7;break}return t.next=5,A(u,i,s);case 5:c=t.sent,s===g.Array?r[i]=r[i]?[].concat(a(r[i]),a(c)):c:r[i]=r[i]?Object.assign(Object.assign({},r[i]),c):c;case 7:case"end":return t.stop()}}),t)})))})));case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t,this)})))}}])&&s(t.prototype,r),i&&s(t,i),e}();t.ResourceDataService=I},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(2057),A=Symbol("max"),a=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),g=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=function(){return 1},I=function(){function e(t){if(n(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[A]=t.max||1/0;var r=t.length||d;if(this[s]="function"!=typeof r?d:r,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0,this[l]=t.dispose,this[g]=t.noDisposeOnSet||!1,this[p]=t.updateAgeOnGet||!1,this.reset()}var t,r,I;return t=e,(r=[{key:"max",get:function(){return this[A]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[A]=e||1/0,E(this)}},{key:"allowStale",get:function(){return this[u]},set:function(e){this[u]=!!e}},{key:"maxAge",get:function(){return this[c]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,E(this)}},{key:"lengthCalculator",get:function(){return this[s]},set:function(e){var t=this;"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[a]=0,this[f].forEach((function(e){e.length=t[s](e.value,e.key),t[a]+=e.length}))),E(this)}},{key:"length",get:function(){return this[a]}},{key:"itemCount",get:function(){return this[f].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var r=this[f].tail;null!==r;){var n=r.prev;m(this,e,r,t),r=n}}},{key:"forEach",value:function(e,t){t=t||this;for(var r=this[f].head;null!==r;){var n=r.next;m(this,e,r,t),r=n}}},{key:"keys",value:function(){return this[f].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[f].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[l]&&this[f]&&this[f].length&&this[f].forEach((function(t){return e[l](t.key,t.value)})),this[h]=new Map,this[f]=new o,this[a]=0}},{key:"dump",value:function(){var e=this;return this[f].map((function(t){return!C(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[f]}},{key:"set",value:function(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");var n=r?Date.now():0,i=this[s](t,e);if(this[h].has(e)){if(i>this[A])return B(this,this[h].get(e)),!1;var o=this[h].get(e).value;return this[l]&&(this[g]||this[l](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[a]+=i-o.length,o.length=i,this.get(e),E(this),!0}var u=new v(e,t,i,n,r);return u.length>this[A]?(this[l]&&this[l](e,t),!1):(this[a]+=u.length,this[f].unshift(u),this[h].set(e,this[f].head),E(this),!0)}},{key:"has",value:function(e){if(!this[h].has(e))return!1;var t=this[h].get(e).value;return!C(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[f].tail;return e?(B(this,e),e.value):null}},{key:"del",value:function(e){B(this,this[h].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{var o=i-t;o>0&&this.set(n.k,n.v,o)}}}},{key:"prune",value:function(){var e=this;this[h].forEach((function(t,r){return y(e,r,!1)}))}}])&&i(t.prototype,r),I&&i(t,I),e}(),y=function(e,t,r){var n=e[h].get(t);if(n){var i=n.value;if(C(e,i)){if(B(e,n),!e[u])return}else r&&(e[p]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return i.value}},C=function(e,t){if(!t||!t.maxAge&&!e[c])return!1;var r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},E=function(e){if(e[a]>e[A])for(var t=e[f].tail;e[a]>e[A]&&null!==t;){var r=t.prev;B(e,t),t=r}},B=function(e,t){if(t){var r=t.value;e[l]&&e[l](r.key,r.value),e[a]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}},v=function e(t,r,i,o,A){n(this,e),this.key=t,this.value=r,this.length=i,this.now=o,this.maxAge=A||0},m=function(e,t,r,n){var i=r.value;C(e,i)&&(B(e,r),e[u]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=I},function(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function A(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)A(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,n=this.head;null!==n&&r<e;r++)n=n.next;var o=[];for(r=0;n&&r<t;r++)o.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(r=0;r<(arguments.length<=2?0:arguments.length-2);r++)n=i(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(2058)(n)}catch(e){}},function(e,t,r){"use strict";r.r(t),function(e){var t=r(1),n=r.n(t);e.exports=function(e){e.prototype[Symbol.iterator]=n.a.mark((function e(){var t;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}}.call(this,r(887)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyUpdateAttachedService=void 0;var n,i=(n=r(208))&&n.__esModule?n:{default:n},o=r(243),A=r(2),a=r(356),s=r(2060);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.paramModelService=r}var t,r,n;return t=e,(r=[{key:"updateAssemblyAttacheds",value:function(e,t){var r=this,n=Object.assign(Object.assign({},this.config[a.__INTERNAL__getDefaultParams]()),t),i=this.config[a.__INTERNAL__chunkParamAssemblyModels](e,n).map((function(e){return r.updateAssemblyAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(i)}},{key:"updateAssemblyAttachedsInternal",value:function(e,t){var r=[],n=[];e.forEach((function(e){e.isTemplateAssembly()?r.push(e):n.push(e)}));var i=[];return n.length>0&&i.push(this.updateInstanceAttacheds(n,t)),r.length>0&&i.push(this.updateTemplateAttacheds(r,t)),Promise.all(i)}},{key:"updateInstanceAttacheds",value:function(e,t){var r=(0,A.flatMap)(e,(function(e){return e.getParamModels()}));return this.paramModelService.updateModelAttacheds(r,t)}},{key:"updateTemplateAttacheds",value:function(e,t){var r=this,n=t.excludeAccessories,i=e.map((function(e){return r.updateTemplateAttached(e,t)}));if(!n){var a=(0,A.flatMap)(e,(function(e){return o.ParamModelUtils.collectAccessories(e.getParamModels())}));a.length>0&&i.push(this.paramModelService.updateModelAttacheds(a,t))}return Promise.all(i)}},{key:"updateTemplateAttached",value:function(e,t){var r=t.applyTransform,n=e.serialize(void 0,!1,{includeAccessory:!1,isRootWorldMatrix:!0});return(0,s.getTemplateAttachedByData)(n,t,this.config).then((function(t){var n=new i.default;n.addCustomResources(t);var o=e.getPosition().clone(),A=e.getRotation().clone(),a=t.assemblyDatas[0];if(a)e.parse(a,n,{isRootWorldMatrix:!0});else{e.applyResource(n,!0);var s,c=e.getMatrix4(),l=u(e.getParamModels());try{for(l.s();!(s=l.n()).done;){var g=s.value;g.setMatrix4(c.clone().multiply(g.getMatrix4()))}}catch(e){l.e(e)}finally{l.f()}}("function"==typeof r?r(e.getId()):r)||e.updateTransform(o,A),e.setHasAttached(!0),e.getParamModels().forEach((function(e){return e.setHasAttached(!0)}))}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyUpdateAttachedService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateAttachedByData=function(e,t,r){return A(this,void 0,void 0,i.default.mark((function n(){var A,a,s;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r[o.__INTERNAL__getParamModelAssemblyBackEndParam]([e],t);case 2:return A=n.sent,a=[Object.assign({id:e.id,assemblyData:e,calWireFrames:!0},A)],n.next=6,r[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/assemblymodel",a);case 6:return s=n.sent,n.abrupt("return",s.data);case 8:case"end":return n.stop()}}),n)})))};var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(356);var A=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelUpdateAttachedService=void 0;var n=r(243),i=r(356),o=r(2062);function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAttached=r,this.modelHandler=function(e,t){var r=t.applyTransform;return n.getAttached.getAttachedsByModel(e,t).then((function(t){return n.applyAttached(e,t,r)}))},this.applyAttached=function(e,t,r){var n=t.rebuildModels,i=t.failedModels,A=t.context,a=t.requestModels;e.forEach((function(e){if(e.setHasAttached(!0),i.find((function(t){return t.id===e.id})))e.setLegal(!1);else{var t=e.getMatrix4(),s=e.getPosition().clone(),u=e.getRotation().clone(),c=n.find((function(t){return t.id===e.id}));c?e.parse(c,A):e.applyResource(A,!0);var l=a?a.find((function(t){return t.id===e.id})).matrix:void 0,g=e.getMatrix4();(0,o.handleTransform)(e,{applyTransform:r,position:s,rotation:u,matrix:t,requestMatrix:l,responseMatrix:g})}}))}}var t,r,a;return t=e,(r=[{key:"updateModelAttacheds",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},this.config[i.__INTERNAL__getDefaultParams]()),r),o=this.config[i.__INTERNAL__chunkParamModels](e,n),A=o.map((function(e){return t.updateAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(A)}},{key:"updateAttachedsInternal",value:function(e,t){return t.excludeAccessories||(e=n.ParamModelUtils.flattenModels(e)),this.modelHandlerWrapper(e,t)}},{key:"modelHandlerWrapper",value:function(e,t){var r=this,n=new Map,o=this.config[i.__INTERNAL__getParamModelHandlers]();e.forEach((function(e){var t=o.find((function(t){return t.filter(e)})),i=t?t.attachHandler:r.modelHandler,A=n.get(i);void 0===A&&(A=[],n.set(i,A)),A.push(e)}));var A=[];return n.forEach((function(e,r){return A.push(r(e,t))})),Promise.all(A)}}])&&A(t.prototype,r),a&&A(t,a),e}();t.ParamModelUpdateAttachedService=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleTransform=function(e,t){var r=t.applyTransform,o=t.position,A=t.rotation,a=t.matrix,s=t.requestMatrix,u=t.responseMatrix;if("function"==typeof r?r(e.getId()):r){if(!a||!s||!u)return;if(!n.default.equals(s,a)){var c=(new i.default).getInverse(s).premultiply(a);e.setMatrix4(u.clone().premultiply(c))}}else{if(!o||!A)return;e.setPosition(o),e.setRotation(A)}};var n=o(r(114)),i=o(r(44));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2064);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2069);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelDataService=void 0;var n=p(r(1)),i=r(47),o=r(10),A=r(1113),a=p(r(5)),s=p(r(125)),u=r(2065),c=r(1115),l=r(714),g=r(713),f=r(1114),h=r(108);function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},y=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.noCacheGetParamModelDataByBrandGoodId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return I(r,void 0,void 0,n.default.mark((function r(){var i,o,a,s;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!g.COMMON_ENV.PARAM_MODEL_DATA_PB_ENABLE){r.next=18;break}return i=u.util.toJSONOptions.defaults||!0,u.util.toJSONOptions.defaults=!0,r.prev=3,r.next=6,this.config.requestClient.pbGzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"/v2?cache=").concat(t));case 6:return o=r.sent,a=A.dcs_model.PBParamModelViewData.decode(o.data).toJSON(),(0,f.removeKeys)(a,["FULL_NAME"]),r.abrupt("return",a);case 12:return r.prev=12,r.t0=r.catch(3),r.abrupt("return",Promise.reject(r.t0));case 15:return r.prev=15,u.util.toJSONOptions.defaults=i,r.finish(15);case 18:return r.next=20,this.config.requestClient.gzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"?cache=").concat(t));case 20:return s=r.sent,r.abrupt("return",s.data);case 22:case"end":return r.stop()}}),r,this,[[3,12,15,18]])})))},this.getParamModelDataByBrandGoodId=(0,s.default)((function(e){return r.noCacheGetParamModelDataByBrandGoodId(e,!0)}),Object.assign({promise:!0},l.memoizeValues))}var t,r,p;return t=e,(r=[{key:"getParamModelByProduct",value:function(e){return I(this,void 0,void 0,n.default.mark((function t(){var r,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getParamModelDataByBrandGoodId(e.brandGoodId);case 2:return r=t.sent,o=(new this.config.paramModelConstructor).parse(r.paramModelData,(new i.CoreCustomContext).addProduct(e)),(0,h.attach)(o,(0,h.toAttachedMap)(r)),o.setSize(this.calcSizeByProduct(o,e)),o.assignUniqueId(),(0,c.updatePositionByOffGround)(o,0),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"calcSizeByProduct",value:function(e,t){var r=t.size;return new a.default(r&&r.x||e.getParsedValue(o.ParamName.WIDTH),r&&r.y||e.getParsedValue(o.ParamName.DEPTH),r&&r.z||e.getParsedValue(o.ParamName.HEIGHT))}}])&&d(t.prototype,r),p&&d(t,p),e}();t.ParamModelDataService=y},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeInferBoundingBox=u,t.computeInferBoxHeight=function(e){var t=u(e).boundingBox;return Math.abs(t.max.z-t.min.z)};var n=s(r(396)),i=s(r(141)),o=s(r(98)),A=s(r(44)),a=s(r(5));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.getPosition().clone(),r=e.getRotation().clone(),s=e.getBox3(),u=n.default.reorderToBackend(r).z,c=(new A.default).compose(t.clone().negate(),(new o.default).setFromVector3(new a.default(0,0,-u))),l=s.getPoints().map((function(e){return e.clone().applyMatrix4(c)}));return{boundingBox:(new i.default).setFromPoints(l),position:t,rotationZ:u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isModelTop=function(e){return!(e instanceof n.CoreParamModel)||e.isRoot()&&!e.getAssembly()};var n=r(47)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTransform=function(e,t){var r=t.position,n=t.rotation,a=t.scale;if(e instanceof i.CoreParamModel)r&&e.setPosition(r),n&&e.setRotation(n),a&&e.setScale(a);else{var s=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getPosition(),"x","y","z")),r)),u=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getRotation(),"x","y","z")),n)),c=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getScale(),"x","y","z")),a));e.updateTransform(s,u,c)}};var n,i=r(47),o=(n=r(5))&&n.__esModule?n:{default:n},A=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyDataService=void 0;var n,i=r(47),o=r(850),A=r(465),a=(n=r(125))&&n.__esModule?n:{default:n},s=r(1115),u=r(714),c=r(108);function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAssemblyDataByBrandGoodId=(0,a.default)((function(e,t){return r.config.requestClient.gzipGet("/dcs-model/api/c/assemblydata",{params:{bgid:e,assemblycollectiondataid:t}}).then((function(e){return e.data}))}),Object.assign({promise:!0},u.memoizeValues))}var t,r,n;return t=e,(r=[{key:"getAssemblyByProduct",value:function(e,t){return this.getAssemblyDataByBrandGoodId(t.brandGoodId,t.assemblyCollectionDataId).then((function(r){var n,a=r.assemblyData;(0,A.isAssemblyCollectionProduct)(t)?(a.collectBrandGoodId||(a=Object.assign(Object.assign({},a),{collectBrandGoodId:t.brandGoodId})),n=t.assembly):n=!0;var u=(0,o.parseAssembly)(a,new i.CoreCustomContext,n,e.paramModelAssemblyConstructor);return(0,c.attach)(u,(0,c.toAttachedMap)(r)),(0,s.updatePositionByOffGround)(u,0),u.assignUniqueId()}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyDataService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={response:{afterReceive:function(e){if(e.headers&&e.headers.hasOwnProperty("x-qunhe-bizcode")){var t={errorCodeData:e.data,response:e};return Promise.reject(t)}return e}}};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.point=e,this.offset=t};t.default=n},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.lengths=e,this.intersections=[]}return e.prototype.addIntersection=function(e){this.intersections.push(e)},e.prototype.getPoints=function(){return this.intersections.map((function(e){return e.point}))},e.prototype.getPointsInside=function(e){var t,r,i=[];try{for(var o=n(this.intersections),A=o.next();!A.done;A=o.next()){var a=A.value;a.offset.x>-e&&a.offset.x<this.lengths.x+e&&a.offset.y>-e&&a.offset.y<this.lengths.y+e&&i.push(a.point)}}catch(e){t={error:e}}finally{try{A&&!A.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i},e}();t.default=i},function(e,t,r){},function(e,t,r){"use strict";r.r(t),r.d(t,"FittingDesignService",(function(){return 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 Lm})),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,"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(730),r(1338);var n,i,o,A,a=r(1),s=r.n(a),u=r(3);!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL",e.ORDER_AUDIT="ORDER_AUDIT",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 L(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 O,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"}(O||(O={})),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 Y=function(){return(Y=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function H(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}function K(e,t){var r,n,i,o,A={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;A;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return A.label++,{value:o[1],done:!1};case 5:A.label++,n=o[1],o=[0];continue;case 7:o=A.ops.pop(),A.trys.pop();continue;default:if(!(i=A.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){A=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){A.label=o[1];break}if(6===o[0]&&A.label<i[1]){A.label=i[1],i=o;break}if(i&&A.label<i[2]){A.label=i[2],A.ops.push(o);break}i[2]&&A.ops.pop(),A.trys.pop();continue}o=t.call(e,A)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function q(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function J(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(q(arguments[t]));return e}var W=function(){function e(){this.namespace=""}return e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getValue=function(){return function(e,t){if(null!=e){if(t===b.boolean)return Boolean(parseFloat(e));if(t===b.number)return parseFloat(e)}return e}(this.value,this.type)},e.prototype.getNamespace=function(){return this.namespace},e.prototype.setValue=function(e){var t;if(!this.readonly&&this.ref){var r=null!==(t=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==t?t:1024,n=function(e,t){if(t===b.boolean)return e?"1":"0";return e.toString()}(e,this.type);if(function(e){for(var t=e.length,r=e.length-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:E.BZ_STORE,attr:P(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},e.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:E.BZ_STORE,attr:P(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},e.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},e}();var z,X=function(){function e(){this.data={name:"",displayName:"",type:Q.FIT,value:""}}return e.prototype.getValue=function(){return this.data.value},e.prototype.setValue=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:E.STORE,attr:this.data.name},this.getValue(),e),this.data.value=e)},e.prototype.toJSON=function(){return this.data},e.prototype.getMin=function(){return this.data.min},e.prototype.getEditable=function(){return!0===this.data.editable},e.prototype.getMax=function(){return this.data.max},e.prototype.getOptionValues=function(){return this.data.optionValues||[]},e.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},e.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},e.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},e.prototype.setPrimitiveOverride=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:E.STORE,attr:this.data.name},this.data.primitiveOverride,e),this.data.primitiveOverride=e)},e.prototype.getStep=function(){return this.data.step},e.prototype.getType=function(){return this.data.type},e.prototype.getParsedValue=function(){return this.getValue()},e.prototype.setParsedValue=function(e){return this.setValue(e)},e}();function Z(e){var t=new X;return t.data=e,t}!function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(z||(z={}));var $,ee,te,re,ne,ie,oe=function(){function e(e){this.option=e,this._changeMap={}}return Object.defineProperty(e.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),e.prototype.getRoot=function(e){var t=this.isRoot?this:this.root;if(e)for(var r;r=null==t?void 0:t.getParent();)t=r.getRoot()||t;return t},e.prototype.clone=function(){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&this.type===y.PARAM_PRIMITIVE)throw new Error("Primitive model don't support to clone!");var r=this.toJSON(),n=e.deserialize(JSON.stringify(r));return n._changeMap.cloned=!0,n._changeMap.forceUpdate=void 0,n._changeMap.originId||(n._changeMap.originId=n.id),n.id=function(){for(var e=0,t=0;t<36;t++)if(8===t||13===t||18===t||23===t)x[t]="-";else if(14===t)x[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,x[t]=M[19===t?3&r|8:r]}return x.join("")}(),n},e.prototype.getName=function(){return this.name},e.prototype.setName=function(e){this.__trackUpdateField({type:E.ATTRIBUTE,attr:"name"},this.name,e),this.name=e},e.prototype.getRemark=function(){return this.remark},e.prototype.setRemark=function(e){this.__trackUpdateField({type:E.ATTRIBUTE,attr:B.REMARK},this.remark,e),this.remark=e},e.prototype.setRotate=function(e){this.setRotation(e)},e.prototype.getRotate=function(){return this.getRotation()},e.prototype.setRotation=function(e){var t,r,n=this;if(null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate){var i=this.getRoot(!0).type,o=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(e){return e===n}));if((i===y.PARAM_ASSEMBLY||i===y.TEMPLATE_ASSEMBLY)&&o)throw new Error("Accessory under Assembly don't support to set rotation!")}this.__trackUpdateField({type:E.ATTRIBUTE,attr:B.ROTATION},this.rotation,e);var A=e.x,a=e.y,s=e.z;this.rotation={x:A,y:a,z:s}},e.prototype.getRotation=function(){return this.rotation},e.prototype.setPosition=function(e){var t,r,n=this;if(null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate){var i=this.getRoot(!0).type,o=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(e){return e===n}));if((i===y.PARAM_ASSEMBLY||i===y.TEMPLATE_ASSEMBLY)&&o)throw new Error("Accessory under Assembly don't support to set position!")}this.__trackUpdateField({type:E.ATTRIBUTE,attr:B.POSITION},this.position,e);var A=e.x,a=e.y,s=e.z;this.position={x:A,y:a,z:s}},e.prototype.getPosition=function(){return this.position},e.prototype.getToolType=function(){return this.toolType},e.prototype.setToolType=function(e){var t,r=U.get(e);if(this._origin===z.BRANDGOOD&&void 0!==r&&(null===(t=this.option)||void 0===t?void 0:t.allowToolTypes)){if(!this.option.allowToolTypes.includes(r))throw new Error("the custom model not support "+e+" tool");return this.__trackUpdateField({type:E.ATTRIBUTE,attr:B.TOOL_TYPE},this.toolType,e),void(this.toolType=e)}throw new Error("the custom model not support set tool type!")},e.prototype.dispose=function(){if(this.getRoot()._origin!==z.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&Ae(this,e,!1),!this.children.some((function(t){return t.id===e.id}))){e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:v.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&Ae(this,e,!0),!this.accessories.some((function(t){return t.id===e.id}))){e.root=void 0,e._parent=this,this.accessories.push(e);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:v.ACCESSORY,linkId:e.id})}},e.prototype.getParam=function(e){var t=this.params.get(e);return t&&!t.ref&&(t.ref=this),t},e.prototype.hasParam=function(e){return this.params.has(e)},e.prototype.getBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=P(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:""),o=this.bzProperties.get(i);return o&&!o.ref&&(o.ref=this),o},e.prototype.hasBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=P(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(i)},e.prototype.removeBzProperty=function(e,t){return!!this.hasBzProperty(e,t)&&(this.getBzProperty(e,t).remove(),!0)},e.prototype.toJSON=function(e,t){void 0===t&&(t=!0);var r=t&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,size:r.size,option:r.option,params:Array.from(r.params).map((function(e){var t=q(e,2);return[t[0],t[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(e){var t=q(e,2);return[t[0],t[1].toJSON()]})),productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(e){return e.toJSON(void 0,!1)})),accessories:r.accessories.map((function(e){return e.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin,legal:r.legal};return t&&r!==this&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(t){var r=this,n=JSON.parse(t);return function e(t,r,n,i){void 0===r&&(r=new Map);void 0===i&&(i=function(e,t){return new oe(e.option)});var o=i(t,n);o.id=t.id,o.type=t.type,o.name=t.name,o.remark=t.remark,o.position=t.position,o.rotation=t.rotation||t.rotate,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],Z(e[1])]}))),o.bzProperties=new Map((t.bzProperties||[]).map((function(e){return[e[0],(t=e[1],r=new W,Object.assign(r,t),r)];var t,r}))),o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o.toolType=t.toolType,o._origin=t._origin,o._changeMap=t._changeMap,o.legal=t.legal,!t.isRoot&&n&&(o.root=n);r.set(o.id,o);var A=o.isRoot?o:n;if(o.children=t.children.map((function(t){return e(t,r,A||o,i)})),o.accessories=t.accessories.map((function(t){return e(t,r,A||o,i)})),J(o.children,o.accessories).forEach((function(e){return e._parent=o})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(n,void 0,void 0,(function(t,i){return void 0!==n._currentId||i?n._currentId===t.id?r:new e(t.option):(r.option=n.option,r)}))},e.serialize=function(e){return e.serialize()},e.deserialize=function(t){var r=new e;return r.deserialize(t),r},e.prototype.__trackUpdateField=function(e,t,r){var n=this._changeMap.update;n||(n=[]),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&(n.push(e),this._changeMap.update=n)},e.prototype.getParent=function(){var e=this;if(this._parent)return this._parent;var t=function(t){return t.id===e.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var i=n.getChild(),o=n.getAccessory();if(i.some(t)||o.some(t))return this._parent=n,n;r.push.apply(r,J(i)),r.push.apply(r,J(o))}},e.prototype.forceUpdate=function(e){if(void 0===e&&(e=!0),!this.productId)throw new Error("Can't force-update model without productId");if(this._origin!==z.SENSE||!this.isRoot)throw new Error("only the root param models in design support force update!");this._changeMap.forceUpdate=e},e.prototype.getElementId=function(){var e=this.id,t=this.toolType&&V.get(this.toolType),r=this.modelType;return r===m.ASSEMBLY||r===m.TEMPLATE_ASSEMBLY?{id:e,type:w.CustomGroup}:t?{id:e,type:t}:void 0},e}();function Ae(e,t,r){var n=r?"accessory":"child";if([y.PARAM_ASSEMBLY,y.TEMPLATE_ASSEMBLY,y.PARAM_FURNITURE,y.PARAM_PRIMITIVE].includes(e.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model don't support to append "+n+"!");if(t.type===y.TEMPLATE_ASSEMBLY||t.type===y.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(t._origin===z.SENSE||t._origin===z.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(!t.isRoot)throw new Error("Only root model can be append as "+n+"!")}!function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}($||($={})),function(e){e.ORDER="order-mini-app",e.QUOTATION="report-miniapp"}(ee||(ee={})),function(e){e[e.CONFIRMED=0]="CONFIRMED",e[e.ORDERED=1]="ORDERED",e[e.CLAIMED=2]="CLAIMED",e[e.PAY_PENDING=3]="PAY_PENDING",e[e.PAYED=4]="PAYED",e[e.PRODUCTION_SCHEDULING=5]="PRODUCTION_SCHEDULING",e[e.REVIEWED=6]="REVIEWED",e[e.SPLIT_ORDER=7]="SPLIT_ORDER",e[e.RETURNED=8]="RETURNED",e[e.CANCELLED=9]="CANCELLED",e[e.BATCHED=10]="BATCHED",e[e.OPENED_MATERIAL=11]="OPENED_MATERIAL",e[e.EDGE_SEALED=12]="EDGE_SEALED",e[e.HOLES_ARRANGED=13]="HOLES_ARRANGED",e[e.PACKED=14]="PACKED",e[e.WAREHOUSED=15]="WAREHOUSED",e[e.SHIPPED=16]="SHIPPED",e[e.REVIEW_PENDING=17]="REVIEW_PENDING",e[e.CONFIRM_PENDING=18]="CONFIRM_PENDING",e[e.PAY_COLLECT_PENDING=19]="PAY_COLLECT_PENDING",e[e.PAY_COLLECTED=20]="PAY_COLLECTED",e[e.SPLIT_ORDER_PENDING=21]="SPLIT_ORDER_PENDING",e[e.COMPLETED=24]="COMPLETED"}(te||(te={})),function(e){e[e.OTHER=0]="OTHER",e[e.NATURAL=1]="NATURAL",e[e.MODEL_ROOM=2]="MODEL_ROOM",e[e.NEW_MEDIA=3]="NEW_MEDIA",e[e.LIVE=4]="LIVE",e[e.CROSS_COOP=5]="CROSS_COOP",e[e.TELEMARKETING=6]="TELEMARKETING",e[e.OLD_INTRODUCE=7]="OLD_INTRODUCE",e[e.REPURCHASE=8]="REPURCHASE"}(re||(re={})),function(e){e[e.FORWARD=0]="FORWARD",e[e.REVERSE=1]="REVERSE"}(ne||(ne={})),function(e){e.AUDIT_PASS="audit_pass",e.AUDIT_REJECT="audit_reject",e.RESUBMIT="resubmit"}(ie||(ie={}));var ae,se,ue,ce,le,ge;new Map([[ie.AUDIT_PASS,"pass"],[ie.AUDIT_REJECT,"reject"],[ie.RESUBMIT,"resubmit"]]);!function(e){e[e.AUDIT=2]="AUDIT"}(ae||(ae={})),function(e){e[e.AUDIT=0]="AUDIT"}(se||(se={})),function(e){e.PASS="pass",e.REJECT="reject",e.RESUBMIT="resubmit",e.CREATE="create",e.ARRAIGNED="arraigned",e.CLAIM="claim",e.SEND_BACK="sendBack",e.CANCEL="cancel",e.PAY_REGISTER="payRegister",e.PAY_COLLECT_CONFIRM="payCollectConfirm",e.SPLIT_ORDER_CONFIRM="splitOrderConfirm",e.GEN_BATCH="genBatch",e.PREPARE_MATERIAL_CONFIRM="prepareMaterialConfirm",e.OPEN_MATERIAL_CONFIRM="openMaterialConfirm",e.EDGE_SEALED_CONFIRM="edgeSealedConfirm",e.HOLES_ARRANGED_CONFIRM="holesArrangedConfirm",e.PICK_CONFIRM="pickConfirm",e.PACKED_CONFIRM="packedConfirm",e.WAREHOUSED_CONFIRM="warehousedConfirm",e.SHIPPED_CONFIRM="shippedConfirm",e.COMPLETED_CONFIRM="COMPLETED_CONFIRM",e.REVOKE="revoke"}(ue||(ue={})),function(e){e[e.CUSTOMER_NAME=1]="CUSTOMER_NAME",e[e.CUSTOMER_PHONE=2]="CUSTOMER_PHONE",e[e.CUSTOMER_ADDR=3]="CUSTOMER_ADDR"}(ce||(ce={})),function(e){e[e.MYSELF=1]="MYSELF",e[e.ALL=2]="ALL"}(le||(le={})),function(e){e.API_CALL="API_CALL"}(ge||(ge={}));var fe,he,pe,de,Ie=function(){function e(){}return e.getEvent=function(){return e._event},e.setEvent=function(t){e._event=t},e.emitApiCalledEvent=function(t){var r=e.getEvent();r&&r.emit(t)},e.collectSyncApiData=function(e,t,r){return function(n){var i={apiName:e.name,status:!0,args:r};try{var o=performance.now(),A=e.apply(t,r),a=performance.now();return i.return=A,i.duration=Math.floor(a-o),A}catch(e){throw i.status=!1,i.errMsg=e,e}finally{n(i)}}},e.collectAsyncApiData=function(e,t,r){return function(n){return H(void 0,void 0,void 0,(function(){var i,o,A,a,s;return K(this,(function(u){switch(u.label){case 0:i={apiName:e.name,status:!0,args:r},u.label=1;case 1:return u.trys.push([1,3,4,5]),o=performance.now(),[4,e.apply(t,r)];case 2:return A=u.sent(),a=performance.now(),i.return=A,i.duration=Math.floor(a-o),[2,A];case 3:throw s=u.sent(),i.status=!1,i.errMsg=s,s;case 4:return n(i),[7];case 5:return[2]}}))}))}},e.observeAsyncApiDeco=function(t){return function(r,n,i){var o=i.value,A=function(r){e.emitApiCalledEvent(Y(Y(Y({},r),{apiName:r.apiName||n}),t))};return i.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return H(this,void 0,void 0,(function(){var r;return K(this,(function(n){switch(n.label){case 0:return r=this,[4,e.collectAsyncApiData(o,r,t)(A)];case 1:return[2,n.sent()]}}))}))},i}},e.observeSyncApiDeco=function(t){return function(r,n,i){var o=i.value;r.constructor.name;var A=function(r){e.emitApiCalledEvent(Y(Y(Y({},r),{apiName:r.apiName||n}),t))};return i.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this,i=e.collectSyncApiData(o,n,t)(A);return i},i}},e.observeSyncApiWrap=function(t){return function(r,n){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return e.collectSyncApiData(r,n||this,i)((function(r){e.emitApiCalledEvent(Y(Y({},r),t))}))}}},e.observeAsyncApiWrap=function(t){return function(r,n){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return H(this,void 0,void 0,(function(){return K(this,(function(o){return[2,e.collectAsyncApiData(r,n||this,i)((function(r){e.emitApiCalledEvent(Y(Y({},r),t))}))]}))}))}}},e}();!function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW",e[e.CABINET_COPY=4]="CABINET_COPY",e[e.WARDROBE_COPY=5]="WARDROBE_COPY",e[e.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(fe||(fe={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(he||(he={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(pe||(pe={})),function(e){e.ZH_CN="zh_CN",e.EN_US="en_US",e.DE_DE="de_DE",e.FR_FR="fr_FR",e.JA_JP="ja_JP",e.ZH_TW="zh_TW",e.RU_RU="ru_RU",e.KO_KR="ko_KR",e.ES_ES="es_ES",e.AR_EG="ar_EG",e.EN_CN="en_CN",e.VI="vi"}(de||(de={}));var ye,Ce,Ee,Be="$$geometry_color",ve="$$geometry_opacity",me=[596,2048,2049];!function(e){e.CUSTOM="custom",e.TOP_MODEL="top_model",e.ACCESSORY="accessory",e.PRODUCT="product"}(ye||(ye={})),function(e){e.CLICK="click",e.DB_CLICK="double_click"}(Ce||(Ce={})),function(e){e.PARAM_MODEL="param_model",e.PARAM_MODEL_ASSEMBLY="param_model_assembly",e.FITTING_MODEL="fitting_model"}(Ee||(Ee={}));var Qe,be,_e=["0","1","2","3","4","5","6","7","8","9","ctrl","alt","shift","up","right","down","left","tab","enter","capslock","esc","backspace","space","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","~","!","@","#","$","%","^","&","*","(",")","_","+",":",'"',"<",">","?",",","`","-","=","[","]","\\",";","'",",",".","/"];!function(e){e.INNER="inner",e.OUTER="outer"}(Qe||(Qe={})),function(e){e.PARAM_MODEL="paramModel",e.PARAM_MODEL_ASSEMBLY="paramModelAssembly",e.HOLE="hole",e.GROOVE="groove",e.HARDWARE="hardware",e.HARDWARE_GROOVE="hardwareGroove"}(be||(be={}));var Se=r(68),we=r.n(Se),De=r(98),Re=r.n(De),Me=r(44),xe=r.n(Me),Pe=r(288),Te=r.n(Pe),Fe=r(5),Le=r.n(Fe),Oe=r(47);function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ge(e,t){return(Ge=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ve(e);if(t){var i=Ve(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return je(this,r)}}function je(e,t){return!t||"object"!==ke(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ve(e){return(Ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ye=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ge(e,t)}(r,e);var t=Ue(r);function r(){return Ne(this,r),t.apply(this,arguments)}return r}(Oe.CoreCustom),He=r(360),Ke=r(99),qe=r.n(Ke),Je=r(1117);function We(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ze(e,t,r){return(ze="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=et(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Xe(e,t){return(Xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=et(e);if(t){var i=et(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $e(this,r)}}function $e(e,t){return!t||"object"!==tt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tt(e){return(tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var rt,nt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":tt(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},it=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":tt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ot=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xe(e,t)}(o,e);var t,r,n,i=Ze(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).doc=new He.CDoc,e.versionStore=new Je.VersionStore,e.setCustom(new Ye),e.setContextProvider(e.doc.getElementContext),e}return t=o,(r=[{key:"compareVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;return ze(et(o.prototype),"compareVersion",this).call(this,e)&&this.custom.compareVersion(e)}},{key:"exportVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;e.clear(),ze(et(o.prototype),"exportVersion",this).call(this,e),this.custom.exportVersion(e)}},{key:"getDoc",value:function(){return this.doc}},{key:"getCustom",value:function(){return this.custom}},{key:"setCustom",value:function(e){return this.custom&&this.custom.setContextProvider(),this.custom=e.setContextProvider(this.provideContext),this}}])&&We(t.prototype,r),n&&We(t,n),o}(qe.a);nt([Object(Ke.property)(),it("design:type","function"==typeof(rt=void 0!==Ye&&Ye)?rt:Object)],ot.prototype,"custom",void 0);var At=r(107),at=r.n(At);function st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ut(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ct(e,t){return(ct=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ft(e);if(t){var i=ft(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gt(this,r)}}function gt(e,t){return!t||"object"!==ht(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ht(e){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var pt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ht(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},dt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":ht(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},It=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ct(e,t)}(o,e);var t,r,n,i=lt(o);function o(){var e;return st(this,o),(e=i.apply(this,arguments)).linkedIds=[],e}return t=o,(r=[{key:"getCustom",value:function(){return this.custom}},{key:"setIsAppendHardware",value:function(e){this.isAppendHardware=e}},{key:"setLinkedIds",value:function(e){this.linkedIds=e}},{key:"setHardwareData",value:function(e){this.hardwareData=e}}])&&ut(t.prototype,r),n&&ut(t,n),o}(at.a);function yt(e){return(yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Et(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Bt(e,t){return(Bt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Qt(e);if(t){var i=Qt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return mt(this,r)}}function mt(e,t){return!t||"object"!==yt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qt(e){return(Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}pt([Object(Ke.property)(),dt("design:type",Boolean)],It.prototype,"isAppendHardware",void 0);var bt,_t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bt(e,t)}(o,e);var t,r,n,i=vt(o);function o(){return Ct(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"paramModelConstructor",get:function(){return It}}])&&Et(t.prototype,r),n&&Et(t,n),o}(Oe.CoreParamModelAssembly),St=r(97),wt=new St.EventEmitter;!function(e){e.FITTING_MODEL_CHANGE="fittingModelChange",e.SELECTION_SERVICE_MODEL_CHANGE="selectionServiceModelChange",e.SELECTION_SERVICE_V2_MODEL_CHANGE="selectionServiceV2ModelChange",e.PLANK_FACE_CLICK="plankFaceClick",e.PLANK_FACE_HOVER="plankFaceHover",e.API_CALLED="apiCalled"}(bt||(bt={}));var Dt=r(34),Rt=r(2),Mt=r(526),xt=Object(Mt.createKElementBaseClass)(),Pt=Dt.advanced.reportObserved,Tt=Dt.advanced.reportChanged;function Ft(e){return function(e){if(Array.isArray(e))return Lt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Lt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ot(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kt(e,t){return(kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ut(e);if(t){var i=Ut(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Gt(this,r)}}function Gt(e,t){return!t||"object"!==jt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jt(e){return(jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}xt.onGet=function(e){Pt(e)},xt.addSetHook((function(e){Tt(e)}));var Vt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":jt(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Yt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":jt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function Ht(e,t,r){var n=r.value;r.value=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=n.apply(this,t);return wt.emit(bt.FITTING_MODEL_CHANGE),i}}var Kt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kt(e,t)}(o,e);var t,r,n,i=Nt(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).setFittings([]),e.setIntersects([]),e.setGrooveFittings([]),e.setPlankFaceHintModels([]),e.setFittingHintModels([]),e.setPlankOutlineHintModels([]),e}return t=o,(r=[{key:"getFittings",value:function(e){if(e){if("ids"in e)return this.fittings.filter((function(t){return e.ids.includes(t.id)}));if("types"in e)return this.fittings.filter((function(t){return e.types.includes(t.type)}))}return this.fittings}},{key:"setFittings",value:function(e){this.fittings=e}},{key:"addFittings",value:function(e){this.fittings=[].concat(Ft(e),Ft(this.fittings))}},{key:"removeFittings",value:function(e){var t=Object(Rt.difference)(this.fittings,this.getFittings(e));this.setFittings(t)}},{key:"setIntersects",value:function(e){this.intersects=e}},{key:"getIntersects",value:function(){return this.intersects}},{key:"setGrooveFittings",value:function(e){this.grooveFittings=e}},{key:"addGrooveFittings",value:function(e){this.grooveFittings=[].concat(Ft(this.grooveFittings),Ft(e))}},{key:"getGrooveFittings",value:function(){return this.grooveFittings}},{key:"setPlankFaceHintModels",value:function(e){this.plankFaceHintModels=e}},{key:"getPlankFaceHintModels",value:function(){return this.plankFaceHintModels}},{key:"setFittingHintModels",value:function(e){this.fittingHintModels=e}},{key:"getFittingHintModels",value:function(){return this.fittingHintModels}},{key:"setPlankOutlineHintModels",value:function(e){this.plankOutlineHintModels=e}},{key:"getPlankOutlineHintModels",value:function(){return this.plankOutlineHintModels}}])&&Ot(t.prototype,r),n&&Ot(t,n),o}(xt);Vt([Dt.observable,Yt("design:type",Array)],Kt.prototype,"fittings",void 0),Vt([Dt.observable,Yt("design:type",Array)],Kt.prototype,"intersects",void 0),Vt([Dt.observable,Yt("design:type",Array)],Kt.prototype,"grooveFittings",void 0),Vt([Dt.observable,Yt("design:type",Array)],Kt.prototype,"plankFaceHintModels",void 0),Vt([Dt.observable,Yt("design:type",Array)],Kt.prototype,"fittingHintModels",void 0),Vt([Dt.observable,Yt("design:type",Array)],Kt.prototype,"plankOutlineHintModels",void 0),Vt([Ht,Yt("design:type",Function),Yt("design:paramtypes",[Array]),Yt("design:returntype",void 0)],Kt.prototype,"setFittings",null),Vt([Ht,Yt("design:type",Function),Yt("design:paramtypes",[Array]),Yt("design:returntype",void 0)],Kt.prototype,"addFittings",null),Vt([Ht,Yt("design:type",Function),Yt("design:paramtypes",[Object]),Yt("design:returntype",void 0)],Kt.prototype,"removeFittings",null),Vt([Ht,Yt("design:type",Function),Yt("design:paramtypes",[Array]),Yt("design:returntype",void 0)],Kt.prototype,"setGrooveFittings",null),Vt([Ht,Yt("design:type",Function),Yt("design:paramtypes",[Array]),Yt("design:returntype",void 0)],Kt.prototype,"addGrooveFittings",null);var qt=r(30),Jt=r.n(qt),Wt=r(100),zt=r.n(Wt);function Xt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Zt(e,t){return(Zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $t(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=tr(e);if(t){var i=tr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return er(this,r)}}function er(e,t){return!t||"object"!==rr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tr(e){return(tr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rr(e){return(rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var nr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":rr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ir=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":rr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},or=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zt(e,t)}(o,e);var t,r,n,i=$t(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).id=zt()(),t.linkModel=e.linkModel,t.hintOutline=e.hintOutline,t.visible=e.linkModel instanceof at.a?!e.linkModel.getInvisible():e.linkModel.visible,t}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}}])&&Xt(t.prototype,r),n&&Xt(t,n),o}(xt);function Ar(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ar(e,t){return(ar=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=cr(e);if(t){var i=cr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ur(this,r)}}function ur(e,t){return!t||"object"!==lr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cr(e){return(cr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function lr(e){return(lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}nr([Jt.a,ir("design:type",String)],or.prototype,"id",void 0),nr([Jt.a,ir("design:type",Object)],or.prototype,"linkModel",void 0),nr([Jt.a,ir("design:type","function"!=typeof!1&&Object)],or.prototype,"hintOutline",void 0),nr([Jt.a,ir("design:type",Boolean)],or.prototype,"visible",void 0);var gr,fr,hr,pr,dr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":lr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Ir=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":lr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},yr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ar(e,t)}(o,e);var t,r,n,i=sr(o);function o(e,t,r,n){var A;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(A=i.call(this)).fittingData=n,A.visible=!1,A.viewColor=0,A.opacity=1;var a=r.position,s=r.size,u=r.rotate,l=r.height,g=r.boundingBox;return A.id=e||zt()(),A.position=a instanceof Le.a?a:new Le.a(a),A.size=s instanceof Le.a?s:new Le.a(s),A.rotate=u instanceof Le.a?u:new Le.a(s),A.height=l,A.type="fittingType"in n?n.fittingType:c.INTERSECTED,A.visible=A.type!==c.INTERSECTED,A.linkParamModelId=t,A.boundingBox=g,A}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}}])&&Ar(t.prototype,r),n&&Ar(t,n),o}(xt);dr([Jt.a,Ir("design:type",String)],yr.prototype,"id",void 0),dr([Jt.a,Ir("design:type","function"==typeof(gr=void 0!==Le.a&&Le.a)?gr:Object)],yr.prototype,"position",void 0),dr([Jt.a,Ir("design:type","function"==typeof(fr=void 0!==Le.a&&Le.a)?fr:Object)],yr.prototype,"size",void 0),dr([Jt.a,Ir("design:type",Number)],yr.prototype,"height",void 0),dr([Jt.a,Ir("design:type","function"==typeof(hr=void 0!==c&&c)?hr:Object)],yr.prototype,"type",void 0),dr([Jt.a,Ir("design:type","function"==typeof(pr=void 0!==Le.a&&Le.a)?pr:Object)],yr.prototype,"rotate",void 0),dr([Jt.a,Ir("design:type",Number)],yr.prototype,"radius",void 0),dr([Jt.a,Ir("design:type",Object)],yr.prototype,"visible",void 0),dr([Jt.a,Ir("design:type",Object)],yr.prototype,"viewColor",void 0),dr([Jt.a,Ir("design:type",Object)],yr.prototype,"opacity",void 0);var Cr=r(16),Er=r.n(Cr);function Br(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Qr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.length=0,this.clockwise=t.clockwise,this.type=t.type,this.radius=t.radius,this.minorArc=t.minorArc,this.majorRadius=t.majorRadius,this.minorRadius=t.minorRadius,this.ellipseCenter=t.ellipseCenter,this.path=r,this.id=zt()()}var t,r,n;return t=e,(r=[{key:"getType",value:function(){return this.type}},{key:"getVector",value:function(){var e=this.start,t=this.end;return e&&t?function(e,t){return new u.Vector2d(t.x-e.x,t.y-e.y)}(e.getPosition(),t.getPosition()):new u.Vector2d}},{key:"getRealLine",value:function(){var e=Br(this.start.getPointsForRender(),2)[1],t=Br(this.end.getPointsForRender(),1)[0];return this.getType()===S.SEGMENT?new u.LineSeg2d(e,t):this.getType()===S.ELLIPSE_ARC?this.getEllipseLine():this.getCurveLine()}},{key:"getEllipseLine",value:function(){var e=new u.CCS2d(new u.Point2d(this.ellipseCenter.x,this.ellipseCenter.y),new u.Vector2d(1,0)),t=new u.Ellipse2d(e,this.majorRadius,this.minorRadius);return u.EllipticalArc2d.makeByStartEndPoints(t,this.start.getPosition(),this.end.getPosition(),!this.clockwise)}},{key:"getCurveLine",value:function(){var e=this.start,t=this.end;if(this.getType()!==S.CIRCLE_ARC)return new u.LineSeg2d(e.getPosition(),t.getPosition());var r,n,i,o,A,a,s,c,l,g,f,h=this.getVector().length/2;return this.radius<h&&(this.radius=h),r=this.radius,n=e.getPosition(),i=t.getPosition(),o=this.minorArc,A=this.clockwise,a=new u.LineSeg2d(n,i),s=a.length/2,c=a.getPoint(s),l=Math.sqrt(r*r-s*s),g=(A?o?a.rightNormal:a.leftNormal:o?a.leftNormal:a.rightNormal).multiplied(l/a.leftNormal.length),f=c.added(g),u.Arc2d.makeArcByStartEndPoints(f,n,i,!A)}},{key:"getLineLength",value:function(){var e=this.getRealLine();return e?new u.LineSeg2d(e.startPoint,e.endPoint).length:0}},{key:"getNormalLineLength",value:function(){return this.start&&this.end?this.start.getPosition().distanceTo(this.end.getPosition()):0}},{key:"getRenderPoints",value:function(){return[Br(this.start.getPointsForRender(),2)[1],Br(this.end.getPointsForRender(),1)[0]]}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(e){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,e),this.hint=e}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&mr(t.prototype,r),n&&mr(t,n),e}();function br(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _r(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Sr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var wr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clockwise=!!t.clockwise,this.type=t.type,this.position=new u.Point2d(t.position),this.radius=t.radius,this.cornerCutDistance=t.cornerCutDistance,this.path=r,this.majorRadius=t.majorRadius,this.minorRadius=t.minorRadius,this.offset=new u.Vector2d(t.offset||{x:0,y:0}),this.id=zt()()}var t,r,n;return t=e,(r=[{key:"getPosition",value:function(){return this.position}},{key:"getType",value:function(){return this.type}},{key:"getLineLength",value:function(){if(this.getType()===_.NONE)return 0;var e=this.getCurveLineAndPoints().curveLine;return new u.LineSeg2d(e.startPoint,e.endPoint).length}},{key:"getCurveLineAndPoints",value:function(){var e=this.clockwise,t=this.prevLine,r=this.nextLine,n=this.offset,i=this.getType(),o=this.getPosition(),A=this.getPointsForRender(),a=br(A,2),s=a[0],c=a[1];if(i===_.CIRCLE||i===_.CUT_CIRCLE){if(i===_.CIRCLE){var l=t.getVector().getPerpVector(),g=r.getVector().getPerpVector();if(l.isParallel(g))return{curveLine:u.Arc2d.makeArcByStartEndPoints(s,s,c,!0),renderPoints:A};var f=new u.Line2d(s,l),h=new u.Line2d(c,g),p=br(f.intersectCurve(h),1)[0];if(!p)return{curveLine:new u.LineSeg2d(s,c),renderPoints:A};var d=u.Arc2d.makeArcByStartEndPoints(p.point,s,c,!1);return this.radius=void 0===this.radius?d.radius:this.radius,Math.abs(d.arcAngle)>Math.PI&&(d=u.Arc2d.makeArcByStartEndPoints(p.point,s,c,!0)),{curveLine:d,renderPoints:A}}return{curveLine:u.Arc2d.makeArcByStartEndPoints(o.added(n),s,c,!e),renderPoints:A}}if(i===_.ELLIPSE){var I=o.added(n),y=new u.CCS2d(new u.Point2d(I.x,I.y),new u.Vector2d(1,0)),C=new u.Ellipse2d(y,this.majorRadius,this.minorRadius);return{curveLine:u.EllipticalArc2d.makeByStartEndPoints(C,s,c,!e),renderPoints:A}}return{curveLine:new u.LineSeg2d(s,c),renderPoints:A}}},{key:"getPointsForRender",value:function(){var e=this.radius,t=this.prevLine,r=this.nextLine,n=this.cornerCutDistance,i=void 0===n?[0,0]:n,o=this.offset,A=this.getType(),a=this.getPosition();if(A===_.NONE)return[a,a];if(!t||!r)return[a,a];var s=new u.Ray2d(t.end.getPosition(),t.getVector().reversed()),c=new u.Ray2d(r.start.getPosition(),r.getVector());if(A===_.LINE)return[s.getPoint(i[0]),c.getPoint(i[1])];if(A===_.CIRCLE){if(void 0!==e){var l=s.direction,g=c.direction,f=l.angleTo(g),h=Math.abs(e/Math.tan(f/2));return[s.getPoint(h),c.getPoint(h)]}if(i)return[s.getPoint(i[0]),c.getPoint(i[0])]}if(A===_.CUT_CIRCLE){var p=a.added(o),d=new u.Circle2d(p,e),I=d.intersectCurve(s),y=d.intersectCurve(c);if(I.length&&y.length)return[I[0].point,y[0].point]}if(A===_.ELLIPSE){var C=a.added(o),E=new u.CCS2d(new u.Point2d(C.x,C.y),new u.Vector2d(1,0)),B=new u.Ellipse2d(E,this.majorRadius,this.minorRadius),v=B.intersectCurve(s),m=B.intersectCurve(c);if(v.length&&m.length)return[v[0].point,m[0].point]}return[a,a]}},{key:"getRenderPoints",value:function(){return this.getPointsForRender()}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(e){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,e),this.hint=e}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&Sr(t.prototype,r),n&&Sr(t,n),e}();function Dr(e){return function(e){if(Array.isArray(e))return xr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Mr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rr(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Mr(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Mr(e,t){if(e){if("string"==typeof e)return xr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xr(e,t):void 0}}function xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Tr=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._points=[],this._lines=[],this.getAllPolygonPoints=function(){return r.getPoints().reduce((function(e,t,r){t.getType()===_.NONE&&(e=e.concat(t.getPosition())),t.getType()===_.LINE&&(e=e.concat(t.getPointsForRender())),t.getType()!==_.CIRCLE&&t.getType()!==_.CUT_CIRCLE||(e=e.concat(t.getCurveLineAndPoints().curveLine.getApproximatePoints()));var n=t.nextLine;if(!n)return e;if(n.getType()===S.CIRCLE_ARC){var i=n.getCurveLine().getApproximatePoints();e=e.concat(i.slice(1,i.length-1))}return e}),[])},this.getEdges=function(){var e,t=r.getPoints(),n=r.getLines(),i=[],o=Rr(t);try{for(o.s();!(e=o.n()).done;){var A=e.value;A.getType()!==_.NONE&&i.push(A.getCurveLineAndPoints().curveLine)}}catch(e){o.e(e)}finally{o.f()}var a,s=Rr(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;i.push(u.getRealLine())}}catch(e){s.e(e)}finally{s.f()}return i},this.getGlobalTopPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new u.Point3d(e.x,e.y,0).appliedMatrix4(r.matrix4)}))},this.getGlobalBottomPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new u.Point3d(e.x,e.y,-r.depth).appliedMatrix4(r.matrix4)}))};var n=t.type,i=t.points,o=void 0===i?[]:i,A=t.lines,a=void 0===A?[]:A,s=t.forceCCW,c=void 0===s||s,l=t.depth,g=t.matrix4,f=t.offset;if(this.id=zt()(),this.type=n,this.depth=l,this.matrix4=g,this.offset=f,this.setPoints(o),this.setLines(a),this.linkPointsAndLines(),c){var h=u.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));h.isSelfIntersect()||h.isCCW()||this.turnover()}this.forceCCW=c,this.adjustClockwise()}var t,r,n;return t=e,(r=[{key:"points",get:function(){return this._points},set:function(e){this.setPoints(e)}},{key:"getPoints",value:function(){return this._points}},{key:"setPoints",value:function(e){var t=this;this._points=e,e.forEach((function(e){e.path=t})),this.adjustClockwise()}},{key:"lines",get:function(){return this.getLines()},set:function(e){this.setLines(e)}},{key:"getLines",value:function(){return this._lines}},{key:"setLines",value:function(e){var t=this;this._lines=e,e.forEach((function(e){e.path=t})),this.adjustClockwise()}},{key:"turnover",value:function(){if(!this.forceCCW||!this.isClosedPath()){if(this.isClosedPath()){this.setPoints(this.getPoints().slice().reverse().map((function(e){return e.clockwise=!e.clockwise,e})));var e=this.getLines().slice().reverse().map((function(e){return e.clockwise=!e.clockwise,e}));this.setLines(e.slice(1).concat(e[0]))}else this.setPoints(this.getPoints().slice().reverse()),this.setLines(this.getLines().slice().reverse());this.linkPointsAndLines()}}},{key:"isClosedPath",value:function(){return this.getLines().length===this.getPoints().length}},{key:"linkPointsAndLines",value:function(){var e=this,t=this.getLines(),r=this.getPoints();r.forEach((function(e){e.prevLine=void 0,e.nextLine=void 0})),t.forEach((function(n,i){n.start=void 0,n.end=void 0;var o,A=r[i];o=i===t.length-1&&e.isClosedPath()?r[0]:r[i+1],n.path=e,A.path=e,o.path=e,A.nextLine=n,o.prevLine=n,n.start=A,n.end=o}))}},{key:"getAllRenderPoints",value:function(){var e=[];return this.getPoints().forEach((function(t){t.getType()!==_.NONE?e.push.apply(e,Dr(t.getPointsForRender())):e.push(t.getPosition())})),e}},{key:"getAllRealPathCurves",value:function(){var e=[];return this.getLines().forEach((function(t){var r,n;if((null===(r=t.start)||void 0===r?void 0:r.getType())!==_.NONE){var i=null===(n=t.start)||void 0===n?void 0:n.getCurveLineAndPoints().curveLine;i&&e.push(i)}var o=t.getRealLine();e.push(o)})),e}},{key:"transformPathToFace2D",value:function(){var e={loops:[]};return e.loops.push(this.getAllRealPathCurves()),e}},{key:"transformPathToGeomLoop2d",value:function(){return new u.GeomLoop2d(this.getAllRealPathCurves())}},{key:"computeBoundingBox",value:function(){var e=new u.BBox2d;return this.getPoints().forEach((function(t){t.getType()!==_.NONE&&e.merge(t.getCurveLineAndPoints().curveLine.getBounding())})),this.getLines().forEach((function(t){e.merge(t.getRealLine().getBounding())})),e}},{key:"adjustClockwise",value:function(){if(this.forceCCW&&this.isClosedPath()){var e=u.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));if(!e.isSelfIntersect()&&!e.isCCW()){this.setPoints(this.getPoints().slice().reverse());var t=this.getLines().slice().reverse();this.setLines(t.slice(1).concat(t[0]).map((function(e){return e.type===S.CIRCLE_ARC&&(e.clockwise=!e.clockwise),e}))),this.linkPointsAndLines()}}}},{key:"getAllCurves",value:function(){var e=this.getPoints(),t=this.getLines(),r=function(e){return{curve:e.getRealLine(),source:e}};return e.reduce((function(e,n,i){var o;n.getType()!==_.NONE&&(o={curve:n.getCurveLineAndPoints().curveLine,source:n});var A=o?[o]:[];return e.concat(t[i]?[].concat(A,[r(t[i])]):[].concat(A))}),[]).concat(t.slice(e.length).map(r))}},{key:"getRedundantPoints",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getPoints().length;if(n<=3)return[];var i=this.getPoints().indexOf(e);if(-1===i)return[];var o=[];return(r?[1]:[1,-1]).forEach((function(r){var A=(i+r+n)%n,a=t.getPoints()[A];e.getPosition().isEqual(a.getPosition(),1)&&(a.nextLine.getType()!==S.SEGMENT?o.push(e):o.push(a))})),o}},{key:"getRenderPoints",value:function(){var e=[];return this.points.forEach((function(t){t.getType()===_.NONE?e.push(t.getPosition()):e.push.apply(e,Dr(t.getRenderPoints()))})),e}}])&&Pr(t.prototype,r),n&&Pr(t,n),e}();function Fr(e,t){var r=t.paramPoints.map((function(e){return new wr(e)})),n=t.paramPathLines.map((function(e){return new Qr(e)}));return new Tr({type:e,offset:t.offset,points:r,lines:n,forceCCW:!1})}function Lr(e){return function(e){if(Array.isArray(e))return Or(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Or(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Or(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Or(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Nr(e,t){return(Nr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=jr(e);if(t){var i=jr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ur(this,r)}}function Ur(e,t){return!t||"object"!==Vr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vr(e){return(Vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Yr,Hr,Kr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Vr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},qr=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Vr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Jr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nr(e,t)}(o,e);var t,r,n,i=Gr(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).viewColor=0,t.visible=!1;var r=e.data,n=e.path,A=e.model;return t.id=r.id,t.type=c.HARDWARE_GROOVE,t.path=n,t.depth=r.depth,t.model=A,t.linkParamModelId=A.id,t.fittingData=r,t}return t=o,(r=[{key:"getTopRenderPoints",value:function(){var e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(t){return new u.Point3d(t.x,t.y,0).appliedMatrix4(e)}))}},{key:"getBottomRenderPoints",value:function(){var e=this,t=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(r){return new u.Point3d(r.x,r.y,-e.depth).appliedMatrix4(t)}))}},{key:"pointToGlobalMatrix",value:function(){var e=new u.Matrix4,t=this.model.getSize();return e.fromArray(Lr(this.model.getConcatenatedMatrix().multiply((new xe.a).makeTranslation(new Le.a(-t.x/2,t.y/2,-t.z/2))).elements.values())),e.multiplied(this.path.matrix4)}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}},{key:"setVisible",value:function(e){this.visible=e}}])&&kr(t.prototype,r),n&&kr(t,n),o}(xt);Kr([Jt.a,qr("design:type",String)],Jr.prototype,"id",void 0),Kr([Jt.a,qr("design:type",Object)],Jr.prototype,"viewColor",void 0),Kr([Jt.a,qr("design:type",Object)],Jr.prototype,"visible",void 0),Kr([Jt.a,qr("design:type","function"==typeof(Yr=void 0!==c&&c)?Yr:Object)],Jr.prototype,"type",void 0),Kr([Jt.a,qr("design:type","function"==typeof(Hr=void 0!==Tr&&Tr)?Hr:Object)],Jr.prototype,"path",void 0),Kr([Jt.a,qr("design:type",Number)],Jr.prototype,"depth",void 0),Kr([Jt.a,qr("design:type",Number)],Jr.prototype,"opacity",void 0);var Wr=r(142),zr=r.n(Wr);function Xr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Zr(e,t){return(Zr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=tn(e);if(t){var i=tn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return en(this,r)}}function en(e,t){return!t||"object"!==rn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tn(e){return(tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rn(e){return(rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var nn,on,An,an,sn,un=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":rn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},cn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":rn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ln=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zr(e,t)}(o,e);var t,r,n,i=$r(o);function o(e,t,r,n,A,a,s){var u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(u=i.call(this)).viewColor=0,u.id=e||zt()(),u.position=r instanceof Le.a?r:new Le.a(r),u.size=A instanceof Le.a?A:new Le.a(A),u.rotate=n instanceof Le.a?n:new Le.a(A),u.type=t,u.geometryModel=a,u.originPoints=s,u}return t=o,(r=[{key:"setViewColor",value:function(e){this.viewColor=e}}])&&Xr(t.prototype,r),n&&Xr(t,n),o}(xt);function gn(e,t){return(gn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pn(e);if(t){var i=pn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hn(this,r)}}function hn(e,t){return!t||"object"!==dn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pn(e){return(pn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function dn(e){return(dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}un([Jt.a,cn("design:type",String)],ln.prototype,"id",void 0),un([Jt.a,cn("design:type","function"==typeof(nn=void 0!==l&&l)?nn:Object)],ln.prototype,"type",void 0),un([Jt.a,cn("design:type","function"==typeof(on=void 0!==Le.a&&Le.a)?on:Object)],ln.prototype,"position",void 0),un([Jt.a,cn("design:type","function"==typeof(An=void 0!==Le.a&&Le.a)?An:Object)],ln.prototype,"size",void 0),un([Jt.a,cn("design:type","function"==typeof(an=void 0!==Le.a&&Le.a)?an:Object)],ln.prototype,"rotate",void 0),un([Jt.a,cn("design:type","function"==typeof(sn=void 0!==zr.a&&zr.a)?sn:Object)],ln.prototype,"geometryModel",void 0),un([Jt.a,cn("design:type",Array)],ln.prototype,"originPoints",void 0),un([Jt.a,cn("design:type",Object)],ln.prototype,"viewColor",void 0);var In=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":dn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},yn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":dn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Cn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gn(e,t)}(r,e);var t=fn(r);function r(e){var n,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).id=null!==(i=e.id)&&void 0!==i?i:zt()(),n.linkModel=e.linkModel,n.plankFaces=e.plankFaces,n.hintOutline=e.hintOutline,n}return r}(xt);function En(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Bn(e,t){return(Bn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Qn(e);if(t){var i=Qn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return mn(this,r)}}function mn(e,t){return!t||"object"!==bn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bn(e){return(bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}In([Jt.a,yn("design:type",String)],Cn.prototype,"id",void 0);var _n=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":bn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Sn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":bn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},wn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bn(e,t)}(o,e);var t,r,n,i=vn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=i.call(this);var r=e.points,n=e.linkModel,A=e.color,a=e.opacity,s=e.height,u=e.id;return t.id=u,t.visible=!0,t.viewColor=A,t.opacity=a,t.points=r,t.height=s,t.linkModel=n,t}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}}])&&En(t.prototype,r),n&&En(t,n),o}(xt);function Dn(e,t){var r=[0,0,0];return 0===e?r[2]=1:1===e?r[0]=-1:2===e?r[1]=-1:3===e?r[0]=1:4===e?r[1]=1:5===e&&(r[2]=-1),t?new t({x:r[0],y:r[1],z:r[2]}):{x:r[0],y:r[1],z:r[2]}}_n([Jt.a,Sn("design:type",String)],wn.prototype,"id",void 0),_n([Jt.a,Sn("design:type",Object)],wn.prototype,"linkModel",void 0),_n([Jt.a,Sn("design:type",Object)],wn.prototype,"viewColor",void 0),_n([Jt.a,Sn("design:type",Number)],wn.prototype,"opacity",void 0),_n([Jt.a,Sn("design:type",Boolean)],wn.prototype,"visible",void 0),_n([Jt.a,Sn("design:type",Array)],wn.prototype,"points",void 0),_n([Jt.a,Sn("design:type",Number)],wn.prototype,"height",void 0);var Rn=[new u.Vector3d({x:1,y:0,z:0}),new u.Vector3d({x:0,y:1,z:0}),new u.Vector3d({x:0,y:0,z:1})];function Mn(e){return!(!e||e.fittingType!==c.HOLE)}function xn(e){return!(!e||e.fittingType!==c.GROOVE)}function Pn(e,t,r){var n,i,o=r.holeColor,A=r.grooveColor,a=r.holeOpacity,s=r.grooveOpacity,c=function(e,t){var r,n,i=t.start,o=t.end,A=t.plankFaceId,a=e.getSize(),s=(new xe.a).makeTranslation(new Le.a(-a.x/2,a.y/2,-a.z/2)),c=e.getConcatenatedMatrix().multiply(s),l=new u.Point3d(i),g=new u.Point3d(o),f=new u.LineSeg3d(l,g),h=f.getPoint(f.length/2),p=new Le.a(h).applyMatrix4(c);if(Mn(t)){var d=t.diameter;r=new Le.a(d,f.length,d),n=Le.a.Y_AXIS}if(xn(t)){var I=t.width,y=t.depth;[0,5].includes(A)?(r=new Le.a(I,f.length,y),n=Le.a.Y_AXIS):[2,4].includes(A)?(r=new Le.a(I,y,f.length),n=Le.a.Z_AXIS):[1,3].includes(A)&&(r=new Le.a(y,I,f.length),n=Le.a.Z_AXIS)}var C=new Le.a(o).sub(new Le.a(i)).normalize(),E=(new Te.a).setFromTwoVectors(n,C),B=c.clone().multiply((new xe.a).makeRotationFromQuaternion(E)),v=new Le.a((new Re.a).setFromRotationMatrix(B)),m=new we.a(r,p,v);return new yr(t.id,e.id,{position:p,size:r,rotate:v,height:f.length,boundingBox:m},t)}(t,e);Mn(e)?(n=o,i=a):xn(e)&&(n=A,i=s);var l=e.params||[],g=l.find((function(e){return e.key===Be})),f=l.find((function(e){return e.key===ve}));return c.setVisible(!0),c.setViewColor(g?g.value:n),c.setOpacity(f?Number(f.value):i),c}var Tn=r(719),Fn=r(720),Ln=r(10),On=r(114),kn=r.n(On),Nn=r(141),Gn=r.n(Nn),Un=r(209),jn=r.n(Un),Vn=r(113),Yn=r.n(Vn),Hn=r(210),Kn=r.n(Hn),qn=r(427),Jn=r.n(qn),Wn=r(72),zn=r.n(Wn),Xn=r(188),Zn=r.n(Xn);function $n(e){var t=[];e.shapes.forEach((function(e){var r=e.getTriangles();r&&0!==r.length&&zn.a.addElements(t,r)}));var r=function(e){var t=[];return e.forEach((function(e){return zn.a.addUniqueElements(t,e.points)})),t}(t),n=function(e,t){return e.map((function(e){var r=new Le.a;return r.x=t.indexOf(e.points[0]),r.y=t.indexOf(e.points[1]),r.z=t.indexOf(e.points[2]),r}))}(t,r);return{vertices:r,textures:function(e,t){if(!t){var r=(new Zn.a).includePoints(e);t=new Er.a(r.min.x,r.max.y)}return e.map((function(e){return Er.a.sub(e,t)}))}(r,e.pivot),indices:n}}var ei=new Le.a(0,0,0);function ti(e){var t=e.planeTransform;return function(e){try{var t=$n(e),r=new zr.a;return r.vertices=new Float32Array(Le.a.toFloatArray(e.computeVertices(t.vertices))),r.normals=new Float32Array(Le.a.toFloatArray(e.computeNormals(t.vertices))),r.textures=new Float32Array(Er.a.toFloatArray(t.textures)),r.indices=new Uint16Array(Le.a.toFloatArray(t.indices)),r}catch(e){return void console.error(e)}}({shapes:e.shapes,pivot:e.pivot,computeVertices:function(e){return e.map((function(e){return ei.set(e.x,e.y,0),t.localToWorld(ei)}))},computeNormals:function(e){var r=t.basicZ.clone().normalize();return e.map((function(){return r.clone()}))}})}function ri(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ni(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ni(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function ni(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ii,oi=new Le.a(0,0,0);function Ai(e,t,r){for(var n,i=e.id,o=r.getConcatenatedMatrix(),A=r.getSize(),a=(new xe.a).makeTranslation(new Le.a(-A.x/2,A.y/2,-A.z/2)),s=o.clone().multiply(a),u=t["@type"],c=(n=u===l.SHELL?function(e,t){var r,n=e.shell,i=Tn.fromJson(JSON.parse(n)).map((function(e){return e.getFaces()})).flat().map((function(e){return Fn.triangulate2(e)})),o=new zr.a,A=0,a=[],s=[],u=[],c=[],l=ri(i);try{for(l.s();!(r=l.n()).done;){var g=r.value;a.push(g.vertices.map((function(e){return oi.fromArray(e).applyMatrix4(t).toArray()})).flat()),s.push(g.normals.flat()),u.push(g.uvs.flat()),c.push(g.triangleIndices.flat().map((function(e){return e+A}))),A+=g.vertices.length}}catch(e){l.e(e)}finally{l.f()}return o.vertices=new Float32Array(a.flat()),o.normals=new Float32Array(s.flat()),o.textures=new Float32Array(u.flat()),o.indices=new Float32Array(c.flat()),o}(t,s):ai(t,s)).getBoundingBox3().getCenter(),g=kn.a.decompose(s).rotation,f=kn.a.compose(c,g,Le.a.ONE),h=(new xe.a).getInverse(f),p=new Float32Array(n.vertices),d=new Gn.a,I=0;I<p.length;I+=3)oi.set(p[I],p[I+1],p[I+2]).applyMatrix4(h),d.includePoint(oi);return new ln(i,u,c,g,d.getSize(),n,t.points.map((function(e){return new Le.a(e).applyMatrix4(s)})))}function ai(e,t){var r=e.points.map((function(e){return new Le.a(e).applyMatrix4(t)})),n=(new jn.a).setFromCoplanarPoints(r[0],r[1],r[2]).normal,i=r[1].clone().sub(r[0]).normalize(),o=n.clone().cross(i).normalize(),A=new Jn.a(i,o,n,r[0]),a=r.map((function(e){return new Er.a(A.worldToLocal(e))})),s=new Yn.a(a);return ti({planeTransform:A,shapes:[new Kn.a(s)]})}function si(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ui(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?si(Object(r),!0).forEach((function(t){ci(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):si(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ci(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function li(e,t){var r=t.clone().inversed(),n=new Tr({id:e.id,type:Qe.OUTER,points:e.points.map((function(e){return ui(ui({},e),{},{position:(t=e.position,n=new u.Point3d(t).appliedMatrix4(r),new u.Point2d(n))});var t,n})).map(gi),lines:e.lines.map(fi),depth:e.depth,matrix4:t});return n.linkPointsAndLines(),n}function gi(e){return new wr(e)}function fi(e){return new Qr(e)}!function(e){e[e.POINT=0]="POINT",e[e.LINE=1]="LINE"}(ii||(ii={}));var hi=new u.Tolerance.Tolerance(.01,.01,.01);function pi(e){if(e.getType()===_.NONE)return!0;var t=e.prevLine,r=e.nextLine;return t.type!==S.CIRCLE_ARC&&r.type!==S.CIRCLE_ARC&&(0!==e.radius&&(!e.cornerCutDistance||0!==e.cornerCutDistance[0]&&0!==e.cornerCutDistance[1]))}function di(e){return e.type===S.SEGMENT||(!(e.type!==S.CIRCLE_ARC||!u.Num.isEqual(e.getVector().length,2*e.radius))||(e.type!==S.CIRCLE_ARC||!u.Num.isBigger(e.getVector().length,2*e.radius)))}function Ii(e){return e.type===ii.POINT?e.val.getCurveLineAndPoints().curveLine:e.type===ii.LINE?e.val.getRealLine():void 0}function yi(e,t){if(e.type===ii.POINT&&e.val.getType()===_.NONE)return!0;if(t.type===ii.POINT&&t.val.getType()===_.NONE)return!0;var r=Ii(e),n=Ii(t);if(!r||!n)return!1;var i=u.Curve2dIntersect.curve2dIntersectCurve2d(r,n,hi);return!(1===i.length&&!i[0].point.isEqual(r.startPoint,.01)&&!i[0].point.isEqual(r.endPoint,.01))&&(!(i.length>1)||i.every((function(e){return e.point.isEqual(i[0].point,.01)})))}function Ci(e,t,r){var n=r.grooveColor,i=r.grooveOpacity,o=function(e,t){var r=Dn(e,u.Vector3d),n=Rn.find((function(e){return 0===e.dot(r)})),i=r.clone().cross(n).normalized(),o=u.Matrix4.makeBasis(n,i,r);return t&&o.setTranslation(new u.Vector3d(function(e,t){var r={x:0,y:0,z:0};0===e?r.z=t.z:3===e?r.x=t.x:2===e&&(r.y=-t.y);return r}(e,t))),o}(e.plankFaceId,t.getSize()),A=new Jr({data:e,path:li(e,o),model:t});A.setVisible(!0);var a=(e.params||[]).find((function(e){return e.key===Be})),s=(e.params||[]).find((function(e){return e.key===ve}));return A.setViewColor(a?a.value:n),A.setOpacity(s?Number(s.value):i),A}var Ei=r(23),Bi=r(12),vi=r(11),mi=r.n(vi);function Qi(e){return(Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Si(e,t){return(Si=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ri(e);if(t){var i=Ri(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Di(this,r)}}function Di(e,t){return!t||"object"!==Qi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ri(e){return(Ri=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Si(e,t)}(o,e);var t,r,n,i=wi(o);function o(){return bi(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return null}}])&&_i(t.prototype,r),n&&_i(t,n),o}(mi.a.PureComponent);function xi(e){return(xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ti(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Fi(e,t){return(Fi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Li(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ki(e);if(t){var i=ki(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Oi(this,r)}}function Oi(e,t){return!t||"object"!==xi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ki(e){return(ki=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ni,Gi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fi(e,t)}(o,e);var t,r,n,i=Li(o);function o(){return Pi(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&Ti(t.prototype,r),n&&Ti(t,n),o}(Ei.AXR);Ni||(Ni={});var Ui,ji=[];!function(e){e.SAVE_CUSTOM="saveCustom",e.UNDO_REDO="undoRedo",e.PARSE_DOCUMENT="parseDocument"}(Ui||(Ui={}));var Vi,Yi,Hi={};function Ki(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ki(Object(r),!0).forEach((function(t){Ji(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ki(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ji(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wi(e,t){!function(e){Vi.log(zi(e))}(e);var r={eventType:e.behavior+"_ktr",data:{},labels:{}};Yi&&Object.assign(r.labels,Yi()),t.dataKeys.forEach((function(t){return r.data[t]=e[t]})),t.labelKeys&&(Array.isArray(t.labelKeys)?t.labelKeys.forEach((function(t){return r.labels[t]=e[t]})):Object.assign(r.labels,t.labelKeys)),function(e){Vi.logByKtracker(e)}(r)}function zi(e){return qi(qi({},e),{},{pluginName:"customPad"})}function Xi(e){return(Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eo(e,t,r){return(eo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=io(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function to(e,t){return(to=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ro(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=io(e);if(t){var i=io(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return no(this,r)}}function no(e,t){return!t||"object"!==Xi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function io(e){return(io=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oo={entry:Gi,monitor:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&to(e,t)}(o,e);var t,r,n,i=ro(o);function o(){return Zi(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"init",value:function(){eo(io(o.prototype),"init",this).call(this),this.addConfig({sendLog:Wi,perfLogConfig:ji,timeLogConfig:Hi})}}])&&$i(t.prototype,r),n&&$i(t,n),o}(Ei.Monitor)};var Ao,ao,so=r(60),uo=r(718),co=r(423);function lo(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function go(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){lo(o,n,i,A,a,"next",e)}function a(e){lo(o,n,i,A,a,"throw",e)}A(void 0)}))}}function fo(e){return function(e){if(Array.isArray(e))return Io(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||po(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ho(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=po(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function po(e,t){if(e){if("string"==typeof e)return Io(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Io(e,t):void 0}}function Io(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){e[e.autoBackup=1]="autoBackup",e[e.transaction=2]="transaction",e[e.version=4]="version",e[e.modelBinding=8]="modelBinding",e[e.autoSave=16]="autoSave"}(Ao||(Ao={})),function(e){e[e.requestBackup=0]="requestBackup",e[e.forceBackup=1]="forceBackup",e[e.mergeRecorder=2]="mergeRecorder",e[e.notifyModelChange=3]="notifyModelChange",e[e.autoSave=4]="autoSave",e[e.save=5]="save",e[e.revert=6]="revert"}(ao||(ao={}));var Co=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.autoSaveInterruptSwitch=new uo.InterruptSwitch((function(e){e?t.kafDocument.autoSave.stop():t.kafDocument.autoSave.start()})),this.keyCache=new Set,this.requestBackupTimes=0,this.maxRequestBackupTimes=1e3,this.throttleRequestBackup=Object(so.throttleInRaf)((function(){Ei.Util.safeExec((function(){++t.requestBackupTimes>t.maxRequestBackupTimes?Object(co.devError)("requestBackup long time on backup"):t.kafDocument.autoBackupBlockKeys.size>0?t.requestBackup():t.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&t.kafDocument.requestBackup()}))}),1)}var t,r,n;return t=e,(r=[{key:"revert",value:function(){var e=this;Ei.Util.safeExec((function(){var t,r=ho(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().getTransactionContext().revert()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"requestBackup",value:function(){this.requestBackupTimes=0,this.throttleRequestBackup()}},{key:"forceBackup",value:function(){var e=this;Ei.Util.safeExec((function(){e.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&e.kafDocument.backup()}))}},{key:"mergeRecorder",value:function(){var e=this;Ei.Util.safeExec((function(){var t,r=ho(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().getTransactionContext().mergeRecorder()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"notifyModelChange",value:function(){var e=this;Ei.Util.safeExec((function(){var t,r=ho(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().notifyModelChange()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"save",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Ei.Util.safeExec((function(){e.kafDocument.saveDocument(t)}))}},{key:"interruptSingle",value:function(e,t){var r=this,n={};return t.includes(Ao.autoBackup)&&Ei.Util.safeExec((function(){n[Ao.autoBackup]=(new Date).getTime().toString()+e.getId(),r.kafDocument.pauseAutoBackup(n[Ao.autoBackup])}),!1),t.includes(Ao.transaction)&&Ei.Util.safeExec((function(){n[Ao.transaction]=e.getDoc().getTransactionSwitch().interrupt()})),t.includes(Ao.version)&&Ei.Util.safeExec((function(){n[Ao.version]=e.getDoc().getVersionSwitch().interrupt()})),t.includes(Ao.modelBinding)&&Ei.Util.safeExec((function(){n[Ao.modelBinding]=e.getDoc().getModelBindingSwitch().interrupt()})),t.includes(Ao.autoSave)&&Ei.Util.safeExec((function(){n[Ao.autoSave]=r.autoSaveInterruptSwitch.interrupt()})),n}},{key:"interrupt",value:function(e,t){var r,n=this,i={},o=ho(this.docs);try{for(o.s();!(r=o.n()).done;){var A=r.value;i[A.getId()]=this.interruptSingle(A,e)}}catch(e){o.e(e)}finally{o.f()}return this.keyCache.add(i),t&&setTimeout((function(){return n.resume(i)}),t),i}},{key:"resumeSingle",value:function(e,t){var r=this;t[Ao.autoBackup]&&Ei.Util.safeExec((function(){r.kafDocument.requestResumeAutoBackup(t[Ao.autoBackup])}),!1),t[Ao.transaction]&&Ei.Util.safeExec((function(){e.getDoc().getTransactionSwitch().resume(t[Ao.transaction])})),t[Ao.version]&&Ei.Util.safeExec((function(){e.getDoc().getVersionSwitch().resume(t[Ao.version])})),t[Ao.modelBinding]&&Ei.Util.safeExec((function(){e.getDoc().getModelBindingSwitch().resume(t[Ao.modelBinding])})),t[Ao.autoSave]&&Ei.Util.safeExec((function(){r.autoSaveInterruptSwitch.resume(t[Ao.autoSave])}))}},{key:"resume",value:function(e,t){var r,n=ho(this.docs);try{for(n.s();!(r=n.n()).done;){var i=r.value,o=e[i.getId()];o&&this.resumeSingle(i,o)}}catch(e){n.e(e)}finally{n.f()}this.keyCache.delete(e),t&&this.afterActions(t)}},{key:"forceResumeAll",value:function(){var e=this;fo(this.keyCache.values()).forEach((function(t){return e.resume(t)}))}},{key:"interruptActions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[Ao.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[ao.requestBackup],n=arguments.length>3?arguments[3]:void 0,i=this;return function(){var o={};try{o=i.interrupt(t,n);for(var A=arguments.length,a=new Array(A),s=0;s<A;s++)a[s]=arguments[s];var u=e.apply(this,a);return u}finally{i.resume(o,r)}}}},{key:"interruptActionsAsync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[Ao.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[ao.requestBackup],n=arguments.length>3?arguments[3]:void 0,i=this;return go(s.a.mark((function o(){var A,a,u,c,l,g=arguments;return s.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:for(A={},o.prev=1,A=i.interrupt(t,n),a=g.length,u=new Array(a),c=0;c<a;c++)u[c]=g[c];return o.next=6,e.apply(this,u);case 6:return l=o.sent,o.abrupt("return",l);case 8:return o.prev=8,i.resume(A,r),o.finish(8);case 11:case"end":return o.stop()}}),o,this,[[1,,8,11]])})))}},{key:"afterActions",value:function(e){e.includes(ao.mergeRecorder)&&this.mergeRecorder(),e.includes(ao.requestBackup)?this.requestBackup():e.includes(ao.forceBackup)?this.forceBackup():e.includes(ao.revert)&&this.revert(),e.includes(ao.notifyModelChange)&&this.notifyModelChange(),e.includes(ao.autoSave)?this.save(!0):e.includes(ao.save)&&this.save()}}])&&yo(t.prototype,r),n&&yo(t,n),e}(),Eo=r(527),Bo=r.n(Eo),vo=r(290);function mo(e){return(mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function bo(e,t){return(bo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=wo(e);if(t){var i=wo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return So(this,r)}}function So(e,t){return!t||"object"!==mo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wo(e){return(wo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Do=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bo(e,t)}(o,e);var t,r,n,i=_o(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).model=e,t}return t=o,(r=[{key:"toModel",value:function(){return this.model}}])&&Qo(t.prototype,r),n&&Qo(t,n),o}(Bi.BackupItem);var Ro=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.doc=t,this.key=r,this.BackupItemImpl=Do,this.getModel=function(){var e=n.doc.getTransactionContext();return e.commitRecorder(),{recorderId:e.getCurrentId()}},this.onUpdateModel=function(e,t){var r=n.doc.getTransactionContext();t===vo.ModelUpdateType.redo?r.redoToRecorder(e.recorderId):t===vo.ModelUpdateType.undo?r.undoToRecorder(e.recorderId):t===vo.ModelUpdateType.revert&&r.revert()},this.updateListeners=function(e,t){var r=n.doc;e?(r.getTransactionSwitch().resumeAll(),r.requestCommit=t):r.requestCommit=void 0},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.open=function(){return Promise.resolve()}};function Mo(e){return(Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xo(e){return function(e){if(Array.isArray(e))return Fo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||To(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Po(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=To(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function To(e,t){if(e){if("string"==typeof e)return Fo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fo(e,t):void 0}}function Fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Lo(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Oo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ko(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function No(e,t,r){return t&&ko(e.prototype,t),r&&ko(e,r),e}function Go(e,t){return(Go=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Vo(e);if(t){var i=Vo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jo(this,r)}}function jo(e,t){return!t||"object"!==Mo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vo(e){return(Vo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Go(e,t)}(r,e);var t=Uo(r);function r(){var e;return Oo(this,r),(e=t.apply(this,arguments)).doc=new He.CDoc,e}return No(r,[{key:"getDoc",value:function(){return this.doc}}]),r}(Bo()(Object)),Ho=new(function(){function e(){Oo(this,e),this.stacks=[{documentAction:new Co}]}var t,r;return No(e,[{key:"getTopDocumentAction",value:function(){return this.stacks[this.stacks.length-1].documentAction}},{key:"configTopDocumentAction",value:function(e,t){var r=this.getTopDocumentAction();return r.docs=e,r.kafDocument=t,r}},{key:"pushDocumentAction",value:(t=s.a.mark((function e(){var t,r,n,i,o,A,a,u,c,l,g,f,h,p,d,I=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=I.length>0&&void 0!==I[0]?I[0]:[],r=this.stacks[this.stacks.length-1],n=r.documentAction.interrupt([Ao.autoBackup]),i=new Co,o=new Yo,A=new Bi.DocumentStateManager,a=Po(this.stacks);try{for(a.s();!(u=a.n()).done;){c=u.value,l=Po(c.documentAction.docs);try{for(l.s();!(g=l.n()).done;)g.value.getDoc().addTransactionHook(o.getDoc().onTrackTransaction)}catch(e){l.e(e)}finally{l.f()}}}catch(e){a.e(e)}finally{a.f()}i.docs=[o].concat(xo(t)),i.kafDocument=A,f=new Ro(o.getDoc(),"tempDocumentSource".concat(this.stacks.length)),A.addDocumentSource(f),h=Po(t);try{for(h.s();!(p=h.n()).done;)d=p.value,A.addDocumentSource(new Ro(d.getDoc(),d.getId()))}catch(e){h.e(e)}finally{h.f()}return A.initState(),e.next=17,A.start();case 17:return this.stacks.push({documentAction:i,interruptKey:n,tempDoc:o,tempDocumentSource:f}),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e,this)})),r=function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function A(e){Lo(o,n,i,A,a,"next",e)}function a(e){Lo(o,n,i,A,a,"throw",e)}A(void 0)}))},function(){return r.apply(this,arguments)})},{key:"popDocumentAction",value:function(){if(this.stacks.length<=1)throw new Error("stasks has no extra document");var e,t=this.stacks.pop(),r=t.tempDoc,n=t.documentAction,i=t.interruptKey,o=Po(this.stacks);try{for(o.s();!(e=o.n()).done;){var A,a=Po(e.value.documentAction.docs);try{for(a.s();!(A=a.n()).done;){A.value.getDoc().removeTransactionHook(r.getDoc().onTrackTransaction)}}catch(e){a.e(e)}finally{a.f()}}}catch(e){o.e(e)}finally{o.f()}n.kafDocument.dispose(),this.getTopDocumentAction().resume(i,[ao.requestBackup])}}]),e}());function Ko(e){return(Ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qo(e,t){return(qo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zo(e);if(t){var i=zo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wo(this,r)}}function Wo(e,t){return!t||"object"!==Ko(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zo(e){return(zo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qo(e,t)}(r,e);var t=Jo(r);function r(e,n){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=t.call(this,e.getDoc(),n)).key=n,i}return r}(Ro);function Zo(e){return(Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eA(e,t){return(eA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=nA(e);if(t){var i=nA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rA(this,r)}}function rA(e,t){return!t||"object"!==Zo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nA(e){return(nA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var iA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eA(e,t)}(o,e);var t,r,n,i=tA(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).model=e,t}return t=o,(r=[{key:"toModel",value:function(){return this.model}}])&&$o(t.prototype,r),n&&$o(t,n),o}(Bi.BackupItem);var oA,AA,aA=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.design=t,this.key=r,this.disposeListener=Rt.noop,this.BackupItemImpl=iA,this.open=function(){return Promise.resolve()},this.getModel=function(){return n.design},this.onUpdateModel=function(e){n.design=e},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.afterInit=function(e){xt.addSetHook(e)},this.beforeDispose=function(){}},sA=r(161);!function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(oA||(oA={})),function(e){e.SELECTED="SELECTED"}(AA||(AA={}));var uA=Symbol("paramModelAssembly"),cA=Symbol("paramModel");function lA(e,t){return(lA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=hA(e);if(t){var i=hA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fA(this,r)}}function fA(e,t){return!t||"object"!==pA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hA(e){return(hA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pA(e){return(pA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var dA,IA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},yA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":pA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},CA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lA(e,t)}(r,e);var t=gA(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).model=e,n._parent=void 0,n._children=[],n.entityType=uA,n.entityId=e.getId(),n}return r}(Bi.Entity),EA=CA=IA([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))]),yA("design:paramtypes",["function"==typeof(dA=void 0!==Oe.CoreParamModelAssembly&&Oe.CoreParamModelAssembly)?dA:Object])],CA);function BA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mA(e,t)}function mA(e,t){return(mA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_A(e);if(t){var i=_A(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bA(this,r)}}function bA(e,t){return!t||"object"!==SA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _A(e){return(_A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function SA(e){return(SA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var wA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":SA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},DA=function(e){vA(r,e);var t=QA(r);function r(e,n){var i;return BA(this,r),(i=t.call(this)).model=e,i.context=n,i._parent=void 0,i._children=[],i.entityType=n.type,i.entityId=e.getId(),i}return r}(Bi.Entity),RA=function(e){vA(r,e);var t=QA(r);function r(){return BA(this,r),t.apply(this,arguments)}return r}(DA);RA=wA([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],RA);var MA=r(6),xA=r.n(MA),PA=r(190);function TA(e){return(TA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var FA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":TA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},LA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":TA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},OA=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.interactionPriority=0,this.selectable=!0};function kA(e){return function(t,r){var n=function(e,t){try{var r=e.materialReplacedInfos,n=e.materialUVEditInfos,i=e.texture,o=e.opacity;if(!(r&&r.length||n&&n.length||i))return t.getMesh()+(1!==o?String(o):"")+t.getMtl().reduce((function(e,t){var r=[];return r.push(e,t.getObjName(),t.getDiffuseTexture(),t.getReflectGlossiness(),t.getFresnel(),t.getU(),t.getV(),t.getW(),t.getH()),t.getDiffuseTextureScale()&&r.push(t.getDiffuseTextureScale().toString()),t.getDiffuseColor()&&r.push(t.getDiffuseColor().toString()),t.getReflectColor()&&r.push(t.getReflectColor().toString()),t.getRefractColor()&&r.push(t.getRefractColor().toString()),r.join("#")}),"")}catch(e){A=e,setTimeout((function(){throw A}))}var A;return null}(t,r);return e+n}}function NA(e){return(NA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function GA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function UA(e,t){return(UA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=YA(e);if(t){var i=YA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return VA(this,r)}}function VA(e,t){return!t||"object"!==NA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function YA(e){return(YA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}FA([Dt.observable,LA("design:type",Number)],OA.prototype,"opacity",void 0),FA([Dt.observable,LA("design:type",Boolean)],OA.prototype,"visible",void 0);var HA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&UA(e,t)}(o,e);var t,r,n,i=jA(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).props=e,t.material=new MA.LineBasicMaterial({color:oA.outline}),t.setAttribute("outline",!1),t.setAttribute("shadowCaster",!1),t.update({}),t}return t=o,(r=[{key:"updateProps",value:function(e){var t=this.props;this.props=e,this.update(t)}},{key:"update",value:function(e){var t,r,n=this.props.points;if(e.points!==n){var i=(t=n,(r=new MA.BufferGeometry).addAttribute("position",new MA.Float32BufferAttribute(t,3)),r);this.geometry=i,this.computeLineDistances()}var o=this.props,A=o.color,a=void 0===A?oA.outline:A,s=o.visible,u=void 0===s||s;this.material.setValues({color:a}),this.visible=u}}])&&GA(t.prototype,r),n&&GA(t,n),o}(MA.LineSegments),KA=r(359),qA=r(84);function JA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function WA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var zA=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?JA(Object(r),!0).forEach((function(t){WA(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JA(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({side:MA.Side.FrontSide,specular:1118481,shininess:15},{polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:15});function XA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ZA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?XA(Object(r),!0).forEach((function(t){$A(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XA(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ea(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ta(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ea(o,n,i,A,a,"next",e)}function a(e){ea(o,n,i,A,a,"throw",e)}A(void 0)}))}}function ra(e){return na.apply(this,arguments)}function na(){return(na=ta(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.material,n=t.materialInfo,i=t.opacity,o=void 0===i?1:i,A=t.textureUrl,a=t.textureSize,u=null==n?void 0:n.getRefractColor(),c=ZA({},zA),u&&(l=Object(qA.clamp)(Math.max(u.x,u.y,u.z),0,1),r.transparent=l>.01,c.opacity=Math.max(1-l,.1)),"number"==typeof o&&(o=o>1?1:o<0?0:o,c.transparent=o<1,c.opacity=o,c.depthWrite=!c.transparent),g=A||(null==n?void 0:n.getDiffuseTexture()),!Object(Rt.isEmpty)(g)){e.next=12;break}(f=null==n?void 0:n.getDiffuseColor())&&(c.color=new MA.Color(f.x,f.y,f.z).getHex()),c.texture=null,e.next=25;break;case 12:if(r.diffuseTextureUrl=g,a){e.next=18;break}return e.next=16,Object(KA.loadImage)(g);case 16:h=e.sent,a={x:h.naturalWidth,y:h.naturalHeight};case 18:return e.next=20,Object(KA.loadTexture)(g,{wrapS:MA.WebGLTextureWrap.Repeat,wrapT:MA.WebGLTextureWrap.Repeat,cacheReject:!0});case 20:(p=e.sent).repeat=new MA.Vector2(1/a.x,1/a.y),p.updateMatrix(),c.uvTransform=p.matrix,c.texture=p;case 25:r.setValues(c);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ia(e){return(ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oa(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Aa(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){oa(o,n,i,A,a,"next",e)}function a(e){oa(o,n,i,A,a,"throw",e)}A(void 0)}))}}function aa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sa(e,t){return(sa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ua(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=la(e);if(t){var i=la(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ca(this,r)}}function ca(e,t){return!t||"object"!==ia(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function la(e){return(la=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ga=new MA.BufferGeometry;var fa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sa(e,t)}(a,e);var t,r,n,i,o,A=ua(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=A.call(this)).props=e,t.categoryId=Ei.EDCCountCategory.PHONG,t.material=new MA.MeshPhongMaterial({transparent:!0}),t.update({}),t}return t=a,(r=[{key:"getProps",value:function(){return this.props}},{key:"updateProps",value:function(e){var t=this.props;this.props=e,this.update(t)}},{key:"update",value:(o=Aa(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.props.visible,n=void 0===r||r,this.props.geometry!==t.geometry&&this.updateGeometry(),this.props.textureSize===t.textureSize&&this.props.tiledImgUrl===t.tiledImgUrl&&this.props.opacity===t.opacity&&this.props.popBufferMtl===t.popBufferMtl){e.next=5;break}return e.next=5,this.updateMaterial();case 5:this.visible=n;case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"updateGeometry",value:function(){var e,t,r,n,i,o,A=this.props.geometry;this.geometry&&this.geometry.dispose(),this.geometry=A?(e=A,t=new MA.BufferGeometry,r=new Uint32Array(e.indices),n=new Float32Array(e.vertices),i=new Float32Array(e.normals),o=new Float32Array(e.textures),t.index=new MA.BufferAttribute(r,1),t.addAttribute("position",new MA.BufferAttribute(n,3)),t.addAttribute("uv",new MA.BufferAttribute(o,2)),i&&i.length?t.addAttribute("normal",new MA.BufferAttribute(i,3)):t.computeVertexNormals(),t):ga}},{key:"updateMaterial",value:(i=Aa(s.a.mark((function e(){var t,r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,r=t.popBufferMtl,n=t.opacity,i=t.tiledImgUrl,o=t.textureSize,e.next=3,ra({material:this.material,materialInfo:r,opacity:n,textureUrl:i,textureSize:o});case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&aa(t.prototype,r),n&&aa(t,n),a}(MA.Mesh);function ha(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return pa(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pa(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function pa(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function da(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ia(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ya(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Ca={meshModels:[],renderChildNodes:[],furnitureModels:[],legal:!1,legalMesh:!1};var Ea=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=t,this.context=r,this.modelDepProps=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?da(Object(r),!0).forEach((function(t){Ia(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):da(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},Ca),this.childNodeDrawables=[],this.displayInfoDrawables=[],this.meshes=[],this.childNodeMeshes=[],this.displayInfoMeshs=[],this.state=new OA,this.id=t.model.getId(),this.type=r.type;var n,i=ha(r.stateReducers);try{for(i.s();!(n=i.n()).done;){(0,n.value)(t.model,!1,this.state)}}catch(e){i.e(e)}finally{i.f()}}var t,r,n;return t=e,(r=[{key:"interactionPriority",get:function(){return this.state.interactionPriority}},{key:"pickActualInteractiveEntity",value:function(e){var t=this,r=e.intersection.object,n=function(){for(;r;){var e=t.context.objectManager.getInfo(r);if(e)return{entityId:e.id,entityType:e.type};r=r.parent}return{entityId:t.id,entityType:t.context.type}}();return this.context.pickActualInteractiveEntity(n,{point:e.intersection.point})}},{key:"create",value:function(e){var t,r=this.props.model,n=new MA.Group;return n.uuid=this.id,n.visible=null===(t=this.state.visible)||void 0===t||t,this.context.filterParamModel(r)&&(this.renderMeshes(n,r,e),this.renderChildNodeMeshes(n,r,e),this.renderDisplayInfoMesh(n,r,e),this.renderDisplayInfoMeshes(n,r,e),this.applyTransform(n,r),this.context.objectManager.addObject(n,{drawable:this,type:this.type,id:this.id,drawableState:this.state,model:r})),n}},{key:"update",value:function(e,t){var r,n=this.props.model;e.visible=null===(r=this.state.visible)||void 0===r||r,this.renderMeshes(e,n,t),this.renderChildNodeMeshes(e,n,t),this.renderDisplayInfoMesh(e,n,t),this.renderDisplayInfoMeshes(e,n,t),this.renderLineSegments(e,n),this.applyTransform(e,n)}},{key:"dispose",value:function(e){this.disposeMeshes(e),this.disposeDisplayInfoMesh(e),this.disposeDisplayInfoMeshs(e),this.disposeChildNodeMeshes(e),this.disposeLineSegments(e),this.context.objectManager.removeObject(e)}},{key:"applyTransform",value:function(e,t){var r=t.getPosition(),n=t.getScale(),i=t.getRotation();e.position.set(r.x,r.y,r.z),e.rotation.set(i.x,i.y,i.z),e.scale.set(n.x,n.y,n.z)}},{key:"disposeMeshes",value:function(e){for(var t=0;t<this.meshes.length;t++)Object(PA.dispose)(this.meshes[t]);e.removeObjects(this.meshes)}},{key:"disposeChildNodeMeshes",value:function(e){for(var t=0;t<this.childNodeDrawables.length;t++)this.childNodeDrawables[t].dispose(this.childNodeMeshes[t]),Object(PA.dispose)(this.childNodeMeshes[t]);e.removeObjects(this.childNodeMeshes)}},{key:"disposeDisplayInfoMesh",value:function(e){this.displayInfoDrawable&&this.displayInfoMesh&&(this.displayInfoDrawable.dispose(this.displayInfoMesh),Object(PA.dispose)(this.displayInfoMesh),e.remove(this.displayInfoMesh))}},{key:"disposeDisplayInfoMeshs",value:function(e){for(var t=0;t<this.displayInfoDrawables.length;t++)this.displayInfoDrawables[t].dispose(this.displayInfoMeshs[t]),Object(PA.dispose)(this.displayInfoMeshs[t]);e.removeObjects(this.displayInfoMeshs)}},{key:"disposeLineSegments",value:function(e){this.lineSegments&&(Object(PA.dispose)(this.lineSegments),e.remove(this.lineSegments))}},{key:"renderMeshes",value:function(e,t,r){var n,i,o,A=this.modelDepProps,a=null!==(n=this.state.opacity)&&void 0!==n?n:1,s=t.getMeshModels(),u=t.getLegal(),c=t.getLegalMesh();if(A.meshModels!==s||A.legal!==u||A.legalMesh!==c){A.meshModels=s,A.legal=u,A.legalMesh=c,this.disposeMeshes(e);var l=[];if(u&&c)for(var g,f=s.length;f--;)g=s[f],g=new fa({geometry:g.geometry,tiledImgUrl:g.texture&&(g.texture.hdTiledImageUrl||g.texture.tiledImgUrl),textureSize:null===(i=g.texture)||void 0===i?void 0:i.size,opacity:a,popBufferMtl:g.displayMaterial}),l[f]=g,e.add(g);this.meshes=l}else for(var h,p=this.meshes,d=s.length;d--;)h=s[d],p[d].updateProps({geometry:h.geometry,tiledImgUrl:h.texture&&(h.texture.hdTiledImageUrl||h.texture.tiledImgUrl),textureSize:null===(o=h.texture)||void 0===o?void 0:o.size,opacity:a,popBufferMtl:h.displayMaterial})}},{key:"renderChildNodeMeshes",value:function(e,t,r){var n,i=(n=t,n.getChildren().filter((function(e){return e.getLegal()})).concat(n.getAccessories())).filter(this.context.filterParamModel);if(Object(Rt.isEqual)(this.modelDepProps.renderChildNodes,i))for(var o=0;o<this.childNodeDrawables.length;o++){var A=this.childNodeDrawables[o],a=this.childNodeMeshes[o];A.update(a,r)}else if(this.modelDepProps.renderChildNodes=i,this.disposeChildNodeMeshes(e),this.childNodeDrawables=i.map(this.props.renderChild),this.childNodeMeshes=this.childNodeDrawables.map((function(e){return e.create(r)})),this.childNodeMeshes.length>0){var s,u=ha(this.childNodeMeshes);try{for(u.s();!(s=u.n()).done;){var c=s.value;e.add(c)}}catch(e){u.e(e)}finally{u.f()}}}},{key:"renderDisplayInfoMesh",value:function(e,t,r){var n=t.getFurnitureModel();this.modelDepProps.furnitureModel!==n?(this.modelDepProps.furnitureModel=n,this.disposeDisplayInfoMesh(e),n&&(this.displayInfoDrawable=new Bi.DisplayInfoDrawable({displayInfo:n.displayInfo,position:n.furnitureTranslation||Le.a.ZERO,size:n.size.clone().div(n.scale),scale:Le.a.ONE,rotation:Le.a.ZERO,generateComponentInstanceKey:kA(t.getId()),getMaterialSideProperty:function(){return MA.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 Bi.DisplayInfoDrawable({displayInfo:e.displayInfo,position:e.position,size:e.size,scale:e.scale,rotation:e.rotate,generateComponentInstanceKey:kA(t.getId())})})),this.displayInfoMeshs=this.displayInfoDrawables.map((function(e){return e.create(r)})),this.displayInfoMeshs.length>0){var i,o=ha(this.displayInfoMeshs);try{for(o.s();!(i=o.n()).done;){var A=i.value;e.add(A)}}catch(e){o.e(e)}finally{o.f()}}}else for(var a=0;a<this.displayInfoDrawables.length;a++){var s=this.displayInfoDrawables[a],u=this.displayInfoMeshs[a];s.update(u)}}},{key:"renderLineSegments",value:function(e,t){var r,n=t.getWireFrames(),i=this.context.store.showOutline;this.modelDepProps.wireFrames!==n?(this.modelDepProps.wireFrames=n,this.disposeLineSegments(e),this.lineSegments=new HA({points:n||[],visible:i}),e.add(this.lineSegments)):null===(r=this.lineSegments)||void 0===r||r.updateProps({points:n||[],visible:i})}}])&&ya(t.prototype,r),n&&ya(t,n),e}();function Ba(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function va(e,t){return(va=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ma(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ba(e);if(t){var i=ba(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qa(this,r)}}function Qa(e,t){return!t||"object"!==_a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ba(e){return(ba=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _a(e){return(_a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Sa=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":_a(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},wa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&va(e,t)}(r,e);var t=ma(r);function r(){var e;return Ba(this,r),(e=t.apply(this,arguments))._parent=void 0,e}return r}(DA);function Da(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ra(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ma(e,t,r){return t&&Ra(e.prototype,t),r&&Ra(e,r),e}function xa(e,t,r){var n=r.getEntity(e)||function(e,t){if(t.filterParamModel(e))return e.isRoot()?new wa(e,t):new RA(e,t)}(e,t);if(n){r.registerEntity(e,n);var i=e.getParent();return i&&(n._parent=r.getEntity(i)),n._children=e.getChildNodes().map((function(e){return xa(e,t,r)})).filter((function(e){return!!e})),n}}wa=Sa([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return new Ea({model:this.model,renderChild:function t(r){return new Ea({model:r,renderChild:t},e.context)}},this.context)})),new Bi.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],wa);var Pa=function(){function e(t){var r=this;Da(this,e),this.context=t,this.entityCaches=new WeakMap,this.entities=[],this.registerEntity=function(e,t){r.entityCaches.has(e)||r.entityCaches.set(e,t),r.entities.push(t)},this.getEntity=function(e){return r.entityCaches.get(e)}}return Ma(e,[{key:"createEntities",value:function(e){var t={registerEntity:this.registerEntity,getEntity:this.getEntity};this.entities=[];for(var r=0,n=e.length;r<n;r++)xa(e[r],this.context,t);return this.entities}},{key:"createAssemblyEntities",value:function(e){return e.map((function(e){return new EA(e)}))}}]),e}(),Ta=function(){function e(t,r){Da(this,e),this.getCustom=t,this.getEntities=[this.getParamModelEntities,this.getParamModelAssemblyEntities],this.factory=new Pa(r)}return Ma(e,[{key:"getParamModelEntities",value:function(){var e=this.getCustom();return void 0!==e?this.factory.createEntities(e.getParamModels()):[]}},{key:"getParamModelAssemblyEntities",value:function(){var e=this.getCustom();return void 0!==e?this.factory.createAssemblyEntities(e.getParamModelAssemblies()):[]}}]),e}();function Fa(e){return(Fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var La=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Fa(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Oa=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Fa(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ka=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.showOutline=!1,this.selected=[]};function Na(e){return function(e){if(Array.isArray(e))return Ga(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ga(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ga(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ga(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ua(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}La([Dt.observable,Oa("design:type",Object)],ka.prototype,"showOutline",void 0),La([Dt.observable,Oa("design:type",Array)],ka.prototype,"selected",void 0);var ja=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.infoMap=new Map,this.idMap=new Map}var t,r,n;return t=e,(r=[{key:"addObject",value:function(e,t){this.infoMap.set(e,t),this.idMap.set(t.id,t)}},{key:"removeObject",value:function(e){var t=this.infoMap.get(e);t&&(this.infoMap.delete(e),t===this.idMap.get(t.id)&&this.idMap.delete(t.id))}},{key:"getInfo",value:function(e){return e instanceof MA.Object3D?this.infoMap.get(e):this.idMap.get(e)}},{key:"getInfos",value:function(){return Na(this.idMap.entries())}}])&&Ua(t.prototype,r),n&&Ua(t,n),e}(),Va=r(189);function Ya(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Ha=function(){function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.selectionStateManager=t,this.entityTypes=r,this.onSelectChange=n,this._onStateChange=function(){i.onStateChange()},this.init()}var t,r,n;return t=e,(r=[{key:"isSelected",value:function(e){return!!this.selected.find((function(t){return t.entityId===e}))}},{key:"init",value:function(){this.enable()}},{key:"release",value:function(){this.disable()}},{key:"enable",value:function(){this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Va.UPDATE,this._onStateChange),this.onStateChange()}},{key:"disable",value:function(){this.selectionStateManager.off(Va.UPDATE,this._onStateChange),this.rawSelected=[],this.selected=[]}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value,t=this.rawSelected,r=this.selected;if(this.rawSelected!==e){this.rawSelected=e;var n=this.resolveSelected(e)||[];this.resolveSelectedChanged(this.selected,n)&&(this.selected=n)}t!==e&&this.onSelectChange(this.selected,r)}},{key:"resolveSelected",value:function(e){var t=this;return e.filter((function(e){return t.entityTypes.includes(e.entityType)}))}},{key:"resolveSelectedChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=function(e,t){return e>t?1:e===t?0:-1},n=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),i=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),o=0,A=i.length;o<A;++o)if(n[o]!==i[o])return!0;return!1}}])&&Ya(t.prototype,r),n&&Ya(t,n),e}();function Ka(e){return(Ka="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||Wa(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ja(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Wa(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Wa(e,t){if(e){if("string"==typeof e)return za(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?za(e,t):void 0}}function za(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Za(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $a(e,t){return($a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function es(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=rs(e);if(t){var i=rs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ts(this,r)}}function ts(e,t){return!t||"object"!==Ka(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rs(e){return(rs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ha.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED";var ns=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$a(e,t)}(o,e);var t,r,n,i=es(o);function o(){var e;return Xa(this,o),(e=i.apply(this,arguments)).store=new ka,e.objectManager=new ja,e.stateReducers=[],e.onScene3DInit=function(t){e.appService.stateManager.registerView(e._scene3dId).registerDefaultSystems3D(e._scene3dId,t).activeView(e._scene3dId)},e.toggleShowModelOutline=function(t){e.store.showOutline=t},e.updateModelState=function(t,r){var n=e.objectManager.getInfo(t),i=e.selectManager.isSelected(t);r(n.drawableState,i)},e.updateModelsState=function(t){var r,n=Ja(e.objectManager.getInfos());try{for(n.s();!(r=n.n()).done;){var i=qa(r.value,2),o=i[0],A=i[1],a=e.selectManager.isSelected(o);t(o,A.drawableState,a)}}catch(e){n.e(e)}finally{n.f()}},e}return t=o,(r=[{key:"config",value:function(e,t){var r=this;this._scene3dId=t.scene3dID||"scene3d",this.appService=e;var n=e.stateManager,i=t.paramModelSymbol,o=t.getDoc,A=t.getCustom,a=t.pickActualInteractiveEntity,s=void 0===a?function(e){return e}:a,u=t.filterParamModel;this.selectManager=new Ha(n.selection,[i],(function(e,t){r.store.selected=e,r.emit(AA.SELECTED,{selected:e,oldSelected:t})})),e.registerEntityDocument(new Ta(A,{store:this.store,type:i,objectManager:this.objectManager,pickActualInteractiveEntity:s,stateReducers:this.stateReducers,filterParamModel:u}));var c=o().getElementContext();return c.getterEmitter.on((function(e){Dt.advanced.reportObserved(e.instance)})),c.setterEmitter.on((function(e){Dt.advanced.reportChanged(e.instance)})),this}},{key:"registerReducer",value:function(e){this.stateReducers.push(e)}},{key:"triggerReducer",value:function(e){var t,r=Ja(this.objectManager.getInfos());try{for(r.s();!(t=r.n()).done;){var n=qa(t.value,2),i=n[0],o=n[1];if(!e||e.includes(i)){var A,a=this.selectManager.isSelected(i),s=Ja(this.stateReducers);try{for(s.s();!(A=s.n()).done;)(0,A.value)(o.model,a,o.drawableState)}catch(e){s.e(e)}finally{s.f()}}}}catch(e){r.e(e)}finally{r.f()}}},{key:"scene3dId",get:function(){return this._scene3dId}}])&&Za(t.prototype,r),n&&Za(t,n),o}(St.EventEmitter),is=r(289),os=r.n(is),As=r(727);function as(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ss(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function us(e,t,r){return t&&ss(e.prototype,t),r&&ss(e,r),e}function cs(e){return(cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ls,gs,fs,hs,ps=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":cs(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ds=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":cs(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function Is(e){var t=this;if(t===fs.GUARD)return function(e,t,r){var n=r.value;return(r=Object.assign({},r)).value=function(){var e,r=void 0,i=this.__TRANSFORM_CONTEXT_ADD_DEP;if(i)if(hs){if(i!==hs)throw Error("CUSTOM: Access model data by crossing stub");i=void 0}else;i&&(hs=i,qe.a.begGetDeps(i));try{e=n.apply(this,arguments)}catch(e){r=e}if(i&&(hs=void 0,qe.a.endGetDeps(i)),r)throw r.message="CUSTOM: ["+t+"] "+r.message,r;return e},r};var r=0===arguments.length;return function(n,i){if(r){var o="get"+i[0].toLocaleUpperCase()+i.slice(1);e=function(e){return e[o]()}}if(!n.hasOwnProperty("__lazyKeys")){var A=[],a=[],s=[];Object.defineProperty(n,"__lazyKeys",{configurable:!0,enumerable:!0,value:A}),Object.defineProperty(n,"__immeKeys",{configurable:!0,enumerable:!0,value:a}),Object.defineProperty(n,"__immeVals",{configurable:!0,enumerable:!0,value:s});var u=n.__accessLazyValues,c=n.__accessImmeValues;Object.defineProperty(n,"__accessImmeValues",{configurable:!0,enumerable:!0,value:function(){c&&c.call(this);for(var e=void 0,t=0,r=a.length;t<r;++t)e=s[t],this[a[t]]=Object(Rt.isFunction)(e)?e(this.__DONT_USE_ME):e}}),Object.defineProperty(n,"__accessLazyValues",{configurable:!0,enumerable:!0,value:function(){u&&u.call(this);for(var e=0,t=A.length;e<t;++e)this[A[e]]}})}t===fs.LAZY?(n.__lazyKeys.push(i),Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){var t=this.__LAZY_VALUES;if(t.__keys[i])return t[i];var r=e;if(Object(Rt.isFunction)(e)){var n=void 0,o=this.__TRANSFORM_CONTEXT_ADD_DEP;if(o)if(hs){if(o!==hs)throw Error("CUSTOM: Access model data by crossing stub");o=void 0}else;o&&(hs=o,qe.a.begGetDeps(o));try{r=e(this.__DONT_USE_ME,this)}catch(e){n=e}if(o&&(hs=void 0,qe.a.endGetDeps(o)),n)throw n.message="CUSTOM: ["+i+"] "+n.message,n}return t[i]=r,t.__keys[i]=!0,r}})):(n.__immeKeys.push(i),n.__immeVals.push(e))}}!function(e){e.LAZY="__@access@lazy@__",e.IMMEDIATE="__@access@imme@__",e.GUARD="__@access@guard@__"}(fs||(fs={}));var ys={lazy:Is.bind(fs.LAZY),imme:Is.bind(fs.IMMEDIATE),guard:Is.bind(fs.GUARD),castTo:void 0};ys.castTo=function(){return ys};var Cs=function(){function e(t){as(this,e),this.__DONT_USE_ME=t,hs&&(this.__TRANSFORM_CONTEXT_ADD_DEP=hs),Object.defineProperty(this,"__LAZY_VALUES",{enumerable:!1,value:{__keys:{}}}),this.__accessImmeValues&&this.__accessImmeValues()}return us(e,[{key:"asStub",value:function(){var e=He.CDoc.transformModelContext;if(e&&e.deps&&e.rms){var t=e.deps,r=e.rms,n=this.__DONT_USE_ME;t.add(n),r.listeningTypes.add(n.constructor),this.__TRANSFORM_CONTEXT_ADD_DEP=function(e){e!==n&&(t.add(e),r.listeningTypes.add(e.constructor))}}else this.__TRANSFORM_CONTEXT_ADD_DEP&&(this.__TRANSFORM_CONTEXT_ADD_DEP=void 0)}},{key:"toPlain",value:function(){this.__accessLazyValues&&this.__accessLazyValues();var e=function(e,t){for(var r,n=Object.getOwnPropertyNames(e),i=0,o=n.length;i<o;++i)(r=n[i]).startsWith("$")||r.startsWith("_")||(t[r]=e[r]);return t},t={};return e(this,t),e(this.__LAZY_VALUES,t),t}},{key:"guard",value:function(e){return e(this)}}]),e}();ps([ys.imme(),ds("design:type",String)],Cs.prototype,"id",void 0),ps([ys.imme((function(e){return e.constructor})),ds("design:type","function"==typeof(ls=void 0!==As.ConstructorOf&&As.ConstructorOf)?ls:Object)],Cs.prototype,"kType",void 0),ps([ys.lazy((function(e){return e})),ds("design:type",Boolean)],Cs.prototype,"$model",void 0),ps([ys.guard(),ds("design:type",Function),ds("design:paramtypes",[Function]),ds("design:returntype","function"==typeof(gs="undefined"!=typeof T&&T)?gs:Object)],Cs.prototype,"guard",null);var Es=function(){function e(){as(this,e)}return us(e,null,[{key:"registeCreator",value:function(e,t){this.creators.set(e,t)}},{key:"get",value:function(e,t){if(t||!e.__modelDataFacade){var r=this.creators.get(e.constructor);if(!r)return;e.__modelDataFacade=r(e)}return e.__modelDataFacade}},{key:"put",value:function(e){e.__modelDataFacade&&(e.__modelDataFacade=void 0)}}]),e}();Es.creators=new Map;var Bs=r(246);function vs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ms(e,t){return(ms=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_s(e);if(t){var i=_s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bs(this,r)}}function bs(e,t){return!t||"object"!==Ss(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _s(e){return(_s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ss(e){return(Ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ws,Ds,Rs,Ms,xs,Ps=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ss(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Ts=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ss(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Fs=Symbol("baseParamModel"),Ls=ys.castTo(),Os=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ms(e,t)}(r,e);var t=Qs(r);function r(){return vs(this,r),t.apply(this,arguments)}return r}(Cs);function ks(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ns(e,t){return(Ns=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=js(e);if(t){var i=js(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Us(this,r)}}function Us(e,t){return!t||"object"!==Vs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function js(e){return(js=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vs(e){return(Vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Ps([Ls.lazy(),Ts("design:type",String)],Os.prototype,"modelInstanceId",void 0),Ps([Ls.imme(Fs),Ts("design:type",Symbol)],Os.prototype,"type",void 0),Ps([Ls.lazy((function(e){return e.getType()})),Ts("design:type","function"==typeof(ws=void 0!==Ln.ParamModelType&&Ln.ParamModelType)?ws:Object)],Os.prototype,"modelType",void 0),Ps([Ls.lazy(),Ts("design:type",String)],Os.prototype,"name",void 0),Ps([Ls.lazy(),Ts("design:type","function"==typeof(Ds=void 0!==Le.a&&Le.a)?Ds:Object)],Os.prototype,"size",void 0),Ps([Ls.lazy(),Ts("design:type","function"==typeof(Rs=void 0!==we.a&&we.a)?Rs:Object)],Os.prototype,"box3",void 0),Ps([Ls.lazy(),Ts("design:type","function"==typeof(Ms=void 0!==Bs.ParamStore&&Bs.ParamStore)?Ms:Object)],Os.prototype,"paramStore",void 0),Ps([Ls.lazy(),Ts("design:type","function"==typeof(xs=void 0!==Ln.ParamModelCategory&&Ln.ParamModelCategory)?xs:Object)],Os.prototype,"category",void 0),Ps([Ls.lazy(),Ts("design:type",Boolean)],Os.prototype,"legal",void 0),Ps([Ls.lazy((function(e){return e.getHasAttached()})),Ts("design:type",Boolean)],Os.prototype,"attached",void 0),Ps([Ls.lazy(),Ts("design:type",Boolean)],Os.prototype,"deletable",void 0),Ps([Ls.lazy(),Ts("design:type",Boolean)],Os.prototype,"replaceable",void 0),Ps([Ls.lazy(),Ts("design:type",Number)],Os.prototype,"attachedVersion",void 0),Ps([Ls.lazy(),Ts("design:type",Boolean)],Os.prototype,"paramOverride",void 0);var Ys,Hs,Ks=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Vs(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},qs=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Vs(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Js=ys.castTo(),Ws=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ns(e,t)}(o,e);var t,r,n,i=Gs(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e)).parent=t,r}return t=o,(r=[{key:"visit",value:function(e,t){this.$model.visit(e,t)}},{key:"upVisit",value:function(e,t){this.$model.upVisit(e,t)}}])&&ks(t.prototype,r),n&&ks(t,n),o}(Os);function zs(e){return(zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xs(Object(r),!0).forEach((function(t){$s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xs(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eu(e){return function(e){if(Array.isArray(e))return tu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return tu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tu(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ru(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nu(e,t,r){return(nu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=au(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function iu(e,t){return(iu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ou(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=au(e);if(t){var i=au(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Au(this,r)}}function Au(e,t){return!t||"object"!==zs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function au(e){return(au=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function su(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Ks([Js.lazy((function(e,t){for(var r=t;r.parent;)r=r.parent;return r})),qs("design:type",Ws)],Ws.prototype,"root",void 0),Ks([Js.imme(cA),qs("design:type",Symbol)],Ws.prototype,"type",void 0),Ks([Js.lazy((function(e){return e.isRoot()})),qs("design:type",Boolean)],Ws.prototype,"isRoot",void 0),Ks([Js.lazy((function(e){return e.isAccessory()})),qs("design:type",Boolean)],Ws.prototype,"isAccessory",void 0),Ks([Js.lazy((function(e){return e.getAssembly()?e.getAssembly().getId():void 0})),qs("design:type",String)],Ws.prototype,"assemblyId",void 0),Ks([Js.lazy((function(e,t){return e.getChildren().map((function(e){return Es.get(e)}))})),qs("design:type",Array)],Ws.prototype,"children",void 0),Ks([Js.lazy((function(e,t){return e.getAccessories().map((function(e){return Es.get(e)}))})),qs("design:type",Array)],Ws.prototype,"accessories",void 0),Ks([Js.lazy((function(e,t){return t.children.concat(t.accessories)})),qs("design:type",Array)],Ws.prototype,"childNodes",void 0),Ks([Js.lazy((function(e,t){return!!e.getAssembly()&&e.getAssembly().isTemplateAssembly()})),qs("design:type",Boolean)],Ws.prototype,"belongsToTemplateAssembly",void 0),Ks([Js.guard(),qs("design:type",Function),qs("design:paramtypes",["function"==typeof(Ys=void 0!==At.ParamModelVisitor&&At.ParamModelVisitor)?Ys:Object,Boolean]),qs("design:returntype",void 0)],Ws.prototype,"visit",null),Ks([Js.guard(),qs("design:type",Function),qs("design:paramtypes",["function"==typeof(Hs=void 0!==At.ParamModelVisitor&&At.ParamModelVisitor)?Hs:Object,Boolean]),qs("design:returntype",void 0)],Ws.prototype,"upVisit",null),Es.registeCreator(It,(function(e){return e.isRoot()?new Ws(e):Es.get(e.getParent()).guard((function(t){return new Ws(e,t)}))}));Symbol("paramModelMultiSelectionEntity");var uu=function e(){su(this,e),this.paramModels=[],this.paramModelAssembies=[]},cu=function(e,t){return t.paramsMap[e]||t.paramsChildrenMap[e]},lu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&iu(e,t)}(o,e);var t,r,n,i=ou(o);function o(e){var t;return su(this,o),(t=i.call(this,e)).findModelOrAssemblyModelById=function(e){var r=t.findModel(e);return r?r.$model:t.findParamModelAssembly(e)},t.modelsMap={paramsMap:{},paramsChildrenMap:{}},t.childrenMap={},t}return t=o,(r=[{key:"updateState",value:function(e){var t=this.state?this.state.paramModels:[],r=this.state?this.state.paramModelAssembies:[];nu(au(o.prototype),"updateState",this).call(this,e);var n=this.state.paramModels,i=this.state.paramModelAssembies;this.updateParamModelsMap(t,n),t===n&&r===i||this.emit(o.EVENT_PARAM_MODELS_CHANGED,this)}},{key:"updateParamModelsMap",value:function(e,t){var r=Ei.Util.diffArray(e,t),n=this.modelsMap.paramsMap,i=r.removed;i.push.apply(i,eu(r.updatedOld));var o,A,a=r.added;a.push.apply(a,eu(r.updatedNew));for(var s=this.childrenMap,u=this.modelsMap.paramsChildrenMap,c=0,l=i.length;c<l;++c){if(delete n[A=i[c].id],(o=s[A])&&o.length>0)for(var g=0,f=o.length;g<f;++g)delete u[o[g]];delete s[A]}for(var h=0,p=a.length;h<p;++h)n[A=a[h].id]=a[h].$model,o=[],a[h].visit((function(e){A=e.getId(),o.push(A),u[A]=e,Es.put(e)}),!0),s[A]=o}},{key:"initState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.updateState(Zs(Zs({},e),new uu)),this.state}},{key:"initModelBindingState",value:function(e){}},{key:"bindDesign",value:function(e){var t=this.reactiveModelState;t||(t=new(os.a.createBase({defaultArrayItemSyncPoint:function(e,t){return!0},shouldIgnoreBinderCheck:function(e){return e&&e.type===cA}}))(this.updateState.bind(this),this.isImmutable),this.reactiveModelState=t);var r=e.getDoc();t.initModelState({paramModels:Object(is.bindArray)(r.addDependency((function(){return e.getCustom().getParamModels()}),t)).map(r.addDependency((function(e){var t=Es.get(e,!0);return t.asStub(),t}),t)),paramModelAssembies:Object(is.bindArray)(r.addDependency((function(){return e.getCustom().getParamModelAssemblies()}),t)).map(r.addDependency((function(e){return e}),t))})}},{key:"findModelEx",value:function(e,t){return t(e,this.modelsMap)}},{key:"findModel",value:function(e){var t=this.findModelEx(e,cu);return t?Es.get(t):void 0}},{key:"findParamModelAssembly",value:function(e){return this.state.paramModelAssembies.find((function(t){return t.id===e}))}}])&&ru(t.prototype,r),n&&ru(t,n),o}(Bi.KafBaseStateManager);function gu(e){return(gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pu(e,t,r){return(pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Cu(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function du(e,t){return(du=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Iu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cu(e);if(t){var i=Cu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yu(this,r)}}function yu(e,t){return!t||"object"!==gu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cu(e){return(Cu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}lu.EVENT_PARAM_MODELS_CHANGED="EVENT_PARAM_MODELS_CHANGED";var Eu,Bu=Object(sA.getConnector)().setRootState,vu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&du(e,t)}(o,e);var t,r,n,i=Iu(o);function o(){var e;return fu(this,o),(e=i.apply(this,arguments)).design=new ot,e.fittingDesign=new Kt,e}return t=o,(r=[{key:"initState",value:function(){pu(Cu(o.prototype),"initState",this).call(this);var e=dc().getDependentPlugin(Bi.AppServicePlugin);return this.kaf=e.stateManager,this.pad.bindDesign(this.design),this.state}}])&&hu(t.prototype,r),n&&hu(t,n),o}(Bi.types.combine({pad:lu}));function mu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){e[e.NONE=0]="NONE",e[e.NORMAL=0]="NORMAL",e[e.ENCRYPTED=1]="ENCRYPTED",e[e.COMPRESSED=2]="COMPRESSED"}(Eu||(Eu={}));var Qu=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"toNetParams",value:function(e,t,r){var n={};return n.api=e,n.params=t?t.params:void 0,n.data=r,void 0===n.data&&(n.data=t?t.data:void 0),n.headers=t&&t.headers||{},n}},{key:"toAxiosConfig",value:function(e){e.method||(e.method=Ei.ERequest.GET),e.method===Ei.ERequest.GET&&e.data&&(e.params?Object.keys(e.data).forEach((function(t){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==e.params[t]&&console.warn("HTTP GET params ["+t+"] overwrited by data"),e.params[t]=e.data[t]})):e.params=e.data,delete e.data);var t={};if(t.url=e.url||e.api,t.params=e.params,t.data=e.data,t.headers=e.headers,t.method=e.method,e.extend){var r=t,n=e.extend;Object.keys(n).forEach((function(e){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==r[e]&&console.warn("[CUSTOM] Request config ["+e+"] overwrited by extend"),r[e]=n[e]}))}return t}}],(r=null)&&mu(t.prototype,r),n&&mu(t,n),e}();function bu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var _u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.net=t}var t,r,n;return t=e,(r=[{key:"addClientInterceptors",value:function(e){}},{key:"encryptedGet",value:function(e,t){return this._get(Eu.ENCRYPTED,e,t)}},{key:"encryptedDelete",value:function(e,t){return this._delete(Eu.ENCRYPTED,e,t)}},{key:"encryptedPost",value:function(e,t,r){return this._post(Eu.ENCRYPTED,e,t,r)}},{key:"encryptedPut",value:function(e,t,r){return this._put(Eu.ENCRYPTED,e,t,r)}},{key:"gzipGet",value:function(e,t){return this._get(Eu.COMPRESSED,e,t)}},{key:"gzipPost",value:function(e,t,r){return this._post(Eu.COMPRESSED,e,t,r)}},{key:"request",value:function(e){var t=Qu.toNetParams(e.url,e);return this.net.get(t)}},{key:"get",value:function(e,t){return this._get(Eu.NORMAL,e,t)}},{key:"delete",value:function(e,t){return this._delete(Eu.NORMAL,e,t)}},{key:"post",value:function(e,t,r){return this._post(Eu.NORMAL,e,t,r)}},{key:"put",value:function(e,t,r){return this._put(Eu.NORMAL,e,t,r)}},{key:"_get",value:function(e,t,r){var n=Qu.toNetParams(t,r);return this.net.get(n,{mode:e})}},{key:"_delete",value:function(e,t,r){var n=Qu.toNetParams(t,r);return this.net.delete(n,{mode:e})}},{key:"_post",value:function(e,t,r,n){var i=Qu.toNetParams(t,n,r);return this.net.post(i,{mode:e})}},{key:"_put",value:function(e,t,r,n){var i=Qu.toNetParams(t,n,r);return i.method="PUT",this.net.request(i,{mode:e})}}])&&bu(t.prototype,r),n&&bu(t,n),e}();function Su(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Su(Object(r),!0).forEach((function(t){Du(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Su(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Du(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ru(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Mu(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Ru(o,n,i,A,a,"next",e)}function a(e){Ru(o,n,i,A,a,"throw",e)}A(void 0)}))}}function xu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Pu=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e=Mu(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.request(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.get=function(){var e=Mu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(wu(wu({},n),{},{url:r})),e.next=4,t.service.get(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.delete=function(){var e=Mu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(wu(wu({},n),{},{url:r})),e.next=4,t.service.delete(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.post=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.post(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.put=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.put(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedRequest=function(){var e=Mu(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.encryptedRequest(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedGet=function(){var e=Mu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(wu(wu({},n),{},{url:r})),e.next=4,t.service.encryptedGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedDelete=function(){var e=Mu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(wu(wu({},n),{},{url:r})),e.next=4,t.service.encryptedDelete(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedPost=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.encryptedPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedPut=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.encryptedPut(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipRequest=function(){var e=Mu(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.gzipRequest(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipGet=function(){var e=Mu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(wu(wu({},n),{},{url:r})),e.next=4,t.service.gzipGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipPost=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.gzipPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipPut=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.gzipPut(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.pbGzipGet=function(){var e=Mu(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(wu(wu({},n),{},{url:r})),e.next=4,t.service.pbGzipGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.pbGzipPost=function(){var e=Mu(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(wu(wu({},i),{},{data:n,url:r})),e.next=4,t.service.pbGzipPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}var t,r,n;return t=e,(r=[{key:"service",get:function(){if(!this._service)throw new Error("please call setRequestClient before getRequestClient.");return this._service}},{key:"setMiniAppHttpProxyClientService",value:function(e){return this._service=e,this}},{key:"convertRequest",value:function(e){var t,r;return{url:e.url,method:e.method,baseURL:e.baseURL,params:e.params,data:e.data,timeout:e.timeout,extra:{isRequestBodyJson:null===(r=null===(t=e)||void 0===t?void 0:t.extra)||void 0===r?void 0:r.isRequestBodyJson}}}},{key:"wrapResponse",value:function(e,t){return{data:t.data,status:200,statusText:"ok",headers:{},config:e,encryptedDataLength:0,dataLength:0}}}])&&xu(t.prototype,r),n&&xu(t,n),e}(),Tu=r(1120),Fu=r(31),Lu=r(213),Ou=r(162),ku=r(92);function Nu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gu(e,t){return(Gu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Vu(e);if(t){var i=Vu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ju(this,r)}}function ju(e,t){return!t||"object"!==Yu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vu(e){return(Vu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yu(e){return(Yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Hu,Ku,qu,Ju,Wu,zu,Xu,Zu,$u=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Yu(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ec=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Yu(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},tc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gu(e,t)}(r,e);var t=Uu(r);function r(){var e;return Nu(this,r),(e=t.apply(this,arguments)).client=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.encryptedClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.encryptInterceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.gzippedEncryptClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.gzipEncryptBase64Interceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.pbEncryptedClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.encryptInterceptorWithArrayBuffer,Fu.encryptInterceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.pbGzippedEncryptClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.gzipEncryptInterceptorWithArrayBuffer,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.ossGzippedEncryptClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.gzipEncryptBase64Interceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.ossDegradedEncryptedClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.ossDegradedEncryptInterceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e.ossDegradedGzippedEncryptClient=Object(Ou.getClient)([Fu.interceptor,Lu.errorCodeInterceptor,Fu.ossDegradedGzipEncryptBase64Interceptor,Fu.parseCDNInterceptor,Fu.parseJSONInterceptor]),e}return r}(Tu.RequestClient);$u([Fu.retryRequest,ec("design:type","function"==typeof(Hu=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?Hu:Object)],tc.prototype,"client",void 0),$u([Fu.retryRequest,ec("design:type","function"==typeof(Ku=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?Ku:Object)],tc.prototype,"encryptedClient",void 0),$u([Fu.retryRequest,ec("design:type","function"==typeof(qu=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?qu:Object)],tc.prototype,"gzippedEncryptClient",void 0),$u([Fu.retryRequest,ec("design:type","function"==typeof(Ju=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?Ju:Object)],tc.prototype,"pbEncryptedClient",void 0),$u([Fu.retryRequest,ec("design:type","function"==typeof(Wu=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?Wu:Object)],tc.prototype,"pbGzippedEncryptClient",void 0),$u([Object(Fu.retryRequest)(!0),ec("design:type","function"==typeof(zu=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?zu:Object)],tc.prototype,"ossGzippedEncryptClient",void 0),$u([Fu.retryRequest,ec("design:type","function"==typeof(Xu=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?Xu:Object)],tc.prototype,"ossDegradedEncryptedClient",void 0),$u([Fu.retryRequest,ec("design:type","function"==typeof(Zu=void 0!==ku.AxiosInstance&&ku.AxiosInstance)?Zu:Object)],tc.prototype,"ossDegradedGzippedEncryptClient",void 0);var rc=Object(Rt.once)((function(){return new tc})),nc=Object(Rt.once)((function(){return new Pu}));function ic(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function oc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Ac=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n,i,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){return rc().addClientInterceptors(e)}},{key:"send",value:(i=s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=rc(),i=Qu.toAxiosConfig(t),r.mode!==Eu.COMPRESSED){e.next=6;break}return e.abrupt("return",n.gzipRequest(i));case 6:if(r.mode!==Eu.ENCRYPTED){e.next=10;break}return e.abrupt("return",n.encryptedRequest(i));case 10:return e.abrupt("return",n.request(i));case 11:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){ic(o,r,n,A,a,"next",e)}function a(e){ic(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e,t){return o.apply(this,arguments)})}])&&oc(t.prototype,r),n&&oc(t,n),e}();function ac(e){return(ac="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uc(e,t,r){return(uc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=fc(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function cc(e,t){return(cc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fc(e);if(t){var i=fc(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gc(this,r)}}function gc(e,t){return!t||"object"!==ac(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fc(e){return(fc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hc=new Ei.SingletonRef,pc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cc(e,t)}(o,e);var t,r,n,i=lc(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.core",name:"cCoreApp",Component:Mi,axrs:oo,singleton:hc},e)).stateManager=t,r}return t=o,(r=[{key:"init",value:function(){uc(fc(o.prototype),"init",this).call(this),this.onInitialize()}},{key:"onInitialize",value:function(){var e=this.getDependentPlugin(Bi.AppServicePlugin);this.initLogger(e);var t=this.stateManager,r=t.design,n=t.fittingDesign;Ho.configTopDocumentAction([r],e.stateManager.document),e.addDocumentSource(new Xo(r,"custom-pad-document")),e.addDocumentSource(new aA(n,"fitting-document"));var i=r.getDoc().getElementContext();i.getterEmitter.on((function(e){Dt.advanced.reportObserved(e.instance)})),i.setterEmitter.on((function(e){Dt.advanced.reportChanged(e.instance)}))}},{key:"initLogger",value:function(e){var t;t=e.logger,Vi=t}},{key:"initStateManager",value:function(){this.stateManager.initState(),Bu(this.stateManager)}},{key:"initNet",value:function(){uc(fc(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new Ac),this.client=new _u(this.net)}}])&&sc(t.prototype,r),n&&sc(t,n),o}(Ei.PluginApplication),dc=hc.instance;function Ic(e){return function(e){if(Array.isArray(e))return yc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return yc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yc(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Cc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ec(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bc(e,t){var r=t.findRelativeModel,n=t.transformModel,i=t.color,o=t.defaultConfig;return Object(Rt.map)(e,(function(e,t){var A=r(t);return A?Object(Rt.map)(e,(function(e){var t=n(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cc(Object(r),!0).forEach((function(t){Ec(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),A,o);return i&&t.setViewColor(i),t})):(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前孔槽找不到对应模型!"),[])})).flat()}function vc(e,t){if(!(e instanceof wr&&e.type===_.NONE)){var r=dc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=e.path.plankArea.modelID,o=n.find((function(t){return t.id===e.id&&t.linkModel.id===i})),A=e.getHint();if(o)o.setViewColor(A.color),o.setOpacity(A.opacity);else{var a=function(e){var t=e instanceof Qr?e.getRealLine():e.getCurveLineAndPoints().curveLine;if(t instanceof u.Arc2d||t instanceof u.EllipticalArc2d){var r=e.path.getAllCurves().map((function(e){return e.curve}));if(t instanceof u.Arc2d){var n=t.circle.clone();n.radius+=1,t=new u.Arc2d(n,t.startAngle,t.endAngle,t.isCCW),e.path.type===Qe.OUTER!=(u.PtInLoop.pointInLoop2D(t.middlePoint,r).ptInLoopType===u.PtInLoop.PtInLoopType.Outside)&&(n.radius-=2,t=new u.Arc2d(n,t.startAngle,t.endAngle,t.isCCW))}if(t instanceof u.EllipticalArc2d){var i=t.ccs,o=t.majorRadius+1,A=t.minorRadius+1,a=t.startParam,s=t.endParam,c=t.clockSign;t=new u.EllipticalArc2d(i,o,A,a,s,c),e.path.type===Qe.OUTER!=(u.PtInLoop.pointInLoop2D(t.middlePoint,r).ptInLoopType===u.PtInLoop.PtInLoopType.Outside)&&(o=t.majorRadius-1,A=t.minorRadius-1,t=new u.EllipticalArc2d(i,o,A,a,s,c))}}return t}(e);t&&a.transform(t);var s=function(e){var t,r=e.linkModelId,n=e.hintModelId,i=e.curveLine,o=e.hint,A=dc().getStateManager().pad.findModelOrAssemblyModelById(r);if(A){var a=null===(t=A.getParam("thickness"))||void 0===t?void 0:t.getData().value,s=i instanceof u.EllipticalArc2d?i.getApproximatePoints(.01):i.getApproximatePoints();return new wn({linkModel:A,points:s,color:o.color,opacity:o.opacity,height:a?+a:0,id:n})}}({hint:A,curveLine:a,hintModelId:e.id,linkModelId:i});s&&r.setPlankOutlineHintModels([].concat(Ic(n),[s]))}}}var mc=r(0);function Qc(e){return(Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
|
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:L(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:L(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=L(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=L(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),Le=r.n(Fe),Oe=r(44),ke=r.n(Oe),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(360),Ze=r(99),$e=r.n(Ze),et=r(1117);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),Lt=r(2),Ot=r(526),kt=Object(Ot.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(Lt.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)||Or(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lr(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Or(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 Or(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=Lr(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=Lr(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 Ln=[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 On(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(On(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 Le.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);On(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(719),Un=r(720),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(427),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=Ln.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(23),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=Li(e);if(t){var i=Li(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Fi(this,r)}}function Fi(e,t){return!t||"object"!==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 Li(e){return(Li=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Oi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pi(e,t)}(o,e);var t,r,n,i=Ti(o);function o(){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(718),Io=r(423);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(527),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 Lo=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.doc=t,this.key=r,this.BackupItemImpl=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 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 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"!==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 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 Lo(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 Lo(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}(Lo);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=Lt.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),LA=function(e){wA(r,e);var t=RA(r);function r(){return SA(this,r),t.apply(this,arguments)}return r}(FA);LA=TA([Object(Si.provideEntityAPIs)([new Si.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],LA);var OA=r(6),kA=r.n(OA),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 OA.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 OA.BufferGeometry).addAttribute("position",new OA.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}(OA.LineSegments),ZA=r(359),$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:OA.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(Lt.isEmpty)(g)){e.next=12;break}(f=null==n?void 0:n.getDiffuseColor())&&(c.color=new OA.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:OA.WebGLTextureWrap.Repeat,wrapT:OA.WebGLTextureWrap.Repeat,cacheReject:!0});case 20:(p=e.sent).repeat=new OA.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 OA.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 OA.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 OA.BufferGeometry,r=new Uint32Array(e.indices),n=new Float32Array(e.vertices),i=new Float32Array(e.normals),o=new Float32Array(e.textures),t.index=new OA.BufferAttribute(r,1),t.addAttribute("position",new OA.BufferAttribute(n,3)),t.addAttribute("uv",new OA.BufferAttribute(o,2)),i&&i.length?t.addAttribute("normal",new OA.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}(OA.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 OA.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(Lt.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 OA.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 La(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Oa(e,t,r){return t&&La(e.prototype,t),r&&La(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 LA(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 Oa(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 Oa(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 OA.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(727);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(Lt.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(Lt.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,Ls,Os,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(Ls=void 0!==Te.a&&Te.a)?Ls:Object)],Vs.prototype,"box3",void 0),Ns([js.lazy(),Gs("design:type","function"==typeof(Os=void 0!==Ss.ParamStore&&Ss.ParamStore)?Os: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&>.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&>.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 Lu(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 Ou(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Lu(o,n,i,A,a,"next",e)}function a(e){Lu(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=Ou(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=Ou(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=Ou(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=Ou(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=Ou(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=Ou(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=Ou(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=Ou(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=Ou(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=Ou(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=Ou(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=Ou(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=Ou(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=Ou(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=Ou(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=Ou(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(1120),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(Lt.once)((function(){return new ac})),uc=Object(Lt.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:Oi,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(Lt.map)(e,(function(e,t){var A=r(t);return A?Object(Lt.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)}
|
|
82
82
|
/*!
|
|
83
83
|
* @qunhe/custom-miniapp-outer-sdk v0.19.10-alpha.1
|
|
84
84
|
* (c) 2022
|
|
85
85
|
* @license MIT
|
|
86
|
-
*/var
|
|
86
|
+
*/var Mc,xc,Pc,Tc,Fc,Lc,Oc;
|
|
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 xc(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function Pc(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(xc(arguments[t]));return e}!function(e){e.INNER_SPACE="INNER_SPACE",e.PARTITION_TOOL="PARTITION_TOOL"}(bc||(bc={})),function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAIL=-1]="FAIL"}(_c||(_c={})),function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=6]="TEMPLATE_ASSEMBLY"}(Sc||(Sc={})),function(e){e[e.ATTRIBUTE=0]="ATTRIBUTE",e[e.STORE=1]="STORE",e[e.BZ_STORE=2]="BZ_STORE"}(wc||(wc={})),function(e){e.NAME="name",e.REMARK="remark",e.POSITION="position",e.ROTATION="rotation",e.TOOL_TYPE="toolType"}(Dc||(Dc={})),function(e){e[e.ACCESSORY=0]="ACCESSORY",e[e.CHILD=1]="CHILD"}(Rc||(Rc={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(Mc||(Mc={}));var Tc,Fc,Lc,Oc,kc,Nc,Gc,Uc,jc,Vc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Yc=new Array(36);function Hc(e,t,r){return void 0===r&&(r="-"),[t,e].map((function(e){return e.replace(new RegExp("^"+r+"+|"+r+"+$","g"),"")})).filter((function(e){return!!e.trim()})).join(r)}!function(e){e[e.GROOVE=1]="GROOVE",e[e.HOLE=2]="HOLE",e[e.HARDWARE=3]="HARDWARE",e[e.HARDWARE_GROOVE=4]="HARDWARE_GROOVE",e.INTERSECTED="intersected"}(Tc||(Tc={})),function(e){e.SHELL="1",e.FACE="2"}(Fc||(Fc={})),function(e){e[e.BOTH_PLANK=0]="BOTH_PLANK",e[e.PLANK_FURNITURE=1]="PLANK_FURNITURE"}(Lc||(Lc={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.LOCK=1]="LOCK",e[e.UNLOCK=2]="UNLOCK",e[e.RAW=3]="RAW"}(Oc||(Oc={})),function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(kc||(kc={})),function(e){e.number="number",e.string="string",e.boolean="boolean"}(Nc||(Nc={})),function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE",e[e.ELLIPSE=4]="ELLIPSE"}(Gc||(Gc={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(Uc||(Uc={})),function(e){e.Cabinet="Cabinet",e.Wardrobe="Wardrobe",e.DoorWindow="DW",e.CabinetCopy="Cabinet_Copy",e.WardrobeCopy="Wardrobe_Copy",e.DoorWindowCopy="DW_Copy"}(jc||(jc={}));var Kc=new Map([[jc.Cabinet,0],[jc.Wardrobe,1],[jc.DoorWindow,2],[jc.CabinetCopy,4],[jc.WardrobeCopy,5],[jc.DoorWindowCopy,6]]),qc=function(){function e(){this.namespace=""}return e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getValue=function(){return function(e,t){if(null!=e){if(t===Nc.boolean)return Boolean(parseFloat(e));if(t===Nc.number)return parseFloat(e)}return e}(this.value,this.type)},e.prototype.getNamespace=function(){return this.namespace},e.prototype.setValue=function(e){var t;if(!this.readonly&&this.ref){var r=null!==(t=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==t?t:1024,n=function(e,t){if(t===Nc.boolean)return e?"1":"0";return e.toString()}(e,this.type);if(function(e){for(var t=e.length,r=e.length-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:wc.BZ_STORE,attr:Hc(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},e.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:wc.BZ_STORE,attr:Hc(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},e.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},e}();var Jc,Wc=function(){function e(){this.data={name:"",displayName:"",type:kc.FIT,value:""}}return e.prototype.getValue=function(){return this.data.value},e.prototype.setValue=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:wc.STORE,attr:this.data.name},this.getValue(),e),this.data.value=e)},e.prototype.toJSON=function(){return this.data},e.prototype.getMin=function(){return this.data.min},e.prototype.getEditable=function(){return!0===this.data.editable},e.prototype.getMax=function(){return this.data.max},e.prototype.getOptionValues=function(){return this.data.optionValues||[]},e.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},e.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},e.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},e.prototype.setPrimitiveOverride=function(e){this.getEditable()&&(this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:wc.STORE,attr:this.data.name},this.data.primitiveOverride,e),this.data.primitiveOverride=e)},e.prototype.getStep=function(){return this.data.step},e.prototype.getType=function(){return this.data.type},e.prototype.getParsedValue=function(){return this.getValue()},e.prototype.setParsedValue=function(e){return this.setValue(e)},e}();function zc(e){var t=new Wc;return t.data=e,t}!function(e){e.SENSE="SENSE",e.BRANDGOOD="BRANDGOOD",e.CATEGORY="CATEGORY",e.TEMPLATE_ID="TEMPLATE_ID"}(Jc||(Jc={}));var Xc,Zc,$c,el,tl,rl,nl,il=function(){function e(e){this.option=e,this._changeMap={}}return Object.defineProperty(e.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),e.prototype.getRoot=function(e){var t=this.isRoot?this:this.root;if(e)for(var r;r=null==t?void 0:t.getParent();)t=r.getRoot()||t;return t},e.prototype.clone=function(){if(this.type===Sc.PARAM_PRIMITIVE)throw new Error("Primitive model don't support to clone!");var t=this.toJSON(),r=e.deserialize(JSON.stringify(t));return r._changeMap.cloned=!0,r._changeMap.forceUpdate=void 0,r._changeMap.originId||(r._changeMap.originId=r.id),r.id=function(){for(var e=0,t=0;t<36;t++)if(8===t||13===t||18===t||23===t)Yc[t]="-";else if(14===t)Yc[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,Yc[t]=Vc[19===t?3&r|8:r]}return Yc.join("")}(),r},e.prototype.getName=function(){return this.name},e.prototype.setName=function(e){this.__trackUpdateField({type:wc.ATTRIBUTE,attr:"name"},this.name,e),this.name=e},e.prototype.getRemark=function(){return this.remark},e.prototype.setRemark=function(e){this.__trackUpdateField({type:wc.ATTRIBUTE,attr:Dc.REMARK},this.remark,e),this.remark=e},e.prototype.setRotate=function(e){this.setRotation(e)},e.prototype.getRotate=function(){return this.getRotation()},e.prototype.setRotation=function(e){if(!this.isRoot)throw new Error("Non-root model don't support to set rotation!");var t=this.getRoot(!0).type;if(t===Sc.PARAM_ASSEMBLY||t===Sc.TEMPLATE_ASSEMBLY)throw new Error("Root-model under Assembly don't support to set rotation!");this.__trackUpdateField({type:wc.ATTRIBUTE,attr:Dc.ROTATION},this.rotation,e),this.rotation=e},e.prototype.getRotation=function(){return this.rotation},e.prototype.setPosition=function(e){if(!this.isRoot)throw new Error("Non-root model don't support to set position!");var t=this.getRoot(!0).type;if(t===Sc.PARAM_ASSEMBLY||t===Sc.TEMPLATE_ASSEMBLY)throw new Error("Root-model under Assembly don't support to set position!");this.__trackUpdateField({type:wc.ATTRIBUTE,attr:Dc.POSITION},this.position,e),this.position=e},e.prototype.getPosition=function(){return this.position},e.prototype.getToolType=function(){return this.toolType},e.prototype.setToolType=function(e){var t,r=Kc.get(e);if(this._origin===Jc.BRANDGOOD&&void 0!==r&&(null===(t=this.option)||void 0===t?void 0:t.allowToolTypes)){if(!this.option.allowToolTypes.includes(r))throw new Error("the custom model not support "+e+" tool");return this.__trackUpdateField({type:wc.ATTRIBUTE,attr:Dc.TOOL_TYPE},this.toolType,e),void(this.toolType=e)}throw new Error("the custom model not support set tool type!")},e.prototype.dispose=function(){if(this.getRoot()._origin!==Jc.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){if(ol(this,e,!1),!this.children.some((function(t){return t.id===e.id}))){e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:Rc.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){if(ol(this,e,!0),!this.accessories.some((function(t){return t.id===e.id}))){e.root=void 0,e._parent=this,this.accessories.push(e);var t=this._changeMap.addNodes;t||(t=[],this._changeMap.addNodes=t),t.push({type:Rc.ACCESSORY,linkId:e.id})}},e.prototype.getParam=function(e){var t=this.params.get(e);return t&&!t.ref&&(t.ref=this),t},e.prototype.hasParam=function(e){return this.params.has(e)},e.prototype.getBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=Hc(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:""),o=this.bzProperties.get(i);return o&&!o.ref&&(o.ref=this),o},e.prototype.hasBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=Hc(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(i)},e.prototype.removeBzProperty=function(e,t){return!!this.hasBzProperty(e,t)&&(this.getBzProperty(e,t).remove(),!0)},e.prototype.toJSON=function(e,t){void 0===t&&(t=!0);var r=t&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,size:r.size,option:r.option,params:Array.from(r.params).map((function(e){var t=xc(e,2);return[t[0],t[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(e){var t=xc(e,2);return[t[0],t[1].toJSON()]})),productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(e){return e.toJSON(void 0,!1)})),accessories:r.accessories.map((function(e){return e.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin};return t&&r!==this&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(t){var r=this,n=JSON.parse(t);return function e(t,r,n,i){void 0===r&&(r=new Map);void 0===i&&(i=function(e,t){return new il(e.option)});var o=i(t,n);o.id=t.id,o.type=t.type,o.name=t.name,o.remark=t.remark,o.position=t.position,o.rotation=t.rotation||t.rotate,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],zc(e[1])]}))),o.bzProperties=new Map((t.bzProperties||[]).map((function(e){return[e[0],(t=e[1],r=new qc,Object.assign(r,t),r)];var t,r}))),o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o.toolType=t.toolType,o._origin=t._origin,o._changeMap=t._changeMap,!t.isRoot&&n&&(o.root=n);r.set(o.id,o);var A=o.isRoot?o:n;if(o.children=t.children.map((function(t){return e(t,r,A||o,i)})),o.accessories=t.accessories.map((function(t){return e(t,r,A||o,i)})),Pc(o.children,o.accessories).forEach((function(e){return e._parent=o})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(n,void 0,void 0,(function(t,i){return void 0!==n._currentId||i?n._currentId===t.id?r:new e(t.option):(r.option=n.option,r)}))},e.serialize=function(e){return e.serialize()},e.deserialize=function(t){var r=new e;return r.deserialize(t),r},e.prototype.__trackUpdateField=function(e,t,r){var n=this._changeMap.update;n||(n=[]),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&(n.push(e),this._changeMap.update=n)},e.prototype.getParent=function(){var e=this;if(this._parent)return this._parent;var t=function(t){return t.id===e.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var i=n.getChild(),o=n.getAccessory();if(i.some(t)||o.some(t))return this._parent=n,n;r.push.apply(r,Pc(i)),r.push.apply(r,Pc(o))}},e.prototype.forceUpdate=function(e){if(void 0===e&&(e=!0),!this.productId)throw new Error("Can't force-update model without productId");if(this._origin!==Jc.SENSE||!this.isRoot)throw new Error("only the root param models in design support force update!");this._changeMap.forceUpdate=e},e}();function ol(e,t,r){var n=r?"accessory":"child";if([Sc.PARAM_ASSEMBLY,Sc.TEMPLATE_ASSEMBLY,Sc.PARAM_FURNITURE,Sc.PARAM_PRIMITIVE].includes(e.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model don't support to append "+n+"!");if(t.type===Sc.TEMPLATE_ASSEMBLY||t.type===Sc.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(t._origin===Jc.SENSE||t._origin===Jc.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(r&&!t.isRoot)throw new Error("Only root model can be append as accessory!")}!function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(Xc||(Xc={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW",e[e.CABINET_COPY=4]="CABINET_COPY",e[e.WARDROBE_COPY=5]="WARDROBE_COPY",e[e.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(Zc||(Zc={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}($c||($c={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(el||(el={})),function(e){e[e.PUBLIC=0]="PUBLIC",e[e.PROTECTED=1]="PROTECTED",e[e.PRIVATE=2]="PRIVATE",e[e.INNER=4]="INNER"}(tl||(tl={})),function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY"}(rl||(rl={})),function(e){e.PARAM_MODEL_ASSEMBLY="PARAM_MODEL_ASSEMBLY",e.FRAME="FRAME"}(nl||(nl={}));
|
|
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"}(Lc||(Lc={})),function(e){e[e.COMMON=0]="COMMON",e[e.ASSEMBLY=1]="ASSEMBLY",e[e.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(Oc||(Oc={}));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:Lc.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:Lc.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={}));
|
|
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 Al=function(e,t){return(Al=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function al(e,t){function r(){this.constructor=e}Al(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var sl,ul,cl=function(){return(cl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function ll(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Qc(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}!function(e){e[e.Local=0]="Local",e[e.OnLine=1]="OnLine"}(sl||(sl={})),function(e){e.TOP_BAR="TOP_BAR",e.SM="SM"}(ul||(ul={}));var gl,fl,hl,pl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getAvailableMiniApp=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getAvailableMiniApp"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.available.app",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e.sense2d="s2d",e.sense3d="s3d"}(gl||(gl={})),function(e){e[e.innerSpace=0]="innerSpace",e[e.defineSelf=1]="defineSelf",e[e.specialCut=2]="specialCut",e[e.partitionTools=3]="partitionTools"}(fl||(fl={})),function(e){e.RIGHT_FUNCTION_PANEL="RIGHT_FUNCTION_PANEL",e.DIALOG_CENTER="DIALOG_CENTER",e.FULL_SCREEN="FULL_SCREEN",e.DRAGGABLE_PANEL="DRAGGABLE_PANEL"}(hl||(hl={})),function(e){e.LEFT_TOP="LEFT_TOP",e.LEFT_BOTTOM="LEFT_BOTTOM",e.RIGHT_TOP="RIGHT_TOP",e.RIGHT_BOTTOM="RIGHT_BOTTOM",e.DEFINE_SELF="DEFINE_SELF"}(pl||(pl={}));var dl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.loadMode=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.isOpened=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.close=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.bootstrap=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.bootstrapDev=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"loadMode"),ll([mc.anno.decl.api()],t.prototype,"isOpened"),ll([mc.anno.decl.api()],t.prototype,"close"),ll([mc.anno.decl.event()],t.prototype,"loaded"),ll([mc.anno.decl.api({ACL:tl.PROTECTED})],t.prototype,"bootstrap"),ll([mc.anno.decl.api({ACL:tl.PRIVATE})],t.prototype,"bootstrapDev"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.bootstrap",version:"1.0.0"})],t)}(mc.ServService);!function(e){e.Undo="undo",e.Redo="redo",e.Clear="clear"}(dl||(dl={}));var Il;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.handleTopBarIconClick=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"handleTopBarIconClick"),t=ll([mc.anno.decl({id:"com.custom.miniapp.topbar.handle",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getDesignBaseInfo=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api({ACL:tl.PROTECTED})],t.prototype,"getDesignBaseInfo"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.design.base.info",version:"1.0.0",ACL:tl.PROTECTED})],t)}(mc.ServService);!function(e){e[e.none=0]="none",e[e.onlyUndo=1]="onlyUndo",e[e.onlyRedo=2]="onlyRedo",e[e.both=3]="both"}(Il||(Il={}));var yl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getDocStackState=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.doUndo=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.doRedo=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"docStackState"),ll([mc.anno.decl.api()],t.prototype,"getDocStackState"),ll([mc.anno.decl.event()],t.prototype,"undo"),ll([mc.anno.decl.api()],t.prototype,"doUndo"),ll([mc.anno.decl.event()],t.prototype,"redo"),ll([mc.anno.decl.api()],t.prototype,"doRedo"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.action.shortcut",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.confirm=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"confirm"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.dialog",version:"1.0.0"})],t)}(mc.ServService);!function(e){e.ok="ok",e.cancel="cancel",e.close="close"}(yl||(yl={}));var Cl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.open=function(e,t){return Object(mc.API_UNSUPPORT)()},t.prototype.close=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"whenSelected"),ll([mc.anno.decl.api()],t.prototype,"open"),ll([mc.anno.decl.api()],t.prototype,"close"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.product.select",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.success=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.error=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.info=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.warn=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.loading=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"success"),ll([mc.anno.decl.api()],t.prototype,"error"),ll([mc.anno.decl.api()],t.prototype,"info"),ll([mc.anno.decl.api()],t.prototype,"warn"),ll([mc.anno.decl.api()],t.prototype,"loading"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.toast",version:"1.0.0"})],t)}(mc.ServService);!function(e){e.LEFT_PANEL="leftPanel",e.BOTTOM_BAR="bottomBar",e.TOP_BAR="topbar",e.RIGHT_SIDE_VIEWER_PANEL="rightSideViewerPanel",e.RIGHT_SIDE_BOTTOM_CONTAINER="rightSideBottomContainer"}(Cl||(Cl={}));var El;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.hideAllMenuItems=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.showAllMenuItems=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.hidePanel=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.showPanel=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.notify()],t.prototype,"hideAllMenuItems"),ll([mc.anno.decl.notify()],t.prototype,"showAllMenuItems"),ll([mc.anno.decl.notify()],t.prototype,"hidePanel"),ll([mc.anno.decl.notify()],t.prototype,"showPanel"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.ui",version:"1.0.0"})],t)}(mc.ServService);!function(e){e.SCENE_2D="SCENE_2D",e.SCENE_3D="SCENE_3D"}(El||(El={}));var Bl,vl,ml,Ql,bl,_l;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.currentMainView=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.switchMainViewSceneTo=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watchMainViewSense"),ll([mc.anno.decl.api()],t.prototype,"currentMainView"),ll([mc.anno.decl.notify()],t.prototype,"switchMainViewSceneTo"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.scene",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelected=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.select=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.setSelectAbleByCategories=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.setSelectedByCategories=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"getSelected"),ll([mc.anno.decl.api()],t.prototype,"unSelected"),ll([mc.anno.decl.api()],t.prototype,"select"),ll([mc.anno.decl.api()],t.prototype,"setSelectAbleByCategories"),ll([mc.anno.decl.api()],t.prototype,"setSelectedByCategories"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.selected.model",version:"1.0.0"})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getParamModelPhotoById=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getParamModelPhotoById"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.param.model.data.info.service",version:"1.0.0"})],t)}(mc.ServService);!function(e){e[e.TopToBottom=0]="TopToBottom",e[e.LeftToRight=1]="LeftToRight",e[e.FrontToBack=2]="FrontToBack"}(Bl||(Bl={})),function(e){e[e.LeftBack=0]="LeftBack",e[e.LeftFront=1]="LeftFront",e[e.RightBack=2]="RightBack",e[e.RightFront=3]="RightFront",e[e.TopSide=4]="TopSide",e[e.BottomSide=5]="BottomSide",e[e.LeftSide=6]="LeftSide",e[e.RightSide=7]="RightSide"}(vl||(vl={})),function(e){e[e.BackLeftTop=1]="BackLeftTop",e[e.BackLeftBottom=2]="BackLeftBottom",e[e.FrontLeftTop=3]="FrontLeftTop",e[e.FrontLeftBottom=4]="FrontLeftBottom",e[e.BackRightTop=5]="BackRightTop",e[e.BackRightBottom=6]="BackRightBottom",e[e.FrontRightTop=7]="FrontRightTop",e[e.FrontRightBottom=8]="FrontRightBottom",e[e.FrontTopSide=9]="FrontTopSide",e[e.FrontBottomSide=10]="FrontBottomSide",e[e.FrontLeftSide=11]="FrontLeftSide",e[e.FrontRightSide=12]="FrontRightSide",e[e.BackTopSide=13]="BackTopSide",e[e.BackBottomSide=14]="BackBottomSide",e[e.BackLeftSide=15]="BackLeftSide",e[e.BackRightSide=16]="BackRightSide",e[e.BackAll=17]="BackAll",e[e.FrontAll=18]="FrontAll",e[e.Inside=19]="Inside",e[e.OutSide=20]="OutSide",e[e.All=21]="All"}(ml||(ml={})),function(e){e[e.drawer=1]="drawer",e[e.pole=2]="pole"}(Ql||(Ql={})),function(e){e[e.INSIDE=0]="INSIDE",e[e.FULL_COVER=1]="FULL_COVER"}(bl||(bl={})),function(e){e[e.no=0]="no",e[e.yes=1]="yes"}(_l||(_l={}));var Sl,wl,Dl,Rl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.highlightCornerCut=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.getStructures=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.activeWardrobeMsg=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.updateStructuresMsg=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.cutWardrobeMsg=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.delOneStructureMsg=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.onMiniAppOpen=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"highlightCornerCut"),ll([mc.anno.decl.api()],t.prototype,"getStructures"),ll([mc.anno.decl.api()],t.prototype,"activeWardrobeMsg"),ll([mc.anno.decl.api()],t.prototype,"updateStructuresMsg"),ll([mc.anno.decl.api()],t.prototype,"cutWardrobeMsg"),ll([mc.anno.decl.api()],t.prototype,"delOneStructureMsg"),ll([mc.anno.decl.api()],t.prototype,"onMiniAppOpen"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.special.cutting.crud",version:"1.0.0",ACL:tl.PRIVATE})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),ll([mc.anno.decl.event()],t.prototype,"onRequestReceived"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.debug",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedWalls=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"getSelectedWalls"),ll([mc.anno.decl.api()],t.prototype,"unSelected"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.select.wall",version:"1.0.0"})],t)}(mc.ServService);!function(e){e[e.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",e[e.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT"}(Sl||(Sl={})),function(e){e[e.front=1]="front",e[e.back=2]="back"}(wl||(wl={})),function(e){e.FRONT_LEFT="1",e.FRONT_TOP="2",e.FRONT_RIGHT="3",e.FRONT_BOTTOM="4",e.BACK_LEFT="5",e.BACK_TOP="6",e.BACK_RIGHT="7",e.BACK_BOTTOM="8"}(Dl||(Dl={})),function(e){e[e.PARTITION_STYLE=1]="PARTITION_STYLE",e[e.COLOR_PLATE_STYLE=2]="COLOR_PLATE_STYLE",e[e.COLOR_PLATE_MATERIAL=3]="COLOR_PLATE_MATERIAL",e[e.COLOR_PLATE_THICKNESS=4]="COLOR_PLATE_THICKNESS",e[e.COLOR_PLATE_WIDTH=5]="COLOR_PLATE_WIDTH",e[e.LINE_STYLE=6]="LINE_STYLE",e[e.LINE_MATERIAL=7]="LINE_MATERIAL",e[e.WALL_DIRECTION=8]="WALL_DIRECTION",e[e.LINE_POSITION=9]="LINE_POSITION"}(Rl||(Rl={}));var Ml;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedPartitionWalls=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.generatePartitionWalls=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.editPartitionWalls=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.setIWallPavingDirection=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.setILineSimplePosition=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"getSelectedPartitionWalls"),ll([mc.anno.decl.api()],t.prototype,"generatePartitionWalls"),ll([mc.anno.decl.api()],t.prototype,"editPartitionWalls"),ll([mc.anno.decl.api()],t.prototype,"setIWallPavingDirection"),ll([mc.anno.decl.api()],t.prototype,"setILineSimplePosition"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.partition.model",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedPartitionProduct=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.getSelectedLConnectorProduct=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getSelectedPartitionProduct"),ll([mc.anno.decl.api()],t.prototype,"getSelectedLConnectorProduct"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.partition.product",version:"1.0.0"})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.undo=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.redo=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.clear=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"undo"),ll([mc.anno.decl.api()],t.prototype,"redo"),ll([mc.anno.decl.api()],t.prototype,"clear"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.partition.document",version:"1.0.0"})],t)}(mc.ServService);!function(e){e.style="style",e.material="material"}(Ml||(Ml={}));var xl;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedLConnectors=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.editSelectedLConnectors=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"getSelectedLConnectors"),ll([mc.anno.decl.api()],t.prototype,"editSelectedLConnectors"),ll([mc.anno.decl.api()],t.prototype,"unSelected"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.select.lconnector",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedColumns=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"getSelectedColumns"),ll([mc.anno.decl.api()],t.prototype,"unSelected"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.select.column",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e[e.right=0]="right",e[e.left=1]="left"}(xl||(xl={}));var Pl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.generateColumnsParamsChanged=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.generateColumns=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"generateColumnsParamsChanged"),ll([mc.anno.decl.api()],t.prototype,"generateColumns"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.column.generate",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e[e.ALL=0]="ALL",e[e.WALL=1]="WALL",e[e.CELING=2]="CELING",e[e.GROUND=3]="GROUND"}(Pl||(Pl={}));var Tl,Fl,Ll;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedRooms=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.clearSelectedRooms=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.openSelectRoom=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.setOpenLinePanel=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.generateLineFormData=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.event()],t.prototype,"watcherOpen"),ll([mc.anno.decl.api()],t.prototype,"getSelectedRooms"),ll([mc.anno.decl.api()],t.prototype,"clearSelectedRooms"),ll([mc.anno.decl.api()],t.prototype,"openSelectRoom"),ll([mc.anno.decl.api()],t.prototype,"setOpenLinePanel"),ll([mc.anno.decl.api()],t.prototype,"generateLineFormData"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.angular.line",version:"1.0.0",ACL:tl.PRIVATE})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getDefaultParam=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.getPartitionVersion=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getDefaultParam"),ll([mc.anno.decl.api()],t.prototype,"getPartitionVersion"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.default.params",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.design.storage.service",version:"1.0.0"})],t)}(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return al(t,e),t.prototype.getKeys=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.getItem=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.getItems=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.setItem=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.removeItem=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.removeItems=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getKeys"),ll([mc.anno.decl.api()],t.prototype,"getItem"),ll([mc.anno.decl.api()],t.prototype,"getItems"),ll([mc.anno.decl.api()],t.prototype,"setItem"),ll([mc.anno.decl.api()],t.prototype,"removeItem"),ll([mc.anno.decl.api()],t.prototype,"removeItems"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.storage.service",version:"1.0.0"})],t)}(mc.ServService)),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getCachedModelJsonDataByModelId=function(e,t){return Object(mc.API_UNSUPPORT)()},t.prototype.getModelJsonDataByModelId=function(e,t){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getCachedModelJsonDataByModelId"),ll([mc.anno.decl.api()],t.prototype,"getModelJsonDataByModelId"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.model.output",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE"}(Tl||(Tl={})),function(e){e.TRUE="true",e.FALSE="false"}(Fl||(Fl={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(Ll||(Ll={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getDesignRoomList=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.getDesignSelectedRoom=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getDesignRoomList"),ll([mc.anno.decl.api()],t.prototype,"getDesignSelectedRoom"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.design.floor.room",version:"1.0.0"})],t)}(mc.ServService);var Ol,kl,Nl=function(e){return e&&"object"===Qc(e)?e.toJSON():e},Gl=function(e){return e&&"object"===Qc(e)?il.deserialize(JSON.stringify(e)):e},Ul={onRetnTransform:{recv:Gl,send:Nl}},jl={onCallTransform:{recv:function(e){return cl(cl({},e),{models:e.models.map(Gl)})},send:function(e){return cl(cl({},e),{models:e.models.map(Nl)})}}},Vl=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.newParamModelByCategory=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.newParamModelByBrandGoodId=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.getParamModelByModelId=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.listTopModels=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.save=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.remove=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api(Ul)],t.prototype,"newParamModelByCategory"),ll([mc.anno.decl.api(Ul)],t.prototype,"newParamModelByBrandGoodId"),ll([mc.anno.decl.api(Ul)],t.prototype,"getParamModelByModelId"),ll([mc.anno.decl.api({onRetnTransform:{recv:function(e){return Array.isArray(e)?{data:e.map(Gl)}:cl(cl({},e),{data:e.data.map(Gl)})},send:function(e){return Array.isArray(e)?e.map(Gl):cl(cl({},e),{data:e.data.map(Gl)})}}})],t.prototype,"listTopModels"),ll([mc.anno.decl.api(jl)],t.prototype,"save"),ll([mc.anno.decl.api(jl)],t.prototype,"remove"),t=ll([mc.anno.decl({id:"com.custom.design.param-model.service",version:"1.0.0"})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getDesignJson=function(e){throw Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"getDesignJson"),t=ll([mc.anno.decl({id:"com.custom.design.export.service",version:"1.0.0"})],t)}(mc.ServService),function(e){return e&&"object"===Qc(e)?cl(cl({},e),{parent:e.parent.toJSON()}):e}),Yl=function(e){return e&&"object"===Qc(e)?cl(cl({},e),{parent:il.deserialize(JSON.stringify(e.parent))}):e};(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelected=function(){throw Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event({transform:{recv:Yl,send:Vl}})],t.prototype,"selection"),ll([mc.anno.decl.api({onRetnTransform:{send:Vl,recv:Yl}})],t.prototype,"getSelected"),t=ll([mc.anno.decl({id:"com.custom.inner-space.service",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.current=function(){throw Object(mc.API_UNSUPPORT)()},t.prototype.enter=function(e){throw Object(mc.API_UNSUPPORT)()},t.prototype.exit=function(){throw Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"current"),ll([mc.anno.decl.api()],t.prototype,"enter"),ll([mc.anno.decl.api()],t.prototype,"exit"),t=ll([mc.anno.decl({id:"com.custom.mode.service",version:"1.0.0"})],t)}(mc.ServService);!function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(Ol||(Ol={})),function(e){e[e.ORIGIN=0]="ORIGIN",e[e.CENTER=1]="CENTER",e[e.LEFT_BACK_BOTTOM=2]="LEFT_BACK_BOTTOM",e[e.LEFT_BACK_TOP=3]="LEFT_BACK_TOP",e[e.LEFT_FRONT_BOTTOM=4]="LEFT_FRONT_BOTTOM",e[e.LEFT_FRONT_TOP=5]="LEFT_FRONT_TOP",e[e.RIGHT_BACK_BOTTOM=6]="RIGHT_BACK_BOTTOM",e[e.RIGHT_BACK_TOP=7]="RIGHT_BACK_TOP",e[e.RIGHT_FRONT_BOTTOM=8]="RIGHT_FRONT_BOTTOM",e[e.RIGHT_FRONT_TOP=9]="RIGHT_FRONT_TOP",e[e.BACK_CENTER=10]="BACK_CENTER",e[e.FRONT_CENTER=11]="FRONT_CENTER"}(kl||(kl={}));String.fromCharCode(1),/Mac|iPod|iPhone|iPad/.test(navigator.platform),new Map;var Hl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.createHandsFree=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"createHandsFree"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.hands.free.create",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e.top="top",e.left="left",e.right="right",e.bottom="bottom",e.leftTop="leftTop",e.leftBottom="leftBottom",e.rightTop="rightTop",e.rightBottom="rightBottom"}(Hl||(Hl={}));var Kl;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.createWineCell=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"createWineCell"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.inner.space.crud",version:"1.0.0",ACL:tl.PRIVATE})],t)}(mc.ServService);!function(e){e[e.include=0]="include",e[e.exclude=1]="exclude"}(Kl||(Kl={}));(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.showModelByCateId=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"showModelByCateId"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.model.toggle.visible",version:"1.0.0"})],t)})(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.remove=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.getParamModelCountByCategory=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.updateAttacheds=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.updateAttachedsNew=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.addAccessoryByBrandGoodId=function(e){return Object(mc.API_UNSUPPORT)()},t.prototype.getParamModelRootList=function(e){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.api()],t.prototype,"remove"),ll([mc.anno.decl.api()],t.prototype,"getParamModelCountByCategory"),ll([mc.anno.decl.api()],t.prototype,"updateAttacheds"),ll([mc.anno.decl.api()],t.prototype,"updateAttachedsNew"),ll([mc.anno.decl.api()],t.prototype,"addAccessoryByBrandGoodId"),ll([mc.anno.decl.api()],t.prototype,"getParamModelRootList"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.model.crud.service",version:"1.0.0"})],t)}(mc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}al(t,e),t.prototype.getSelectedInnerSpace=function(){return Object(mc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(mc.API_UNSUPPORT)()},ll([mc.anno.decl.event()],t.prototype,"watcher"),ll([mc.anno.decl.api()],t.prototype,"getSelectedInnerSpace"),ll([mc.anno.decl.api()],t.prototype,"unSelected"),t=ll([mc.anno.decl({id:"com.custom.miniapp.service.inner.space",version:"1.0.0"})],t)}(mc.ServService);var ql=r(208),Jl=r.n(ql),Wl=r(426),zl=r.n(Wl),Xl=r(529),Zl=r(424),$l=r(425),eg=r.n($l);function tg(e){return(tg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
|
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,Ll;(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"}(Ll||(Ll={}));var Ol;(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"}(Ol||(Ol={}));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(426),rg=r.n(tg),ng=r(529),ig=r(424),og=r(425),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)}
|
|
122
122
|
/*!
|
|
123
123
|
* @qunhe/custom-miniapp-api-core v0.2.4
|
|
124
124
|
* (c) 2022
|
|
@@ -137,7 +137,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
137
137
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
138
138
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
139
139
|
PERFORMANCE OF THIS SOFTWARE.
|
|
140
|
-
***************************************************************************** */var
|
|
140
|
+
***************************************************************************** */var 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)}
|
|
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 lg,gg=function(e,t){return(gg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function fg(e,t){function r(){this.constructor=e}gg(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function hg(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":cg(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}function pg(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function dg(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(pg(arguments[t]));return e}!function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.DOOR_WINDOW="DW",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY",e.DOOR_WINDOW_COPY="DW_COPY"}(lg||(lg={}));var Ig,yg,Cg,Eg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fg(t,e),t.prototype.getParamModelDataByIds=function(e,t){return Object(mc.API_UNSUPPORT)()},t.prototype.getTopParamModels=function(e){return Object(mc.API_UNSUPPORT)()},hg([mc.anno.decl.api()],t.prototype,"getParamModelDataByIds",null),hg([mc.anno.decl.api()],t.prototype,"getTopParamModels",null),t=hg([mc.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:tl.INNER})],t)}(mc.ServService),Bg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fg(t,e),t.prototype.toJSON=function(){return{paramPackages:dg(this.paramPackages.values()),hardwares:dg(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(e){var t=pg(e,2);t[0];var r=t[1],n=new zl.a;return Object(Rt.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:dg(this.displayInfos.values()),wireFrames:Object(Rt.fromPairs)(dg(this.wireGeometrysMap.entries()).map((function(e){return[e[0],e[1].vertices]})))}},t.prototype.serialize=function(){return JSON.stringify(this.toJSON())},t.prototype.unSerialize=function(e){var t=this,r="string"==typeof e?JSON.parse(e):e,n=Object(Rt.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(e){var t=new zl.a;if(Object(Rt.extend)(t,e),t.meshModels=t.meshModels.map((function(e){var t=e.displayMaterial,r=new eg.a,n=new zr.a;return Object(Rt.extend)(n,e.geometry),r.texture=e.texture,r.displayMaterial=t?Object(Xl.toPopBufferMtl)(t):void 0,r.geometry=n,r})),t.furnitureModel){var r=new Zl.FurnitureModel;Object(Rt.extend)(r,t.furnitureModel),r.size=new Le.a(r.size),r.position=new Le.a(r.position),r.rotate=new Le.a(r.rotate),r.scale=new Le.a(r.scale),t.furnitureModel=r}return t}))),r.wireFrames&&Object(Rt.each)(r.wireFrames,(function(e,r){t.addWireGeometrysMap(r,e)})),this.addCustomResources(n)},t}(Jl.a);!function(e){e[e.willExit=0]="willExit"}(Ig||(Ig={})),function(e){e[e.exit=0]="exit"}(yg||(yg={})),function(e){e[e.personalLibrary=1]="personalLibrary",e[e.enterpriseLibrary=2]="enterpriseLibrary"}(Cg||(Cg={}));var vg=r(245),mg=r.n(vg),Qg=r(287),bg=r.n(Qg),_g=r(1121),Sg=r.n(_g),wg=r(357),Dg=r.n(wg),Rg=r(717),Mg=r.n(Rg),xg=r(1122),Pg=r.n(xg),Tg=r(723),Fg=r.n(Tg),Lg=r(724),Og=r.n(Lg),kg=r(207),Ng=r.n(kg),Gg=r(112),Ug=r.n(Gg),jg=r(187),Vg=r.n(jg),Yg=r(528),Hg=r.n(Yg),Kg=r(1123),qg=r.n(Kg),Jg=r(722),Wg=r.n(Jg),zg=r(721),Xg=r.n(zg),Zg=r(358),$g=r.n(Zg),ef=r(242),tf=r.n(ef),rf=r(728),nf=r.n(rf),of=r(716),Af=r.n(of),af=r(1124),sf=r.n(af),uf=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[Zn.a,Gn.a,Dg.a,we.a,Mg.a,Re.a,Pg.a,Ng.a,Ug.a,Vg.a,Hg.a,xe.a,jn.a,Yn.a,Kn.a,qg.a,Wg.a,Xg.a,Te.a,$g.a,tf.a,nf.a,rf.LineIndex,Jn.a,Af.a,sf.a,Er.a,Le.a,ArrayBuffer,MA.Vector3,bg.a,Sg.a,Bs.ParamStore,Fg.a,Og.a,eg.a,zr.a,Zl.FurnitureModel,Map,MA.SkyBackground]:[];Object(vg.inject)({isKnownImmutableInstance:function(e){return uf.some((function(t){return e instanceof t}))}});mg.a;var cf=r(211);function lf(e){return(lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ff(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function hf(e,t){return(hf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=If(e);if(t){var i=If(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return df(this,r)}}function df(e,t){return!t||"object"!==lf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function If(e){return(If=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yf,Cf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hf(e,t)}(o,e);var t,r,n,i=pf(o);function o(){var e;return gf(this,o),(e=i.apply(this,arguments)).rootState=new vu,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new pc(this,this.rootState);e.init(),e.run()}}])&&ff(t.prototype,r),n&&ff(t,n),o}(cf.BasePlugin);Cf.dependencies=[Bi.AppServicePlugin];var Ef,Bf,vf,mf=function(e){if(!yf)throw new Error("please new Application before call method");return yf.getCustomMiniAppService(e)},Qf=r(249),bf=r(108),_f=r(429);function Sf(e){vf=e}function wf(e){return(wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Df(e){return function(e){if(Array.isArray(e))return Rf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Rf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rf(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mf(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xf(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Pf(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){xf(o,n,i,A,a,"next",e)}function a(e){xf(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Tf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ff(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Lf(e,t){return(Lf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Of(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Nf(e);if(t){var i=Nf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return kf(this,r)}}function kf(e,t){return!t||"object"!==wf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Nf(e){return(Nf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Lf(e,t)}(o,e);var t,r,n,i=Of(o);function o(){var e;return Tf(this,o),(e=i.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0,hardwarelist:[],casbinModelIdMap:{}},e.lastCurrentCustomDataArgs=[],e.getCurrentBaseDesignInfo=Pf(s.a.mark((function t(){var r,n;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.state.designInfo)){t.next=3;break}return t.abrupt("return",r);case 3:return n=mf(Qf.MiniAppDesignBaseInfoService),t.next=6,n.getDesignBaseInfo();case 6:return r=t.sent,e.state.designInfo=r,t.abrupt("return",r);case 9:case"end":return t.stop()}}),t)}))),e.getCurrentCustomData=function(){var t=Pf(s.a.mark((function t(r){var n,i,o;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.state.currentCustomData,r){t.next=3;break}return t.abrupt("return",n);case 3:if(i=Object(Rt.castArray)(r),o=Object(Rt.difference)(i,e.lastCurrentCustomDataArgs),e.lastCurrentCustomDataArgs=i,!o.length&&n){t.next=12;break}return t.next=9,XB(r);case 9:n=t.sent,t.next=13;break;case 12:return t.abrupt("return",n);case 13:return e.state.currentCustomData=n,t.abrupt("return",n);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.loadFittingHardwareToSense=function(){var t=Pf(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Object(Rt.uniq)(Object(Rt.flatten)(Object(Rt.map)(r.hardware,(function(e){return e.map((function(e){return e.brandGoodId}))})))),e.state.casbinModelIdMap={},n.length){t.next=4;break}return t.abrupt("return");case 4:return i=e.getStateManager().core,o=i.design,A=i.pad,t.next=8,Promise.allSettled(Object(Rt.map)(n,function(){var e=Pf(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,iv(t);case 2:return r=e.sent,e.abrupt("return",[t,r]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 8:return a=t.sent,t.next=11,ov(n);case 11:for(p in u=t.sent,c=Object(Rt.mapValues)(Object(Rt.keyBy)(Object(Rt.filter)(a,(function(e){return"fulfilled"===e.status})).map((function(e){return e.value})),(function(e){return e[0]})),(function(e){return e[1]})),l=o.getCustom(),g=[],f={},h=function(e){var t=r.hardware[e],n=A.findModelOrAssemblyModelById(e);if(n){var i=n.getConcatenatedMatrix(),o=n.getSize(),a=(new xe.a).makeTranslation(new Le.a(-o.x/2,o.y/2,-o.z/2)),s=i.clone().multiply(a),l=Object(Rt.map)(t,(function(e){var t=c[e.brandGoodId],r=u[e.brandGoodId]||{x:0,y:0,z:0};if(t){var i=t.paramModelData,o=Mf(t,["paramModelData"]),A=e.rotate,a=(new It).parse(i);Object(bf.attach)(a,Object(bf.toAttachedMap)(o)),a.setIsAppendHardware(!0),a.setLinkedIds(e.linkedIds),a.setHardwareData(e),a.linkParamModelId=n.id;var l=s.clone().multiply((new xe.a).compose(new Le.a(e.position),new Re.a(A.x,A.y,A.z),new Le.a(e.scale)).multiply((new xe.a).setPosition(new Le.a(r)))),g=kn.a.decompose(l),h=g.rotation,p=g.position,d=g.scale,I=new Le.a(p);return a.setPosition({x:I.x,y:I.y,z:I.z}),a.setRotation({x:h.x,y:h.y,z:h.z}),a.setScale(d),a.assignUniqueId(),f[e.id]=a.id,a}})).filter((function(e){return!!e}));g.push.apply(g,Df(l))}else Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!")},r.hardware)h(p);if(!g.length){t.next=23;break}return t.next=21,Ef.updateAttacheds(g);case 21:l.addParamModels.apply(l,g),e.state.casbinModelIdMap=f;case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return t=o,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&Ff(t.prototype,r),n&&Ff(t,n),o}(Ei.AXR);function Uf(e){return(Uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yf(e,t){return(Yf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qf(e);if(t){var i=qf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Kf(this,r)}}function Kf(e,t){return!t||"object"!==Uf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qf(e){return(qf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Jf,Wf,zf,Xf,Zf,$f,eh,th,rh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yf(e,t)}(o,e);var t,r,n,i=Hf(o);function o(){var e;return jf(this,o),(e=i.apply(this,arguments)).paramModelConstructor=It,e}return t=o,(r=[{key:"parseParamModelAssemblies",value:function(e){var t=this;return e.forEach((function(e){var r=(new _t).parse(e,t,{isRootWorldMatrix:!0});t.addParamModelAssembly(r)})),this}}])&&Vf(t.prototype,r),n&&Vf(t,n),o}(Bg),nh=r(75),ih=Symbol("fitting-data"),oh=Symbol("groove-fitting-entity"),Ah=Symbol("intersect-data"),ah=Symbol("param-model-hint-entity"),sh=Symbol("fitting-hint-entity"),uh=Symbol("plank-outline-hint-entity");!function(e){e.FAIL="fail",e.SUCCESS="success",e.LOADING="loading"}(Jf||(Jf={})),function(e){e[e.READY=0]="READY",e[e.LOADING=1]="LOADING",e[e.FAILED=2]="FAILED",e[e.INVALID=3]="INVALID",e[e.SUCCESS=4]="SUCCESS"}(Wf||(Wf={})),function(e){e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.FAILED=2]="FAILED",e[e.SUCCESS=3]="SUCCESS"}(zf||(zf={})),function(e){e.SCENE_ID="cp"}(Xf||(Xf={})),function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(Zf||(Zf={})),function(e){e.selectBlank="sb",e.renderModeChange="r",e.doorVisibilityChange="d"}($f||($f={})),function(e){e[e.opaqueModel=1]="opaqueModel",e[e.translucentModel=.4]="translucentModel",e[e.transparentModel=0]="transparentModel"}(eh||(eh={})),function(e){e.SHADING="0",e.OUTLINE_WITH_SHADING="1",e.TRANSLUCENT="2",e.OUTLINE_AND_TRANSLUCENT="3"}(th||(th={}));var ch,lh=[];function gh(e){return(gh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fh(e){return function(e){if(Array.isArray(e))return hh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return hh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hh(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ph(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function dh(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ph(o,n,i,A,a,"next",e)}function a(e){ph(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Ih(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function yh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ch(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Eh(e,t){return(Eh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=mh(e);if(t){var i=mh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vh(this,r)}}function vh(e,t){return!t||"object"!==gh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mh(e){return(mh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.design="design",e.series="series"}(ch||(ch={}));var Qh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Eh(e,t)}(o,e);var t,r,n,i=Bh(o);function o(){var e;return yh(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({main:Wf.READY,design:Wf.READY,series:Wf.READY}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionLoad=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Bf.getParamModelDataByBrandGoodId(t);case 2:return n=e.sent,i=n.paramModelData,o=Ih(n,["paramModelData"]),A=(new It).parse(i),Object(bf.attach)(A,Object(bf.toAttachedMap)(o)),e.next=9,Ef.updateAttacheds([A]);case 9:return r.core.design.getCustom().addParamModels(A),r.core.fittingDesign.setFittings(lh),e.next=13,Object(nh.put)(this.$actionLoad.done.message({params:t,result:Wf.SUCCESS}));case 13:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.custom,i=t.needAttach,o=n.getParamModels(),A=n.getParamModelAssemblies(),!i){e.next=6;break}return e.next=6,Promise.all(o.map(function(){var e=dh(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Bf.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(bf.attach)(t,Object(bf.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:if(r.core.design.setCustom(n),a=o.filter((function(e){return!e.getAssembly()})),!i){e.next=12;break}return u=[].concat(fh(a),fh(A)),e.next=12,Ef.updateAttacheds(u);case 12:return e.next=14,Object(nh.put)(this.$actionAddModelToSense.done.message({params:{custom:n,needAttach:i},result:Wf.SUCCESS}));case 14:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.map((function(e){var t=e.paramModelData,r=Ih(e,["paramModelData"]),n=(new It).parse(t,new rh);return Object(bf.attach)(n,Object(bf.toAttachedMap)(r)),n})),e.next=3,Ef.updateAttacheds(i);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,fh(i)),e.next=6,Object(nh.put)(this.$actionAddParamModelToSense.done.message({params:t,result:Wf.SUCCESS}));case 6:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelAssemblyToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.core.design.getCustom(),i=new rh,o=t.map((function(e){return(new _t).parse(e,i)})),A=i.getParamModels(),e.next=6,Promise.all(A.map(function(){var e=dh(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Bf.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object(bf.attach)(t,Object(bf.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.next=8,Ef.updateAttacheds(fh(o));case 8:return n.addParamModelAssemblies.apply(n,fh(o)),n.addParamModels.apply(n,fh(A)),e.next=12,Object(nh.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:t,result:Wf.SUCCESS}));case 12:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&Ch(t.prototype,r),n&&Ch(t,n),o}(Ei.AXR);function bh(e){return(bh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wh(e,t)}function wh(e,t){return(wh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Mh(e);if(t){var i=Mh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Rh(this,r)}}function Rh(e,t){return!t||"object"!==bh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mh(e){return(Mh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ei.AXR;var xh=function(e){Sh(r,e);var t=Dh(r);function r(){return _h(this,r),t.apply(this,arguments)}return r}(Ei.AXRPartial),Ph=(Ei.AXRManager,Math.sqrt(2)),Th=Math.PI/6,Fh=Math.PI/3+Math.PI;function Lh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fh,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Th,n=e.getPosition(),i=e.getSize(),o=n.clone(),A=i.length()*Ph,a=new Le.a(Math.cos(r)*Math.cos(t),Math.cos(r)*Math.sin(t),Math.sin(r)).mul(A).applyMatrix4(e.getMatrix());return{lookAt:o,position:a}}var Oh,kh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,t=arguments.length>1?arguments[1]:void 0;return new Promise((function(r){setTimeout(r,e,t)}))};function Nh(e){var t,r,n,i=function(e){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];e.call.apply(e,[this].concat(r))}};return{promise:new Promise((function(o,A){t=i(o),r=i(A),"number"==typeof e&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(e,"ms")))}),e))})),resolve:t,reject:r}}function Gh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Uh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gh(Object(r),!0).forEach((function(t){jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function jh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vh(e){var t=e.elements;return(new xA.a.Matrix4).set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}function Yh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hh(e,t){var r,n=e.getSize(),i=(new xe.a).getInverse(e.getConcatenatedMatrix()),o=t.clone().applyMatrix4(Vh(i)),A=o.x,a=o.y,s=o.z,u=(Yh(r={},Oh.TOP,Math.abs(s-n.z/2)),Yh(r,Oh.LEFT,Math.abs(A+n.x/2)),Yh(r,Oh.BACK,Math.abs(a+n.y/2)),Yh(r,Oh.RIGHT,Math.abs(A-n.x/2)),Yh(r,Oh.FRONT,Math.abs(a-n.y/2)),Yh(r,Oh.BOT,Math.abs(s+n.z/2)),r),c=Object.entries(u).reduce((function(e,t){return t[1]<e[1]?t:e}));return c[1]<.01?+c[0]:Oh.UNKNOWN}function Kh(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}!function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.TOP=0]="TOP",e[e.LEFT=1]="LEFT",e[e.BACK=2]="BACK",e[e.RIGHT=3]="RIGHT",e[e.FRONT=4]="FRONT",e[e.BOT=5]="BOT"}(Oh||(Oh={}));var qh=function(){var e,t=(e=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=dy(),n=r.baseDesignInfo,e.next=3,n.getCurrentBaseDesignInfo();case 3:return i=e.sent,o=i.designId,A=i.levelid,a={modelid:null!=t?t:"",designid:o,levelid:A,toolType:0},u=n.getStateManager().core.design.getCustom(),t||((c=u.getParamModelAssemblies()).length?a.modelid=c[0].id:(l=u.getParamModels().filter((function(e){return!e.isAppendHardware}))).length&&(a.modelid=l[0].id)),e.next=11,n.getCurrentCustomData(null!=t?t:a.modelid);case 11:return g=e.sent,f=g.toolType,a.toolType=f,e.abrupt("return",a);case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Kh(o,n,i,A,a,"next",e)}function a(e){Kh(o,n,i,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}(),Jh=r(243);function Wh(e){return function(e){if(Array.isArray(e))return zh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return zh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zh(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xh(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new rh;r.parseParamModels(e.paramModels).parseParamModelGroups(e.paramModelGroups).parseParamModelAssemblies(e.paramModelCombinations);var n=r.getParamModelAssemblies(),i=(t=Wh(r.getParamModels())).concat.apply(t,Wh(n.map((function(e){return e.getParamModels()}))));return i=i.filter((function(e){return!e.isAccessory()})),Object(Rt.uniqBy)(Jh.ParamModelUtils.collectAccessories(i),"id").forEach((function(e){e.toLocalMatrix()})),{paramModels:i,paramModelAssemblies:n}}function Zh(e){return(Zh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $h(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ep(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){$h(o,n,i,A,a,"next",e)}function a(e){$h(o,n,i,A,a,"throw",e)}A(void 0)}))}}function tp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function np(e,t){return(np=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ip(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ap(e);if(t){var i=Ap(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return op(this,r)}}function op(e,t){return!t||"object"!==Zh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ap(e){return(Ap=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ap(e){return function(e){if(Array.isArray(e))return sp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return sp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sp(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function up(e){var t=e.map((function(e){return e.subModels&&e.subModels.length?up(e.subModels):[]})).flat();return t.push.apply(t,ap(e)),t}var cp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&np(e,t)}(g,e);var t,r,n,i,o,A,a,u,c,l=ip(g);function g(){var e;return tp(this,g),(e=l.apply(this,arguments)).state=e.stateCreator.create({loading:Jf.FAIL,allSubModels:[],result:void 0,currModelId:""}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSetModelId=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.currModelId!==t&&(e.result=void 0,e.allSubModels=[]),e.currModelId=t}))})),e.$actionLoadParamModelJsonData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p,d,I,y;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.modelId,n=t.defer,i=t.hasFitting,o=void 0!==i&&i,A=t.force,a=void 0!==A&&A,u=t.templateId,c=this.state.state,l=c.currModelId,g=c.result,f=c.currTemplateId,r){e.next=4;break}throw new Error("not selected model!");case 4:if(h=r===l,p=f===u,d=this.$actionLoadParamModelJsonData,e.prev=7,I=h&&!a&&p?g:void 0,!o||I){e.next=13;break}return e.next=12,ZB(r,u);case 12:I=e.sent;case 13:if(I){e.next=18;break}return UB.delete(r),e.next=17,$B(r,u);case 17:I=e.sent;case 18:if(I){e.next=20;break}throw new Error("输入json数据出现异常");case 20:return y=h&&!u?up(I.paramModel):this.state.state.allSubModels,h&&dy().scene.$actionToggleSelectModel.dispatch(!0),e.next=24,d.done.dispatch({params:t,result:{ossContent:I,allSubModels:y}});case 24:e.next=31;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,d.failed.dispatch({params:t});case 30:n&&n.reject(e.t0);case 31:case"end":return e.stop()}}),e,this,[[7,26]])}))),t.done.every((function(e){var t=e.params.defer;t&&t.resolve(e.result.ossContent)})),t.started.produce(e.$reducerState,(function(e,t){e.loading=Jf.LOADING})),t.done.produce(e.$reducerState,(function(e,t){var r=t.result,n=r.ossContent,i=r.allSubModels,o=t.params,A=o.templateId,a=o.modelId===e.currModelId;e.loading=Jf.SUCCESS,e.result=a?n:e.result,e.allSubModels=a?i:e.allSubModels,e.currTemplateId=A})),t.failed.produce(e.$reducerState,(function(e,t){e.loading=Jf.FAIL}))})),e}return t=g,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"viewParamModelById",value:(c=ep(s.a.mark((function e(t){var r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(Rt.isArray)(t)?t[0]:t,this.$actionSetModelId.dispatchResolve(r),(n=dy().scene).cameraController.$actionInit.dispatch(),this.resetView(),(i=this.getAxr(kd).fittingDesignSense).initFittingDesign(),function(){var e=ep(s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Nh(),i.$actionLoadFittingDesign.started.dispatch({defer:t,params:{modelid:r}}),e.prev=2,e.next=5,t.promise;case 5:n=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.log(e.t0);case 11:return e.prev=11,e.next=14,c.$actionLoadParamModelJsonData.started.dispatchResolve({modelId:r,hasFitting:!!n});case 14:return e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[2,8,11,15]])})));return function(){return e.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),e.next=12,this.getAxr(Gf).getCurrentCustomData(r);case 12:return o=e.sent,A=new rh,o.context&&A.unSerialize(o.context),a=Xh(o,A),(u=new Ye).addParamModels.apply(u,ap(a.paramModels)),u.addParamModelAssemblies.apply(u,ap(a.paramModelAssemblies)),e.next=21,this.getAxr(Qh).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!o.context});case 21:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=ep(s.a.mark((function e(){var t,r,n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getStateManager().core.design.getCustom(),r=t.getParamModels().filter((function(e){return!e.isAppendHardware})),n=t.getParamModelAssemblies(),i=this.state.state.currModelId,(0!==r.length||0!==n.length)&&i){e.next=6;break}throw new Error("No custom model in the scene!");case 6:return t.clearAllParamModels(),e.next=9,XB(this.state.state.currModelId);case 9:return o=e.sent,A=new rh,o.context&&A.unSerialize(o.context),a=Xh(o,A),t.addParamModels.apply(t,ap(a.paramModels)),t.addParamModelAssemblies.apply(t,ap(a.paramModelAssemblies)),e.next=17,this.getAxr(Qh).$actionAddModelToSense.started.dispatchResolve({custom:t,needAttach:!o.context});case 17:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(a=ep(s.a.mark((function e(){var t,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=mf(Qf.MiniAppSelectModelService),e.next=3,null==t?void 0:t.getSelected();case 3:if(!(null==(r=e.sent)?void 0:r.length)){e.next=9;break}return e.next=7,this.viewParamModelById(Object(Rt.map)(r,"id").filter((function(e){return!!e})));case 7:e.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"getParamModelJsonData",value:(A=ep(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.state.state,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r.currModelId:A,u=n.force,c=void 0!==u&&u,l=n.templateId,c){e.next=14;break}return f=Nh(),this.getAxr(kd).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:f,params:{modelid:a}}),e.prev=5,e.next=8,f.promise;case 8:g=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.log(e.t0);case 14:return h=Nh(o),this.$actionLoadParamModelJsonData.started.dispatch({defer:h,modelId:a,hasFitting:!!g,force:c,templateId:l}),e.abrupt("return",h.promise);case 17:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(e){return A.apply(this,arguments)})},{key:"validateModelStable",value:function(e){var t=this.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(t){for(var r=[t],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var i=r.shift();i.getType()===Ln.ParamModelType.PARAM_PRIMITIVE&&i.getLegal()?(n.total++,i.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(i.id))):r.push.apply(r,ap(i.getChildNodes()))}return n}}},{key:"getTopModelList",value:(o=ep(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=mf(Eg),e.next=3,r.getTopParamModels(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(i=ep(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(Rt.castArray)(t),n=mf(Qf.MiniAppParamModelDataInfoService),i=[],o=r.length-1;case 4:if(!(o>=0)){e.next=10;break}return e.next=7,n.getParamModelPhotoById(r[o]).then((function(e){i.push(e)}));case 7:--o,e.next=4;break;case 10:return e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"resetView",value:function(){var e=this.getStateManager().core,t=e.design.getCustom();t.clearAllParamModels();var r=t.getParamModelAssemblies();r.length&&r.map((function(e){return t.removeParamModelAssembly(e)})),e.fittingDesign.setIntersects([]),e.fittingDesign.setPlankFaceHintModels([]),e.fittingDesign.setFittingHintModels([]),e.fittingDesign.setPlankOutlineHintModels([])}}])&&rp(t.prototype,r),n&&rp(t,n),g}(Ei.AXR);function lp(e){return(lp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gp(Object(r),!0).forEach((function(t){hp(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function hp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pp(e){return function(e){if(Array.isArray(e))return dp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return dp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dp(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ip(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function yp(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Ip(o,n,i,A,a,"next",e)}function a(e){Ip(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Cp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ep(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Bp(e,t,r){return(Bp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=bp(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function vp(e,t){return(vp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bp(e);if(t){var i=bp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qp(this,r)}}function Qp(e,t){return!t||"object"!==lp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bp(e){return(bp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _p={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},Sp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vp(e,t)}(o,e);var t,r,n,i=mp(o);function o(){var e;return Cp(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({autoSave:!0,designLoading:Jf.FAIL,design:Object(Rt.cloneDeep)(_p)}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.getAxr(Qh);case 1:return i=n.$actionAddModelToSense.done.messageType(),o=this.$actionRestoreFittingDesign.messageType(),e.next=6,Object(nh.take)([i,o]);case 6:A=r.core,a=A.fittingDesign,u=A.design,a.setFittings([]),a.setGrooveFittings([]),u.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),c=this.state.state.design,this.fittingAddDataToFittingDesignSense(c),this.getAxr(Gf).loadFittingHardwareToSense({hardware:c.hardwares}),e.next=1;break;case 16:case"end":return e.stop()}}),e,this)})))})),e.$actionEnableAutoSave=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.autoSave=t}))})),e.initFittingDesign=function(){e.$actionRestoreFittingDesign.dispatch(Object(Rt.cloneDeep)(_p))},e.getConnectedFittingDesign=function(){var t=yp(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h=arguments;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],i=e.state.state.design,r){t.next=4;break}return t.abrupt("return",Object(Rt.cloneDeep)(i));case 4:if(o={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){t.next=26;break}A=i.hardwares||{},t.t0=s.a.keys(A);case 8:if((t.t1=t.t0()).done){t.next=18;break}if(c=t.t1.value,!A.hasOwnProperty(c)){t.next=16;break}if(!(l=Object(Rt.find)(A[c]||[],(function(e){return e.id===r})))){t.next=16;break}return u=c,a=l,t.abrupt("break",18);case 16:t.next=8;break;case 18:if(a&&u){t.next=20;break}throw new Error("当前五金不存在!");case 20:g=a.linkedIds,f=function(e){return g.includes(e.id)},o.holes[u]=Object(Rt.filter)(i.holes[u],f),o.grooves[u]=Object(Rt.filter)(i.grooves[u],f),t.next=27;break;case 26:Object(Rt.keys)(o).forEach((function(e){i[e]&&i[e][r]&&(o[e][r]=Object(Rt.cloneDeep)(i[e][r]))}));case 27:return t.abrupt("return",o);case 28:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.fittingAddDataToFittingDesignSense=function(){var t=yp(s.a.mark((function t(r){var n,i,o,A,a,u,l,g,f,h,p,d;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,kh(1);case 2:n=e.stateManager.core,i=n.fittingDesign,o=n.pad,A=dy().fittingDesign.senseSetting.getSenseSettings(),a=Object(Rt.pick)(A,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),u=r.holes,l=void 0===u?{}:u,g=r.grooves,f=void 0===g?{}:g,h=r.hardwareGrooves,p=void 0===h?{}:h,d={findRelativeModel:o.findModelOrAssemblyModelById,transformModel:Pn},i.addFittings([].concat(pp(Bc(l,fp(fp({},d),{},{type:c.HOLE,defaultConfig:a}))),pp(Bc(f,fp(fp({},d),{},{type:c.GROOVE,defaultConfig:a}))))),i.addGrooveFittings(Bc(p,fp(fp({},d),{},{type:c.HARDWARE_GROOVE,transformModel:Ci,defaultConfig:a})));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.appendFittingDataToFittingDesign=function(){var t=yp(s.a.mark((function t(r,n){var i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.state.state,A=o.design,a=o.autoSave,u=!r.id||r.id===A.id,c=_p,l=n.timeout,g=n.save,f=void 0===g?a:g,h={id:null!==(i=r.id)&&void 0!==i?i:A.id,holes:fp(fp({},u?A.holes:c.holes),r.holes||{}),grooves:fp(fp({},u?A.grooves:c.grooves),r.grooves||{}),hardwares:fp(fp({},u?A.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:fp(fp({},u?A.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(Rt.pull)(Object(Rt.keys)(h),"id").forEach((function(e){var t=h[e];Object(Rt.keys)(t).forEach((function(e){0===t[e].length&&delete t[e]}))})),!f){t.next=12;break}return p=Nh(l),e.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),t.abrupt("return",p.promise);case 12:e.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),e.$actionRestoreFittingDesign=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.design=t}))})),e.$actionLoadFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.$actionLoadFittingDesign,i=t.params,e.next=4,qh(i.modelid);case 4:return o=e.sent,e.prev=5,e.next=8,VB(fp(fp({},i),o));case 8:A=e.sent,n.done.dispatch({params:t,result:{designData:A,modelId:o.modelid}}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),n.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[5,12]])}))),e.done.every((function(e,t){var r=this.$actionRestoreFittingDesign,n=e.result.designData?e.result.designData:Object(Rt.cloneDeep)(_p),i=this.getAxr(cp).state.state.currModelId;e.result.modelId===i&&r.dispatch(n);var o=e.params.defer;o&&o.resolve(e.result.designData)})),e.failed.every((function(e,t){var r,n=this.getAxr(cp).state.state.currModelId;(null===(r=e.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var i=e.params.defer;i&&i.reject(new Error("load fitting design error"))}))})),e.$actionClearFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(cp).state.state.currModelId,i=t.modelId,o=void 0===i?n:i,e.next=4,qh(o);case 4:return A=e.sent,a=this.$actionClearFittingDesign,e.prev=6,e.next=9,JB(A);case 9:a.done.dispatch({params:t,result:void 0}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),a.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[6,12]])}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this.getAxr(cp).state.state.currModelId,(null!==(n=t.params.modelId)&&void 0!==n?n:i)===i&&this.initFittingDesign(),(o=t.params.defer)&&o.resolve();case 5:case"end":return e.stop()}}),e,this)}))),e.failed.every(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return e.stop()}}),e)})))})),e.$actionSaveFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.design,n=void 0===r?this.state.state.design:r,e.next=3,qh(n.id);case 3:return i=e.sent,o=this.$actionSaveFittingDesign,e.prev=5,e.next=8,qB(fp(fp({},n),{},{id:i.modelid}),i);case 8:o.done.dispatch({params:t,result:void 0}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),o.failed.dispatch({params:t,result:e.t0});case 14:case"end":return e.stop()}}),e,this,[[5,11]])}))),e.failed.every(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("save failed!"));case 2:case"end":return e.stop()}}),e)}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.params.design,i=this.getAxr(cp).state.state.currModelId,!n||n.id&&n.id!==i||this.$actionRestoreFittingDesign.dispatch(n),(o=t.params.defer)&&setTimeout((function(){o.resolve()}));case 5:case"end":return e.stop()}}),e,this)})))})),e}return t=o,(r=[{key:"init",value:function(){Bp(bp(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&Ep(t.prototype,r),n&&Ep(t,n),o}(xh);function wp(e){return(wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mp(e,t){return(Mp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Tp(e);if(t){var i=Tp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Pp(this,r)}}function Pp(e,t){return!t||"object"!==wp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tp(e){return(Tp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mp(e,t)}(o,e);var t,r,n,i=xp(o);function o(){var e;return Dp(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{}}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateFittingHintConf=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setFittingHint",value:function(e){this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"clearFittingHint",value:function(e){var t=e?Object(Rt.omit)(this.state.state.option,e):{};this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"rerenderToSense",value:function(){var e=this.state.state.option,t=this.stateManager.core,r=t.design,n=t.fittingDesign,i=r.getCustom().getParamModels(),o=n.getFittings(),A=n.getGrooveFittings(),a=Object(Rt.map)(e,(function(e,t){var r=i.find((function(e){return e.id===t&&e.isAppendHardware}))||o.find((function(e){return e.id===t}))||A.find((function(e){return e.id===t}));if(r)return new or({linkModel:r,hintOutline:e.outline})})).filter((function(e){return!!e}));n.setFittingHintModels(a)}}])&&Rp(t.prototype,r),n&&Rp(t,n),o}(xh);function Lp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Op=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__changeMap={}}var t,r,n;return t=e,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({field:"isHidden"},this.isHidden,e),this.isHidden=e}},{key:"__trackUpdateField",value:function(e,t,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,i=e.field;t===r||n.some((function(e){return e.field===i}))||n.push({field:i})}}])&&Lp(t.prototype,r),n&&Lp(t,n),e}();function kp(e){var t,r=new Op;if(r.id=e.id,e instanceof It){if(!e.isAppendHardware)return;t=c.HARDWARE,r.isHidden=e.getInvisible(),r.originalData=e.hardwareData}else r.isHidden=!e.visible,t=e.type,r.originalData=e.fittingData;return r.linkParamModelId=e.linkParamModelId,r.modelType=t,r}function Np(e){return(Np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gp(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=jp(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Up(e){return function(e){if(Array.isArray(e))return Vp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||jp(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jp(e,t){if(e){if("string"==typeof e)return Vp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vp(e,t):void 0}}function Vp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Yp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Kp(e,t){return(Kp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Wp(e);if(t){var i=Wp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jp(this,r)}}function Jp(e,t){return!t||"object"!==Np(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wp(e){return(Wp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kp(e,t)}(o,e);var t,r,n,i=qp(o);function o(){return Yp(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getAllFittingModels",value:function(e){var t=new Set;if(e){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(e);if(!r)return[];for(var n=[r];n.length;){var i=n.shift();t.add(i.id),n.push.apply(n,Up((null==i?void 0:i.getChildNodes())||[]))}}var o=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),A=this.stateManager.core.fittingDesign.getFittings(),a=this.stateManager.core.fittingDesign.getGrooveFittings(),s=[].concat(Up(o),Up(A),Up(a));return t.size>0&&(s=s.filter((function(e){return t.has(e.linkParamModelId)}))),s.map((function(e){return kp(e)}))}},{key:"findHardwareParamModels",value:function(e){var t,r=[],n=Gp(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.isAppendHardware&&r.push(i),r.push.apply(r,Up(this.findHardwareParamModels(i.getChildNodes())))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"save",value:function(e){var t,r=[],n=[],i=Gp(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.modelType===c.HARDWARE?r.push(o):n.push(o)}}catch(e){i.e(e)}finally{i.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(e){var t=this.stateManager.core.pad;e.forEach((function(e){var r=t.findModelOrAssemblyModelById(e.id);if(r){var n=e.__changeMap.update;(void 0===n?[]:n).forEach((function(t){"isHidden"===t.field&&r.setInvisible(e.getHidden())})),e.__changeMap.update=[]}})),xB().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(e){var t=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getFittingHintModels();e.forEach((function(e){var i;e.modelType===c.HARDWARE_GROOVE?i=r.find((function(t){return t.id===e.id})):e.modelType!==c.HOLE&&e.modelType!==c.GROOVE||(i=t.find((function(t){return t.id===e.id})));var o=n.find((function(t){return t.linkModel.id===e.id}));if(i){var A=e.__changeMap.update;(void 0===A?[]:A).forEach((function(t){"isHidden"===t.field&&(null==i||i.setVisible(!e.getHidden()),null==o||o.setVisible(!e.getHidden()))})),e.__changeMap.update=[]}}))}}])&&Hp(t.prototype,r),n&&Hp(t,n),o}(xh);function Xp(e){return(Xp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zp(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function $p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ed(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$p(Object(r),!0).forEach((function(t){td(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function td(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rd(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function nd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function id(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function od(e,t){return(od=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ad(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sd(e);if(t){var i=sd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ad(this,r)}}function ad(e,t){return!t||"object"!==Xp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sd(e){return(sd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ud=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&od(e,t)}(a,e);var t,r,n,i,o,A=Ad(a);function a(){var e;return nd(this,a),(e=A.apply(this,arguments)).state=e.stateCreator.create({intersectedLoading:Jf.FAIL,intersectedResult:void 0,intersectedVisible:!1}),e.$reducerState=e.reducerCreator.create(e.state),e._getParamModelIntersectedCallback=[],e.$actionLoadParamModelIntersectedData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t,r){var n,i,o,A,a,u,c,l,g;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qh(t.modelId);case 2:return n=e.sent,i=mf(sg),o=t.modelId,A=void 0===o?n.modelid:o,a=t.defer,u=rd(t,["modelId","defer"]),c=dy().viewParamModel.state.state.currModelId===A,l=this.$actionLoadParamModelIntersectedData,e.prev=7,e.next=10,i.getIntersectedById(ed({modelId:A},u));case 10:if(g=e.sent,!c){e.next=14;break}return e.next=14,l.done.dispatch({params:t,result:{result:g,modelId:A}});case 14:a&&a.resolve(g),e.next=22;break;case 17:return e.prev=17,e.t0=e.catch(7),e.next=21,l.failed.dispatch({params:t});case 21:a&&a.reject(e.t0);case 22:case"end":return e.stop()}}),e,this,[[7,17]])}))),t.done.every((function(t,r){var n=t.params.defer,i=dy().viewParamModel.state.state.currModelId;n&&n.resolve(t.result.result),t.result.modelId===i&&e.$actionAddIntersectedDataToSense.dispatch(t.result.result)})),t.failed.every((function(t,r){e._getParamModelIntersectedCallback.forEach((function(e){e.reject(new Error("load json error!"))}))})),t.started.produce(e.$reducerState,(function(e,t){e.intersectedLoading=Jf.LOADING})),t.done.produce(e.$reducerState,(function(e,t){e.intersectedLoading=Jf.SUCCESS,e.intersectedResult=t.result.result})),t.failed.produce(e.$reducerState,(function(e,t){e.intersectedLoading=Jf.FAIL}))})),e.$actionAddIntersectedDataToSense=e.unitCreator.sync((function(t){t.every((function(t,r){var n=r.core,i=n.fittingDesign,o=n.pad,A=e.state.state.intersectedVisible,a=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),s=a.intersectedColor,u=a.intersectedBodyColor,c=a.grooveIntersectedColor,f=a.grooveIntersectedBodyColor;i.setIntersects([]);var h=t.option,p=void 0===h?{}:h,d=t.intersectedGroups,I=Object(Rt.map)(d,(function(e){var t=!0===p.references?1:0,r=e.intersecteds[t],n=r["@type"],i=e.intersectType;if(void 0!==p.plankFaceIds&&!p.plankFaceIds.includes(r.plankFaceId))return!1;var A=o.findModelOrAssemblyModelById(r.linkedModelId);if(A){var a=Ai(e,r,A),h=i===g.BOTH_PLANK?n===l.FACE?s:u:n===l.FACE?c:f;return a.setViewColor(h),a}})).filter((function(e){return!!e}));i.setIntersects(I),A||r.kaf.invisibleManager.hide("scene3d",Ah,I.map((function(e){return e.id})))}))})),e.$actionToggleShowIntersected=e.unitCreator.sync((function(t){t.latest((function(e,t){var r=t.core.fittingDesign;e?t.kaf.invisibleManager.display("scene3d",Ah,r.getIntersects().map((function(e){return e.id}))):t.kaf.invisibleManager.hide("scene3d",Ah,r.getIntersects().map((function(e){return e.id})))})),t.produce(e.$reducerState,(function(e,t){e.intersectedVisible=t}))})),e.toggleShowIntersectGroupData=function(t){var r=e.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");e.$actionAddIntersectedDataToSense.dispatch(ed(ed({},r),{},{option:t}))},e}return t=a,(r=[{key:"getParamModelIntersectedData",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=dy().viewParamModel.state.state.currModelId,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r:A,u=rd(n,["timeout","modelId"]),c=Nh(o),this.$actionLoadParamModelIntersectedData.started.dispatch(ed(ed({modelId:a},u),{},{defer:c})),this._getParamModelIntersectedCallback.push(c),l=function(){var e=g._getParamModelIntersectedCallback.indexOf(c);g._getParamModelIntersectedCallback.splice(e,1)},e.abrupt("return",c.promise.then((function(e){return l(),e})).catch((function(e){return l(),Promise.reject(e)})));case 7:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){Zp(o,r,n,A,a,"next",e)}function a(e){Zp(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&id(t.prototype,r),n&&id(t,n),a}(xh);function cd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ld(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cd(Object(r),!0).forEach((function(t){gd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function gd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fd(e,t){var r=t.x/2,n=t.y/2,i=t.z/2,o=[{x:-r,y:-n,z:i},{x:r,y:-n,z:i},{x:r,y:n,z:i},{x:-r,y:n,z:i}],A=o.map((function(e){return ld(ld({},e),{},{z:-e.z})}));switch(e){case 0:return o;case 1:return[o[0],A[0],A[3],o[3]];case 2:return[o[0],A[0],A[1],o[1]];case 3:return[o[1],A[1],A[2],o[2]];case 4:return[o[2],A[2],A[3],o[3]];case 5:return A}return[]}function hd(e){return(hd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Id(e,t){return(Id=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ed(e);if(t){var i=Ed(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Cd(this,r)}}function Cd(e,t){return!t||"object"!==hd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ed(e){return(Ed=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bd={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},vd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Id(e,t)}(o,e);var t,r,n,i=yd(o);function o(){var e;return pd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{},defaultConfig:Bd}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateDefaultOption=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.defaultConfig=Object(Rt.extend)({},e.defaultConfig,t)}))})),e.$actionUpdateHintOption=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setDefaultHintConfig",value:function(e){this.$actionUpdateDefaultOption.dispatch(e)}},{key:"setModelHint",value:function(e){var t=this,r=Object(Rt.mapValues)(e,(function(e){return function(e,t){var r={};return Object(Rt.isObject)(e.hintOutline)?r.hintOutline=e.hintOutline:!0===e.hintOutline&&(r.hintOutline=t.outline),e.hintPlankFace&&e.hintPlankFace.length&&(r.hintPlankFace=e.hintPlankFace.map((function(e){var r="color"in e?e:t.plankFace,n=r.color,i=r.opacity;return Object(Rt.isArray)(e.plankFaceId)?e.plankFaceId.map((function(e){return{color:n,opacity:i,plankFaceId:e}})):{plankFaceId:e.plankFaceId,color:n,opacity:i}})).flat()),r}(e,t.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(e){var t=e?Object(Rt.omit)(this.state.state.option,e):{};this.setModelHint(t)}},{key:"rerenderToSense",value:function(){var e=this.stateManager.core,t=e.fittingDesign,r=e.pad,n=this.state.state.option,i=Object(Rt.map)(n,(function(e,t){var n=r.findModelOrAssemblyModelById(t);if(n)return function(e,t){var r={linkModel:t};if(e.hintPlankFace&&e.hintPlankFace.length){var n=t.getSize();r.plankFaces=e.hintPlankFace.map((function(e){var t=Dn(e.plankFaceId,Le.a).mul(.1),r=fd(e.plankFaceId,n).map((function(e){var r=new Le.a(e).add(t);return{x:r.x,y:r.y,z:r.z}}));return ld(ld({},e),{},{points:r})}))}if(e.hintOutline&&(r.hintOutline=e.hintOutline),r.plankFaces||r.hintOutline)return new Cn(r)}(e,n)})).filter((function(e){return!!e}));t.setPlankFaceHintModels(i)}}])&&dd(t.prototype,r),n&&dd(t,n),o}(xh);function md(e){return(md="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _d(e,t){return(_d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Dd(e);if(t){var i=Dd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wd(this,r)}}function wd(e,t){return!t||"object"!==md(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dd(e){return(Dd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Rd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_d(e,t)}(o,e);var t,r,n,i=Sd(o);function o(){var e;return Qd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:me,holeOpacity:1,grooveOpacity:1}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSenseSetting=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){t.renderIgnoreCategory&&(t.renderIgnoreCategory=Object(Rt.castArray)(t.renderIgnoreCategory)),Object(Rt.extend)(e,t)}))})),e}return t=o,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&bd(t.prototype,r),n&&bd(t,n),o}(xh);function Md(e){return(Md="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Td(e,t){return(Td=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Od(e);if(t){var i=Od(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ld(this,r)}}function Ld(e,t){return!t||"object"!==Md(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Od(e){return(Od=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Td(e,t)}(o,e);var t,r,n,i=Fd(o);function o(){var e;return xd(this,o),(e=i.apply(this,arguments)).fittingDesignSense=e.partialCreator.create(Sp),e.intersected=e.partialCreator.create(ud),e.senseSetting=e.partialCreator.create(Rd),e.fittingModel=e.partialCreator.create(zp),e.plankFaceHint=e.partialCreator.create(vd),e.fittingHint=e.partialCreator.create(Fp),e}return t=o,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&Pd(t.prototype,r),n&&Pd(t,n),o}(Ei.AXR),Nd=r(715),Gd=r.n(Nd);function Ud(e){return(Ud="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yd(e,t){return(Yd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qd(e);if(t){var i=qd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Kd(this,r)}}function Kd(e,t){return!t||"object"!==Ud(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qd(e){return(qd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Jd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yd(e,t)}(o,e);var t,r,n,i=Hd(o);function o(){return jd(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({type:E.ATTRIBUTE,attr:"isHidden"},this.isHidden,e),this.isHidden=e}}])&&Vd(t.prototype,r),n&&Vd(t,n),o}(oe);function Wd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wd(Object(r),!0).forEach((function(t){Xd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Xd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Zd={x:0,y:0,z:0},$d={x:0,y:0,z:0};function eI(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,i=t.category,o=t.origin,A=new Jd,a=!(e instanceof It)||e.isRoot(),s=n||a?e:e.getRoot(),u=s instanceof It;A.id=s.id,A.isRoot=!u||s.isRoot(),A.isHidden=!!s.getInvisible();var c=m.ASSEMBLY;if(u?c=m.COMMON:e.isTemplateAssembly()&&(c=m.TEMPLATE_ASSEMBLY),A.modelType=c,A.position=A.isRoot?Zd:s.getPosition(),A.rotation=A.isRoot?$d:s.getRotation(),A.size="function"==typeof s.getScaledSize?s.getScaledSize():s.getSize(),A.params=rI(s),A.category=i||s.getCategory().categoryId,u){var l=s.getModel();A.productId=null==l?void 0:l.obsBrandGoodId}return n&&(A.root=n),A.isRoot&&(A._origin=o),A.children=(u?s.getChildren():s.getParamModels()).map((function(e){return eI(e,t,r,n||A)})),A.accessories=(u?s.getAccessories():[]).map((function(e){return eI(e,t,r,n||A)})),r.set(A.id,A),s!==e&&r.has(e.id)?r.get(e.id):A}function tI(e,t){var r=e.isRoot?e:e.root;if(!r)return{};var n=r._changeMap,i=t.getUnSafeParamModelFromParamModelLite(r);if(!i)return{};var o=i.getCustom(),A=n.cloned;return A&&(i=i.clone(!1)),i=function e(t,r,n,i){var o=t._changeMap;if(o.cloned&&o.deleted)return;if(o.deleted)return n.dispose(),n;var A=o.update,a=void 0===A?[]:A,s=o.addNodes,u=void 0===s?[]:s,c=i?zd({},i):{parentModelLite:t,parentModel:n,rootModelLite:t,rootModel:n};a.forEach((function(e){if(e.type===E.ATTRIBUTE)switch(e.attr){case"position":n.setPosition(t.getPosition());break;case"rotate":n.setRotation(t.getRotation());break;case"isHidden":n.setInvisible(t.getHidden()),function(e){var t=e.getInvisible();dy().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===e.id&&r.setVisible(!t)}))}(n)}if(e.type===E.STORE){var i=n.getParamStore().getParam(e.attr),o=t.getParam(e.attr);if(i&&o){var A=o.getValue();[Ln.ParamType.MATERIAL,Ln.ParamType.SHAPE].includes(i.getType())&&(A=r.getUnSafeObsBrandGoodToBrandGoodId(A)),A&&i.setValue(A),o.getPrimitiveOverride()!==i.getPrimitiveOverride()&&i.setPrimitiveOverride(o.getPrimitiveOverride())}}})),u.forEach((function(i){var o=i.type,A=i.linkId,a=(o===v.CHILD?t.getChild():t.getAccessory()).find((function(e){return e.id===A}));if(a){var s=r.getUnSafeParamModelFromParamModelLite(a);s&&((a._changeMap.cloned||a._origin!==z.SENSE)&&(s=s.clone(!1)),o===v.CHILD?(s.setIsAppend(!0),s.setAppendType(Gd.a.CENTER),n.addChild(s)):n.addAccessory(s),e(a,r,s,zd(zd({},c),{},{parentModel:n,parentModelLite:t})),(a._changeMap.cloned||a._origin!==z.SENSE)&&s.assignUniqueId())}}));var l=function(i){return function(o){if(!u.some((function(e){return e.type===i&&e.linkId===o.id}))){var A=i===v.ACCESSORY?n.getAccessories():n.getChildren(),a=o._changeMap.originId||o.id,s=A.find((function(e){return e.id===a}));s&&e(o,r,s,zd(zd({},c),{},{parentModel:n,parentModelLite:t}))}}};return t.getChild().forEach(l(v.CHILD)),t.getAccessory().forEach(l(v.ACCESSORY)),n}(r,t,i),A&&i&&i.assignUniqueId(),{create:A,custom:o,model:i}}function rI(e){var t=new Map;return e.getParamStore().forEach((function(e,r){t.set(r,function(e){var t=new X;if(t.data={type:e.getType(),displayName:e.getDisplayName(),name:e.getName(),value:e.getValue(),max:e.getMax(),min:e.getMin(),editable:e.getEditable(),optionValues:e.getOptionValues(),recommendValues:e.getRecommendValues(),primitiveOverride:e.getPrimitiveOverride(),step:e.getStep()},[Q.MATERIAL,Q.SHAPE].includes(t.getType())){var r=e.getProduct();t.data.value=r?r.obsBrandGoodId:""}return t}(e))})),t}var nI=r(125),iI=r.n(nI),oI={maxAge:6e5,max:20},AI=(th.SHADING,th.OUTLINE_WITH_SHADING,th.TRANSLUCENT,th.OUTLINE_AND_TRANSLUCENT,[Oe.ParamModelType.PARAM_ENTITY,Oe.ParamModelType.PARAM_FURNITURE,Oe.ParamModelType.PARAM_PRIMITIVE]);function aI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?aI(Object(r),!0).forEach((function(t){uI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function uI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function lI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){cI(o,n,i,A,a,"next",e)}function a(e){cI(o,n,i,A,a,"throw",e)}A(void 0)}))}}iI()(function(){var e=lI(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=nc(),e.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:t});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),sI({promise:!0},oI));function gI(){return(gI=lI(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nc().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fI(){return(fI=lI(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nc().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var hI=iI()((function(e){return gI.apply(this,arguments)}),sI(sI({},oI),{},{promise:!0})),pI=iI()((function(e){return fI.apply(this,arguments)}),sI(sI({},oI),{},{promise:!0}));function dI(e){return function(e){if(Array.isArray(e))return II(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return II(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return II(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function II(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function CI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var EI=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cached=new Map}var t,r,n,i,o;return t=e,(r=[{key:"setProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(t);r||(r=new Map,this.cached.set(t,r)),r.set(e.brandGoodId,e.obsBrandGoodId),r.set(e.obsBrandGoodId,e.brandGoodId)}},{key:"getToggledBrandGood",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(t=this.cached.get(r))||void 0===t?void 0:t.get(e)}},{key:"removeCachedModel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(e)}},{key:"safeGetToggleBrandGood",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u=this,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(Rt.castArray)(t),i=[],o=[],A=new Map,n.forEach((function(e){var t=u.getToggledBrandGood(e,r);t?A.set(e,t):/^[0-9]$/.test(e.toString())?o.push(e):i.push(e)})),a=function(e){return[].concat(dI(e.hardwares||[]),dI(e.textures||[]),dI(e.virtualModels||[]),dI(e.paramModelProducts||[]),dI(e.moldings||[]))},!i.length){e.next=12;break}return e.next=10,hI(i).then(a);case 10:e.sent.forEach((function(e){u.setProduct(e,r)}));case 12:if(!o.length){e.next=17;break}return e.next=15,pI(o).then(a);case 15:e.sent.forEach((function(e){u.setProduct(e,r)}));case 17:return[].concat(i,o).forEach((function(e){var t=u.getToggledBrandGood(e,r);t&&A.set(e,t)})),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){yI(o,r,n,A,a,"next",e)}function a(e){yI(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&CI(t.prototype,r),n&&CI(t,n),e}();function BI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function vI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){BI(o,n,i,A,a,"next",e)}function a(e){BI(o,n,i,A,a,"throw",e)}A(void 0)}))}}function mI(e){return function(e){if(Array.isArray(e))return QI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return QI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return QI(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function QI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _I(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var SI=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new EI;bI(this,e),this.callback=t,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var t,r,n,i;return t=e,(r=[{key:"getParamModelFromId",value:function(e){if(this.cached.has(e))return this.cached.get(e);var t=this.callback(e);return t?(this.cached.set(e,t),t):void 0}},{key:"getUnSafeParamModel",value:function(e){return this.cached.get(e)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(e){return this.brandGoodsTranslate.getToggledBrandGood(e)}},{key:"addParamModelLite",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=this.models).push.apply(e,mI(r.map((function(e){return e.root||e}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(e){var t,r=e.root||e;switch(e._origin||r._origin){case z.BRANDGOOD:case z.CATEGORY:break;case z.SENSE:var n=r._changeMap.originId||r.id;t=this.getUnSafeParamModel(n)}if(!t||r===e)return t;for(var i,o=e._changeMap.originId||e.id,A=[t];i=A.pop();){if(i.id===o)return i;A.push.apply(A,mI(i.getChildNodes()))}}},{key:"attach",value:(i=vI(s.a.mark((function e(){var t,r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(i=t.pop())){e.next=18;break}A=(o=i)._changeMap,a=o._origin,e.t0=a,e.next=e.t0===z.SENSE?8:e.t0===z.CATEGORY||e.t0===z.BRANDGOOD||e.t0===z.TEMPLATE_ID?11:12;break;case 8:return u=A.originId||i.id,r.modelIds.push(u),e.abrupt("break",12);case 11:return e.abrupt("break",12);case 12:if(!A.deleted){e.next=14;break}return e.abrupt("continue",3);case 14:A.update&&A.update.forEach((function(e){if(i&&e.type===E.STORE&&i.hasParam(e.attr)){var t=i.getParam(e.attr);t&&[Q.MATERIAL,Q.SHAPE].includes(t.getType())&&t.getValue()&&n.push(t.getValue())}})),t.push.apply(t,mI(i.getChild()).concat(mI(i.getAccessory()))),e.next=3;break;case 18:return e.next=20,Promise.allSettled(mI(Object(Rt.uniq)(r.modelIds).map(function(){var e=vI(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.getParamModelFromId(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 20:return e.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&_I(t.prototype,r),n&&_I(t,n),e}(),wI=r(729);function DI(e){return(DI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function RI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xI(e,t,r){return(xI="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=LI(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function PI(e,t){return(PI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function TI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=LI(e);if(t){var i=LI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return FI(this,r)}}function FI(e,t){return!t||"object"!==DI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LI(e){return(LI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var OI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&PI(e,t)}(o,e);var t,r,n,i=TI(o);function o(){var e;return RI(this,o),(e=i.apply(this,arguments)).$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(Qh),e.next=3,Object(nh.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==Wf.SUCCESS){e.next=13;break}return e.next=6,Object(nh.put)(this.$actionSetCamera.message(!0));case 6:return e.next=9,Object(nh.take)(this.$actionSyncCamera.messageType());case 9:return e.next=11,Object(nh.put)(this.$actionSetCamera.message(!1));case 11:e.next=6;break;case 13:case"end":return e.stop()}}),e,this)})))})),e.$actionSyncCamera=e.unitCreator.sync((function(e){})),e.$actionSetCamera=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.core.design.getCustom(),i=n.getParamModels(),o=n.getParamModelAssemblies(),(A=r.scene3D).updateEnableCameraAnimation(!1),a=i.length?Object(wI.computeAssemblyBox)(i.map((function(e){return e.getBox3()})),i[0].getMatrix4()):Object(wI.computeAssemblyBox)(o.map((function(e){return e.getBox3()})),o[0].getMatrix4()),u=Lh(a),A.updateInitCameraAttributes(u),t?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 9:case"end":return e.stop()}}),e)})))})),e}return t=o,(r=[{key:"init",value:function(){xI(LI(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&MI(t.prototype,r),n&&MI(t,n),o}(xh);function kI(e){return(kI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function NI(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=UI(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function GI(e){return function(e){if(Array.isArray(e))return jI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||UI(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function UI(e,t){if(e){if("string"==typeof e)return jI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jI(e,t):void 0}}function jI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function VI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function YI(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){VI(o,n,i,A,a,"next",e)}function a(e){VI(o,n,i,A,a,"throw",e)}A(void 0)}))}}function HI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qI(e,t,r){return(qI="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=XI(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function JI(e,t){return(JI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function WI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=XI(e);if(t){var i=XI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zI(this,r)}}function zI(e,t){return!t||"object"!==kI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function XI(e){return(XI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ZI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&JI(e,t)}(u,e);var t,r,n,i,o,A,a=WI(u);function u(){var e;return HI(this,u),(e=a.apply(this,arguments)).cameraController=e.partialCreator.create(OI),e.state=e.stateCreator.create({renderMode:MA.RenderMode.SHADING,translucent:!1,selectable:!0}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionMergeState=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){Object.assign(e,t)}))})),e.$actionToggleRenderMode=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=MA.RenderMode.SHADING,i=!1,e.t0=t.mode,e.next=e.t0===th.SHADING?5:e.t0===th.OUTLINE_WITH_SHADING?7:e.t0===th.TRANSLUCENT?9:e.t0===th.OUTLINE_AND_TRANSLUCENT?11:14;break;case 5:return n=MA.RenderMode.SHADING,e.abrupt("break",14);case 7:return n=MA.RenderMode.OUTLINE_WITH_SHADING,e.abrupt("break",14);case 9:return i=!0,e.abrupt("break",14);case 11:return n=MA.RenderMode.OUTLINE_WITH_SHADING,i=!0,e.abrupt("break",14);case 14:return e.next=16,Object(nh.put)(this.$actionMergeState.message({renderMode:n,translucent:i}));case 16:xB().viewer.toggleShowModelOutline(n===MA.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),xB().viewer.triggerReducer(),this.emit($f.renderModeChange);case 20:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderBorder=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?MA.RenderMode.OUTLINE_WITH_SHADING:MA.RenderMode.SHADING,e.next=3,Object(nh.put)(this.$actionMergeState.message({renderMode:n}));case 3:xB().viewer.toggleShowModelOutline(n===MA.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),this.emit($f.renderModeChange);case 6:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderTranslucent=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(nh.put)(this.$actionMergeState.message({translucent:t}));case 2:xB().viewer.triggerReducer(),this.emit($f.renderModeChange);case 4:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleSelectModel=e.unitCreator.sync((function(e){e.every(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(nh.put)(this.$actionMergeState.message({selectable:t}));case 2:case"end":return e.stop()}}),e,this)})))})),e}return t=u,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var e=this;qI(XI(u.prototype),"init",this).call(this),xB().viewer.registerReducer((function(t,r,n){n.opacity=e.state.state.translucent?eh.translucentModel:eh.opaqueModel})),xB().viewer.registerReducer((function(e,t,r){r.visible=!e.getInvisible()}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(e){return!e.isAppendHardware}))}},{key:"getAllCustomModels",value:(A=YI(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getAllParamModels(),e.abrupt("return",t.map((function(e){return eI(e,{origin:z.SENSE})})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=YI(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(t))){e.next=3;break}return e.abrupt("return",eI(r,{origin:z.SENSE}));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=YI(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t,n=this.getStateManager().core.pad,(i=new SI(n.findModelOrAssemblyModelById)).addParamModelLite.apply(i,GI(r)),e.next=6,i.attach();case 6:return e.next=8,Promise.all(r.map((function(e){return tI(e,i)})));case 8:o=e.sent,A=[],a=[],u=NI(o);try{for(u.s();!(c=u.n()).done;)(l=c.value).create&&l.custom&&l.model&&A.push(l),!l.create&&l.model&&a.push(l.model)}catch(e){u.e(e)}finally{u.f()}(A.length||a.length)&&A.length&&A.forEach((function(e){var t;null===(t=e.custom)||void 0===t||t.addParamModels(e.model)})),xB().viewer.triggerReducer();case 15:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})}])&&KI(t.prototype,r),n&&KI(t,n),u}(Ei.AXR);function $I(e){return($I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ey(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ty(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ey(Object(r),!0).forEach((function(t){ry(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ey(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ry(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ny(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return iy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ay(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ay(e,t,r){return(ay="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ly(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function sy(e,t){return(sy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ly(e);if(t){var i=ly(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return cy(this,r)}}function cy(e,t){return!t||"object"!==$I(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ly(e){return(ly=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gy={rawSelected:[],selectedData:[],selectedDataV2:[]},fy=function(e,t){var r=e.entityId+"%%"+e.entityType.toString(),n=t.entityId+"%%"+t.entityType.toString();return r>n?1:r===n?0:-1},hy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sy(e,t)}(o,e);var t,r,n,i=uy(o);function o(){var e;return oy(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create(gy).mutable(),e.onModelsChange=function(){var t=e.selected.map((function(t){return e.stateManager.core.pad.findModel(t.entityId)})).filter((function(e){return!!e})),r=e.state.state.selectedData;t.length===r.length&&Object(Rt.unzip)([t,r]).every((function(e){var t=ny(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return ty(ty({},e),{},{selectedData:t})})),e.emit(o.EVENT_SELECT_CHANGED))},e.onModelChangeV2=function(){setTimeout((function(){e.onModelsChange()}),0);var t=e.stateManager.core,r=t.pad,n=t.fittingDesign,i=n.getFittings(),A=n.getGrooveFittings(),a=e.rawSelected.map((function(e){switch(e.entityType){case cA:return r.findModelEx(e.entityId,cu);case uA:return r.findParamModelAssembly(e.entityId);case ih:return i.find((function(t){return t.id===e.entityId}));case oh:return A.find((function(t){return t.id===e.entityId}));default:return}})).filter((function(e){return!!e})),s=e.state.state.selectedDataV2;s.length===a.length&&Object(Rt.unzip)([s,a]).every((function(e){var t=ny(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return ty(ty({},e),{},{selectedDataV2:a})})),e.emit(o.EVENT_SELECT_CHANGED_V2))},e._onSelectionChange=function(){e.onStateChange()},e}return t=o,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(e){this.selectionStateManager.select(e)}},{key:"unSelect",value:function(e){this.selectionStateManager.unSelect(e)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){ay(ly(o.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),ay(ly(o.prototype),"release",this).call(this)}},{key:"onEnable",value:function(e){ay(ly(o.prototype),"onEnable",this).call(this,e),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Va.UPDATE,this._onSelectionChange),this.stateManager.core.pad.on(lu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),wt.on(bt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(e){this.stateManager.core.pad.off(lu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),wt.off(bt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return gy})),this.selectionStateManager.off(Va.UPDATE,this._onSelectionChange),this.rawSelected=[],this.selected=[],ay(ly(o.prototype),"onDisable",this).call(this,e)}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value;if(e.sort(fy),this.rawSelected!==e){this.rawSelected=e;var t=this.resolveSelected(e)||[];this.selectedIsChanged(this.selected,t)&&(this.selected=t),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(e){return e.filter((function(e){return e.entityType===cA}))}},{key:"selectedIsChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),n=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),i=0,o=n.length;i<o;++i)if(r[i]!==n[i])return!0;return!1}}])&&Ay(t.prototype,r),n&&Ay(t,n),o}(Ei.AXR);hy.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",hy.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var py={entry:Qh,scene:ZI,select:hy,fittingDesign:kd,baseDesignInfo:Gf,viewParamModel:cp};function dy(){return xB().axr.axrs}var Iy=Object(sA.getConnector)(),yy=Iy.connect,Cy=Iy.setRootState;function Ey(e,t,r){return yy((function(){return e(dy(),xB().getStateManager())}),t,r)}var By=r(1125),vy=r.n(By);function my(e){return(my="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function by(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _y(e,t,r){return t&&by(e.prototype,t),r&&by(e,r),e}function Sy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wy(e,t)}function wy(e,t){return(wy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=My(e);if(t){var i=My(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ry(this,r)}}function Ry(e,t){return!t||"object"!==my(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function My(e){return(My=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xy=Symbol("layout"),Py=Ey((function(e){return{status:e.entry.state}}),(function(e){return{status:e.status.main}}),function(e){Sy(r,e);var t=Dy(r);function r(){return Qy(this,r),t.apply(this,arguments)}return _y(r,[{key:"render",value:function(){return this.state.views.map((function(e){return e.content}))}}]),r}(Bi.MountPoint)),Ty=function(e){Sy(r,e);var t=Dy(r);function r(){return Qy(this,r),t.apply(this,arguments)}return _y(r,[{key:"render",value:function(){return mi.a.createElement(Py,{mountPointId:xy})}}]),r}(mi.a.PureComponent);function Fy(e){return(Fy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ly(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Oy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ky(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ny(e,t)}function Ny(e,t){return(Ny=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=jy(e);if(t){var i=jy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Uy(this,r)}}function Uy(e,t){return!t||"object"!==Fy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jy(e){return(jy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ty.contextType=Bi.AppContext;var Vy=Ey((function(e,t){return{scene3D:t.scene3D}}),(function(e){var t=e.scene3D;return{cameraType:t.cameraType,cameraAttributes:t.cameraAttributes,initCameraAttributes:t.initCameraAttributes,perspectiveCameraMode:t.perspectiveCameraMode,perspectiveCameraFov:t.perspectiveCameraFov,groundGridConfig:t.groundGridConfig,enableCameraAnimation:t.enableCameraAnimation,renderMode:t.renderMode}}),function(e){ky(r,e);var t=Gy(r);function r(){return Oy(this,r),t.apply(this,arguments)}return r}(Bi.Scene3D)),Yy=Ey((function(){return{}}),(function(){return{}}),function(e){ky(o,e);var t,r,n,i=Gy(o);function o(){var e;return Oy(this,o),(e=i.apply(this,arguments)).onInit=function(e){var t=e.viewer.config;t.autoInstance.enabled.set(!0),t.popMeshMerge.enabled.set(!0),t.background.active.set(MA.BackgroundMode.SolidColorBackground),t.background.solid.color.set(new MA.Color(Zf.sceneBG)),t.ground.enabled.set(!1),t.postEffect.planarShadow.enabled.set(!1),t.postEffect.taa.enabled.set(!1),t.staticFrameCache.enabled.set(!1),t.isExtraCopyBeforeScreenEnabled.set(!1),t.postEffect.ao.enabled.set(!1),xB().viewer.onScene3DInit(e)},e.onGrabStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateGrabing(!0)},e.onGrabEnd=function(){e.props.rootState.scene3D.updateGrabing(!1)},e.onZoomStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateZooming(!0)},e.onZoomEnd=function(){e.props.rootState.scene3D.updateZooming(!1)},e.onCameraAnimationEnd=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1)},e}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.rootState.scene3D,r=e.containerId,n=e.size;return mi.a.createElement(Vy,{onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:t.updateScale,onCameraAttributesChange:t.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd})}}])&&Ly(t.prototype,r),n&&Ly(t,n),o}(mi.a.PureComponent));function Hy(e){return(Hy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ky(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jy(e,t){return(Jy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xy(e);if(t){var i=Xy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zy(this,r)}}function zy(e,t){return!t||"object"!==Hy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xy(e){return(Xy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zy=Ey((function(e,t){return{scene3D:t.scene3D}}),(function(e){return{size:e.scene3D.size}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jy(e,t)}(o,e);var t,r,n,i=Wy(o);function o(){var e;return Ky(this,o),(e=i.apply(this,arguments)).rootRef=mi.a.createRef(),e.updateLayout=Object(Rt.throttle)((function(){var t=e.rootRef.current;if(t){var r=t.getBoundingClientRect();e.props.rootState.scene3D.updateSize(new Er.a(r.width,r.height))}}),200),e}return t=o,(r=[{key:"componentDidMount",value:function(){this.updateLayout(),window.addEventListener("resize",this.updateLayout)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateLayout),this.updateLayout.cancel()}},{key:"render",value:function(){var e=this.props,t=e.size,r=e.className;return mi.a.createElement("div",{ref:this.rootRef,id:Xf.SCENE_ID,className:r},mi.a.createElement(Yy,{containerId:Xf.SCENE_ID,size:new u.Vector2d(t.x,t.y)}))}}])&&qy(t.prototype,r),n&&qy(t,n),o}(mi.a.PureComponent));r(2073);function $y(e){return($y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rC(e,t){return(rC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=oC(e);if(t){var i=oC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return iC(this,r)}}function iC(e,t){return!t||"object"!==$y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function oC(e){return(oC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var AC=Ey((function(e){return{}}),(function(e){return{}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rC(e,t)}(o,e);var t,r,n,i=nC(o);function o(){return eC(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return mi.a.createElement(Bi.ViewMounter,{mountPointId:xy},mi.a.createElement(Zy,{key:"s3",className:vy.a.scene3D}))}}])&&tC(t.prototype,r),n&&tC(t,n),o}(mi.a.PureComponent));function aC(e,t){return(aC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=cC(e);if(t){var i=cC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return uC(this,r)}}function uC(e,t){return!t||"object"!==lC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cC(e){return(cC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function lC(e){return(lC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var gC,fC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":lC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},hC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":lC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},pC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aC(e,t)}(r,e);var t=sC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=ih,n.entityId=e.id,n}return r}(Bi.Entity);pC=fC([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model.type;if(t===c.GROOVE)return dC(e);if(t===c.HOLE)return IC(e)}(e)},update:function(t){var r=e.$model,n=r.position,i=r.visible;t.position.set(n.x,n.y,n.z),t.visible=i,t.material&&(t.material.visible=i)}}})),new Bi.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),hC("design:paramtypes",["function"==typeof(gC=void 0!==yr&&yr)?gC:Object])],pC);var dC=function(e){var t=e.$model,r=t.position,n=t.size,i=t.rotate,o=t.visible,A=t.viewColor,a=t.opacity,s=new MA.BoxGeometry(n.x,n.y,n.z),u=new MA.MeshBasicMaterial({color:A,opacity:a,visible:o,transparent:!0}),c=new MA.Mesh(s,u);return c.position.set(r.x,r.y,r.z),c.rotation.set(i.x,i.y,i.z),c.visible=o,c},IC=function(e){var t=e.$model,r=t.position,n=t.visible,i=t.rotate,o=t.height,A=t.viewColor,a=t.opacity,s=t.fittingData.diameter/2,u=new MA.CylinderGeometry(s,s,o),c=new MA.MeshBasicMaterial({color:A,opacity:a,visible:n,transparent:!0}),l=new MA.Mesh(u,c);return l.position.set(r.x,r.y,r.z),l.rotation.set(i.x,i.y,i.z),l};function yC(e,t){if(e.length!==t.length)return[];for(var r=e.length,n=[],i=0;i<r-1;i++)n.push(e[i].x,e[i].y,e[i].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i+1].x,t[i+1].y,t[i+1].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z);return n}function CC(e){return function(e){if(Array.isArray(e))return EC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return EC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return EC(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function EC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function BC(e,t){return(BC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=QC(e);if(t){var i=QC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return mC(this,r)}}function mC(e,t){return!t||"object"!==bC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function QC(e){return(QC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bC(e){return(bC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var _C,SC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":bC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},wC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":bC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},DC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&BC(e,t)}(r,e);var t=vC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=oh,n.entityId=e.id,n}return r}(Bi.Entity);function RC(e){var t=e.matrix,r=e.points,n=e.depth,i=e.color,o=e.side,A=e.position,a=e.opacity,s=new MA.LineBasicMaterial,u=new MA.MeshBasicMaterial({transparent:!0,opacity:a}),c=new MA.Mesh(void 0,u),l=new MA.Line(void 0,s),g=new MA.Group;return c.setAttribute("transparent-line-origin",!1),l.setAttribute("transparent-line-origin",!1),g.add(c),g.setAttribute("outline",!1),g.setAttribute("shadowCaster",!1),u.setValues({color:i,side:o}),g.applyMatrix(t),g.position.set(A.x,A.y,A.z),function(e){var t=e.area,r=e.outline,n=e.points,i=e.height,o=e.holes,A=!!r;if(!n||0===n.length)return;var a=n[0],s=new MA.Shape,u=A?new MA.Geometry:null;s.moveTo(a.x,a.y),n.forEach((function(e){s.lineTo(e.x,e.y),A&&u.vertices.push(new MA.Vector3(e.x,e.y,i))})),s.lineTo(a.x,a.y),o&&(s.holes=o);A&&(u.vertices.push(new MA.Vector3(a.x,a.y,i)),r.geometry&&r.geometry.dispose(),r.geometry=u);var c=new MA.ShapeGeometry(s);t.geometry&&t.geometry.dispose();t.geometry=c,t.position.set(0,0,i)}({area:c,points:r,height:n}),g}function MC(e){var t=new u.BBox3d;return[].concat(CC(e.getTopRenderPoints()),CC(e.getBottomRenderPoints())).forEach((function(e){t.addPoint(new u.Point3d(e))})),new we.a(new Le.a({x:t.width,y:t.height,z:t.depth}),new Le.a(t.center),new Le.a({x:0,y:0,z:0}))}function xC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function PC(e,t){return(PC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function TC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=LC(e);if(t){var i=LC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return FC(this,r)}}function FC(e,t){return!t||"object"!==OC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LC(e){return(LC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function OC(e){return(OC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}DC=SC([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=new MA.Group,r=e.pointToGlobalMatrix(),n=e.depth,i=e.viewColor,o=e.opacity,A=e.visible,a=void 0!==A&&A,s=e.path.getAllPolygonPoints(),c=new xe.a;c.fromString(r.toArray().join(","));var l=Vh(c),g=kn.a.decompose(c).position,f=RC({matrix:l,depth:0,points:s,color:i,side:MA.Side.FrontSide,position:g,opacity:o}),h=RC({matrix:l,depth:-n,points:s,color:i,side:MA.Side.BackSide,position:g,opacity:o}),p=[].concat(CC(s),[s[0]]),d=function(e){var t=e.matrix,r=e.side,n=e.position,i=e.color,o=e.opacity,A=new MA.MeshBasicMaterial({opacity:o,transparent:!0}),a=new MA.Mesh(new MA.BufferGeometry,A);if(A.setValues({side:r,color:i}),a.setAttribute("transparent-line-origin",!0),a.setAttribute("outline",!1),a.setAttribute("shadowCaster",!1),a.geometry instanceof MA.BufferGeometry){var s=yC(e.topPoints,e.bottomPoints);a.geometry.addAttribute("position",new MA.Float32BufferAttribute(s,3)),a.geometry.dispose()}return a.applyMatrix(t),a.position.set(n.x,n.y,n.z),a}({position:g,matrix:l,topPoints:p.map((function(e){return new u.Point3d(e.x,e.y,0)})),bottomPoints:p.map((function(e){return new u.Point3d(e.x,e.y,-n)})),color:i,side:MA.Side.DoubleSide,opacity:o});return t.add(f),t.add(h),t.add(d),[f,h,d,t].forEach((function(e){e.visible=a})),t}(e.$model)},update:function(t){var r=e.$model.visible;t.traverse((function(e){e.visible=r,e instanceof MA.Mesh&&e.material&&Object(Rt.castArray)(e.material).forEach((function(e){e.visible=r}))})),t.visible=r}}})),new Bi.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:MC(this.$model)}}))]),wC("design:paramtypes",["function"==typeof(_C=void 0!==Jr&&Jr)?_C:Object])],DC);var kC,NC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":OC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},GC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":OC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},UC=Bi.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,jC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&PC(e,t)}(o,e);var t,r,n,i=TC(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=sh,t.entityId=e.id,t}return t=o,(r=[{key:"createOutlineMesh",value:function(){var e=this.$model.hintOutline,t=e.color,r=e.opacity,n=this.$model.visible,i=function(e){var t=new MA.Geometry,r=e.getVertices().map((function(e){var t=e;return new MA.Vector3(t.x,t.y,t.z)}));e.getIndices().forEach((function(e){t.vertices.push(r[e.x],r[e.y])})),t.computeBoundingBox();var n=t.getBoundingBox().getCenter(new MA.Vector3);return t.vertices=t.vertices.map((function(e){return function(e,t){var r=t.clone().sub(e);return e.clone().add(r)}(n,e)})),t}(this.getGeometry()),o=new MA.LineBasicMaterial({color:t,opacity:r,transparent:!0}),A=new MA.LineSegments(i,o);return A.computeLineDistances(),A.renderOrder=999,A.setAttribute("outline",!1),A.setAttribute("transparent-line-origin",!0),A.setAttribute("shadowCaster",!1),A.visible=n,o.visible=n,A}},{key:"getGeometry",value:function(){var e,t=this.$model.linkModel;return e=t instanceof Oe.CoreParamModel?t.getConcatenatedBox3():t instanceof yr?t.boundingBox:MC(t),UC(e)}}])&&xC(t.prototype,r),n&&xC(t,n),o}(Bi.Entity),VC=jC=NC([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createOutlineMesh()},update:function(t){var r=e.$model.visible;t.visible=r,t.material.visible=r}}}))]),GC("design:paramtypes",["function"==typeof(kC=void 0!==or&&or)?kC:Object])],jC);function YC(e){var t=new MA.BufferGeometry;if(t.index=new MA.BufferAttribute(new Uint16Array(e.indices),1),t.addAttribute("position",new MA.BufferAttribute(new Float32Array(e.vertices),3)),t.addAttribute("uv",new MA.BufferAttribute(new Float32Array(e.textures),2)),e.normals){var r=new Float32Array(e.normals);t.addAttribute("normal",new MA.BufferAttribute(r,3))}else t.computeVertexNormals();return t}function HC(e,t){return(HC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function KC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=JC(e);if(t){var i=JC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return qC(this,r)}}function qC(e,t){return!t||"object"!==WC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function JC(e){return(JC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function WC(e){return(WC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var zC,XC=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":WC(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ZC=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":WC(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},$C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&HC(e,t)}(r,e);var t=KC(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Ah,n.entityId=e.id,n}return r}(Bi.Entity),eE=$C=XC([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.geometryModel,n=t.viewColor,i=t.originPoints,o=new MA.Group,A=YC(r),a=new MA.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:MA.Side.DoubleSide}),s=new MA.Mesh(A,a);s.renderOrder=998,o.add(s),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&o.add(i.map((function(e){var t=new MA.Mesh(tE,rE);return t.position.set(e.x,e.y,e.z),t.renderOrder=999,t})));return o}(e)},update:function(){}}}))]),ZC("design:paramtypes",["function"==typeof(zC=void 0!==ln&&ln)?zC:Object])],$C),tE=new MA.SphereBufferGeometry(3),rE=new MA.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function nE(e){return function(e){if(Array.isArray(e))return iE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return iE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oE(e,t){return(oE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function AE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sE(e);if(t){var i=sE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return aE(this,r)}}function aE(e,t){return!t||"object"!==uE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sE(e){return(sE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uE(e){return(uE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var cE,lE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":uE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},gE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":uE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},fE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oE(e,t)}(r,e);var t=AE(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=ah,n.entityId=e.id,n}return r}(Bi.Entity),hE=fE=lE([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.plankFaces,n=t.linkModel,i=t.hintOutline,o=n.getConcatenatedMatrix(),A=new MA.Group;r&&r.forEach((function(e){var t=YC(ai(e,o)),r=new MA.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:e.color,opacity:e.opacity,transparent:!0,side:MA.Side.DoubleSide}),n=new MA.Mesh(t,r);n.renderOrder=998,A.add(n)}));if(i){var a=n.getSize(),s=n.getWireFrames();if(!s){var u=fd(0,a),c=fd(5,a);s=[].concat(nE(Object(Rt.zip)(u,[].concat(nE(u.slice(1)),[u[0]]))),nE(Object(Rt.zip)(c,[].concat(nE(c.slice(1)),[c[0]]))),nE(Object(Rt.zip)(u,c))).flat().map((function(e){return[e.x,e.y,e.z]})).flat()}var l=Object(Rt.chunk)(s,3).map((function(e){return new Le.a(e[0],e[1],e[2]).applyMatrix4(o)})).map((function(e){return[e.x,e.y,e.z]})).flat(),g=new HA({points:l,visible:!0,color:parseInt(i.color.replace(/^#/,""),16)});A.add(g)}return A}(e)},update:function(){}}}))]),gE("design:paramtypes",["function"==typeof(cE=void 0!==Cn&&Cn)?cE:Object])],fE);function pE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dE(e,t){return(dE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function IE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=CE(e);if(t){var i=CE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yE(this,r)}}function yE(e,t){return!t||"object"!==EE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function CE(e){return(CE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function EE(e){return(EE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var BE,vE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":EE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},mE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":EE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},QE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dE(e,t)}(o,e);var t,r,n,i=IE(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=uh,t.entityId=e.id,t}return t=o,(r=[{key:"createMesh",value:function(){var e=this.$model,t=e.points,r=e.viewColor,n=e.opacity,i=e.visible,o=e.linkModel,A=e.height;if(o){var a=t.map((function(e){return new u.Point3d(e.x,e.y,A/2)})),s=t.map((function(e){return new u.Point3d(e.x,e.y,-A/2)})),c=new MA.MeshBasicMaterial({opacity:n,transparent:!0}),l=new MA.Mesh(new MA.BufferGeometry,c);if(c.setValues({side:MA.Side.DoubleSide,color:r}),l.setAttribute("transparent-line-origin",!0),l.setAttribute("outline",!1),l.setAttribute("shadowCaster",!1),l.geometry instanceof MA.BufferGeometry){var g=yC(a,s);l.geometry.addAttribute("position",new MA.Float32BufferAttribute(g,3)),l.geometry.dispose()}var f=o.getConcatenatedMatrix(),h=new Le.a(0,0,0).applyMatrix4(f);return l.position.set(h.x,h.y,h.z),l.visible=i,c.visible=i,l.rotation.setFromRotationMatrix(Vh(f)),l}}}])&&pE(t.prototype,r),n&&pE(t,n),o}(Bi.Entity),bE=QE=vE([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createMesh()},update:function(t){var r=e.$model,n=r.visible,i=r.viewColor,o=r.opacity;t.visible=n,t.material.setValues({opacity:o,color:i}),t.material.visible=n}}}))]),mE("design:paramtypes",["function"==typeof(BE=void 0!==wn&&wn)?BE:Object])],QE);var _E=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getDesignDoc=t,this.createFittingEntities=Bi.__unstable__.flatEntitiesCreator((function(e){return new pC(e)})),this.createIntersectEntities=Bi.__unstable__.flatEntitiesCreator((function(e){return new eE(e)})),this.createGrooveFittingEntities=Bi.__unstable__.flatEntitiesCreator((function(e){return new DC(e)})),this.createPlankFaceHintEntities=Bi.__unstable__.flatEntitiesCreator((function(e){return new hE(e)})),this.careateFittingHintEntities=Bi.__unstable__.flatEntitiesCreator((function(e){return new VC(e)})),this.careatePlankOutlineHintEntities=Bi.__unstable__.flatEntitiesCreator((function(e){return new bE(e)})),this.getFittingEntities=function(){var e=r.getDesignDoc();return e?r.createFittingEntities(e.getFittings()):[]},this.getGrooveFittingEntities=function(){var e=r.getDesignDoc();return e?r.createGrooveFittingEntities(e.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var e=r.getDesignDoc();return e?r.createIntersectEntities(e.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var e=r.getDesignDoc();return e?r.createPlankFaceHintEntities(e.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var e=r.getDesignDoc();return e?r.careateFittingHintEntities(e.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var e=r.getDesignDoc();return e?r.careatePlankOutlineHintEntities(e.getPlankOutlineHintModels()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities]};function SE(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return wE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wE(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function wE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function DE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var RE=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){t.pressMap.forEach((function(e,r){t.pressMap.set(r,!1)}))},this.onKeyDown=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)||t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!0)},this.onKeyUp=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)&&(t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!1))},this.active()}var t,r,n;return t=e,(r=[{key:"addKeyboardKeyListener",value:function(e){var t=this,r=Object(Rt.castArray)(e);if(r.some((function(e){return!t.isValidKeyboardKey(e)})))throw new Error("keyboard-key is invalid");var n,i=SE(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.pressMap.set(o,!1)}}catch(e){i.e(e)}finally{i.f()}}},{key:"removeKeyboardKeyListener",value:function(e){var t,r=SE(Object(Rt.castArray)(e));try{for(r.s();!(t=r.n()).done;){var n=t.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"active",value:function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mouseenter",this.resetPressStatus),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mouseenter",this.resetPressStatus),this.disabled=!0,this.resetPressStatus()}},{key:"checkIsPress",value:function(e){var t=this;return Object(Rt.castArray)(e).every((function(e){return t.pressMap.get(e)}))}},{key:"getKeyBoardKey",value:function(e){return e.key.toLowerCase()}},{key:"isPrevent",value:function(e){if(this.disabled)return!0;var t=e.target;if(!t)return!1;if("INPUT"===t.tagName){var r=t.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===t.tagName||"TEXTAREA"===t.tagName}},{key:"isValidKeyboardKey",value:function(e){return _e.includes(e)}}])&&DE(t.prototype,r),n&&DE(t,n),e}(),ME=new Map([[Ln.ParamModelCategory.FRAME,[Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.SWING_DOOR,Ln.ParamModelCategory.PARAM_FURNITURE,Ln.ParamModelCategory.FASCIA_BOARD,Ln.ParamModelCategory.SPECIAL_FRAME,Ln.ParamModelCategory.EMBED_FRAME_W,Ln.ParamModelCategory.POLE_W,Ln.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Ln.ParamModelCategory.BOARD,Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.SPACE_GROUP,Ln.ParamModelCategory.SINGLE_SLIDING_DOOR,Ln.ParamModelCategory.FRAME,Ln.ParamModelCategory.SLIDING_DOOR_BOARD,Ln.ParamModelCategory.PARAM_FURNITURE_PART,Ln.ParamModelCategory.SANITARY_COMPONENT,Ln.ParamModelCategory.DOOR_LEAF,Ln.ParamModelCategory.DECORATIVE_MOLDING_C,Ln.ParamModelCategory.DECORATIVE_MOLDING_W,Ln.ParamModelCategory.HANDS_FREE,Ln.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[Ln.ParamModelCategory.SHOWER_ROOM,[Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.SWING_DOOR,Ln.ParamModelCategory.PARAM_FURNITURE,Ln.ParamModelCategory.FASCIA_BOARD,Ln.ParamModelCategory.SPECIAL_FRAME,Ln.ParamModelCategory.EMBED_FRAME_W,Ln.ParamModelCategory.POLE_W,Ln.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Ln.ParamModelCategory.BOARD,Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.SPACE_GROUP,Ln.ParamModelCategory.SINGLE_SLIDING_DOOR,Ln.ParamModelCategory.FRAME,Ln.ParamModelCategory.PARAM_FURNITURE_PART,Ln.ParamModelCategory.SANITARY_COMPONENT,Ln.ParamModelCategory.DOOR_LEAF,Ln.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.SWING_DOOR,Ln.ParamModelCategory.PARAM_FURNITURE,Ln.ParamModelCategory.FASCIA_BOARD,Ln.ParamModelCategory.SPECIAL_FRAME,Ln.ParamModelCategory.EMBED_FRAME_W,Ln.ParamModelCategory.BOARD,Ln.ParamModelCategory.SPACE_GROUP,Ln.ParamModelCategory.POLE_W,Ln.ParamModelCategory.SINGLE_SLIDING_DOOR,Ln.ParamModelCategory.SLIDING_DOOR_BOARD,Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.RAIL,Ln.ParamModelCategory.DOOR_LEAF]],[Ln.ParamModelCategory.SLIDING_DOOR_C,[Ln.ParamModelCategory.RAIL,Ln.ParamModelCategory.SINGLE_SLIDING_DOOR]],[Ln.ParamModelCategory.SPACE_GROUP,[Ln.ParamModelCategory.DRAWER,Ln.ParamModelCategory.SWING_DOOR,Ln.ParamModelCategory.PARAM_FURNITURE,Ln.ParamModelCategory.FASCIA_BOARD,Ln.ParamModelCategory.SEGMENT_DOOR_CONTAINER,Ln.ParamModelCategory.BOARD,Ln.ParamModelCategory.SPECIAL_BOARD,Ln.ParamModelCategory.SPACE_GROUP]],[Ln.ParamModelCategory.SINGLE_SLIDING_DOOR,[Ln.ParamModelCategory.SLIDING_DOOR_CORE,Ln.ParamModelCategory.DOOR_WAIST_LINE]],[Ln.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[Ln.ParamModelCategory.SWING_DOOR]],[Ln.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[Ln.ParamModelCategory.BOARD]],[Ln.ParamModelCategory.SWING_DOOR,[Ln.ParamModelCategory.DOOR_CORE,Ln.ParamModelCategory.DOOR_WAIST_LINE,Ln.ParamModelCategory.DECORATIVE_MOLDING,Ln.ParamModelCategory.BOARD]],[Ln.ParamModelCategory.DRAWER,[Ln.ParamModelCategory.DRAWER_PANEL,Ln.ParamModelCategory.SWING_DOOR,Ln.ParamModelCategory.BOARD]],[Ln.ParamModelCategory.PARAM_FURNITURE,[Ln.ParamModelCategory.FURNITURE_LEG]],[Ln.ParamModelCategory.KADA,[Ln.ParamModelCategory.BYOBU,Ln.ParamModelCategory.BYOBU_FRAME,Ln.ParamModelCategory.BYOBU_PANEL]]]);function xE(e){return function(e){if(Array.isArray(e))return PE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return PE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return PE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function TE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var FE=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=ye.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new RE,this.memoGetHintModelLite=iI()((function(e){return t.isFittingLikeModel(e)?kp(e):t.getParamModelLite(e)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var t,r,n;return t=e,(r=[{key:"isAccessory",value:function(e){var t;if(this.isAccessoryCache.has(e.id))return this.isAccessoryCache.get(e.id);var r=null===(t=null==e?void 0:e.getParent)||void 0===t?void 0:t.call(e),n=(ME.get(r?r.getCategory().getRoot():void 0)||[]).some((function(t){return e.getCategory().belongsTo(t)}));return this.isAccessoryCache.set(e.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(e,t){for(var r,n,i=this,o=[],A=t;A&&A!==e;)o.unshift(A),A=(null===(r=A.getParent)||void 0===r?void 0:r.call(A))||(null===(n=A.getAssembly)||void 0===n?void 0:n.call(A));return o.find((function(e){return i.isAccessory(e)}))||t}},{key:"getParamModelLite",value:function(e){var t=(e.isRoot()?e:e.getRoot()).getAssembly();return t?eI(e,{origin:z.SENSE},void 0,eI(t,{origin:z.SENSE})):eI(e,{origin:z.SENSE})}},{key:"topModelModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i,o,A,a=e.isRoot()?e:e.getRoot(),s=a.getAssembly(),u=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,c=!1;if(u&&(o=OB(u))&&!this.isFittingLikeModel(o)&&(u.entityType===cA?A=(A=o.isRoot()?o:o.getRoot()).getAssembly()||A:(c=!0,A=o),i=A===a||A===s),i){for(var l=!1,g=!1,f=o instanceof Oe.CoreParamModel?o.getParent():void 0,h=e;h;){if(h===o){l=!0;break}if(h===f){g=!0;break}h=(null===(r=h.getParent)||void 0===r?void 0:r.call(h))||(null===(n=h.getAssembly)||void 0===n?void 0:n.call(h))}if(t===Ce.CLICK)return l?o:g?this.getAccessoryAtFirstLevel(f,e):A instanceof Oe.CoreParamModelAssembly?(o.isRoot()?o:o.getRoot())===a?this.getAccessoryAtFirstLevel(a,e):a:this.getAccessoryAtFirstLevel(a,e);if(t===Ce.DB_CLICK)return l?c?a:this.getAccessoryAtFirstLevel(o,e):this.getAccessoryAtFirstLevel(a,e)}else{if(t===Ce.CLICK)return s||a;if(t===Ce.DB_CLICK)return s?a:this.getAccessoryAtFirstLevel(a,e)}}},{key:"accessoryModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i=e.isRoot()?e:e.getRoot(),o=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=o&&OB(o),a=!1;if(A&&!this.isFittingLikeModel(A)&&(a=(A.isRoot()?A:A.getRoot())===i),a){for(var s=!1,u=!1,c=null==A?void 0:A.getParent(),l=e;l;){if(l===A){s=!0;break}if(l===c){u=!0;break}l=(null===(r=l.getParent)||void 0===r?void 0:r.call(l))||(null===(n=l.getAssembly)||void 0===n?void 0:n.call(l))}if(t===Ce.CLICK)return s?A:this.getAccessoryAtFirstLevel(u?c:i,e);if(t===Ce.DB_CLICK){if(s)return this.getAccessoryAtFirstLevel(A,e);var g=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(g,e)}}else{if(t===Ce.CLICK)return this.getAccessoryAtFirstLevel(i,e);if(t===Ce.DB_CLICK){var f=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(f,e)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(e){var t,r;if(this.isFittingLikeModel(e))return e;var n,i,o=e.isRoot()?e:e.getRoot(),A=o.getAssembly(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,s=!1;if(a&&(n=OB(a))&&!this.isFittingLikeModel(n)&&(s=(i=a.entityType===cA?(i=n.isRoot()?n:n.getRoot()).getAssembly()||i:n)===o||i===A),n&&s){for(var u=!1,c=!1,l=n instanceof Oe.CoreParamModel?n.getParent():void 0,g=e;g;){if(g===n){u=!0;break}if(g===l){c=!0;break}g=(null===(t=g.getParent)||void 0===t?void 0:t.call(g))||(null===(r=g.getAssembly)||void 0===r?void 0:r.call(g))}return u?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof Oe.CoreParamModelAssembly?o:this.getAccessoryAtFirstLevel(n,e):c?this.getAccessoryAtFirstLevel(l,e):this.designMode===ye.TOP_MODEL&&o!==n&&o!==n.getRoot()?o:this.getAccessoryAtFirstLevel(o,e)}return this.designMode===ye.TOP_MODEL?o.getAssembly()||o:this.getAccessoryAtFirstLevel(o,e)}},{key:"setCurSelectEntity",value:function(e){this.curSelectEntity=e}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(e){this.curHintEntity=e}},{key:"getCurHintEntity",value:function(){return this.curHintEntity}},{key:"clearPrevModeSelectEntity",value:function(){this.prevModeSelectEntity.length&&(this.prevModeSelectEntity=[])}},{key:"getDesignMode",value:function(){return this.designMode}},{key:"setDesignMode",value:function(e,t){this.designMode=e,e===ye.CUSTOM?(this.customModeFindSelectModel=null==t?void 0:t.findSelectModel,this.customModeFindHintModel=null==t?void 0:t.findHintModel,!this.pressManager.disabled&&this.pressManager.dispose()):(this.customModeFindSelectModel=void 0,this.customModeFindHintModel=void 0,this.pressManager.disabled&&this.pressManager.active(),this.prevModeSelectEntity=this.prevModeSelectEntity.concat(this.curSelectEntity&&Object(Rt.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(e){var t=kB[e.type];return{entityId:e.id,entityType:t}}},{key:"customModeSelectModel",value:function(e,t){var r,n;n=this.isFittingLikeModel(e)?kp(e):this.getParamModelLite(e);var i=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,t);return Object(Rt.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(e){var t,r=this,n=this.memoGetHintModelLite(e),i=null===(t=this.customModeFindHintModel)||void 0===t?void 0:t.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(Rt.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(e){return e instanceof Jr||e instanceof yr||e instanceof It&&Boolean(e.isAppendHardware)}},{key:"getSelectEntity",value:function(e,t){var r;if(this.isMultiSelect&&this.designMode!==ye.CUSTOM){switch(this.designMode){case ye.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case ye.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case ye.PRODUCT:r=e}if(!r)return;var n=LB(r),i=Object(Rt.castArray)(this.curSelectEntity).filter((function(e){return e}));this.prevModeSelectEntity.length&&i.push.apply(i,xE(this.prevModeSelectEntity));var o=i[0]&&OB(i[0]);if(o&&this.isFittingLikeModel(o)!==this.isFittingLikeModel(r))return n;var A=i.filter((function(e){return e.entityId!==n.entityId}));return A.length!==i.length?A:[].concat(xE(A),[n])}if(!Array.isArray(this.curSelectEntity)||!this.curSelectEntity.length){switch(this.designMode){case ye.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case ye.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case ye.PRODUCT:r=e;break;case ye.CUSTOM:return this.customModeSelectModel(e,t)}return LB(r||e)}}},{key:"getHintEntity",value:function(e){var t;switch(this.designMode){case ye.TOP_MODEL:case ye.ACCESSORY:t=this.topModelModeAndAccessoryModeHint(e);break;case ye.PRODUCT:t=e;break;case ye.CUSTOM:return this.customModeHintModel(e)}var r=this.curSelectEntity&&Object(Rt.castArray)(this.curSelectEntity)||[];if(!([].concat(xE(r),xE(this.prevModeSelectEntity)).findIndex((function(e){return e.entityId===t.id}))>-1))return LB(t)}},{key:"registerMultiSelectShortcut",value:function(e){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=e,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&TE(t.prototype,r),n&&TE(t,n),e}();function LE(e){return(LE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function NE(e,t){return(NE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function GE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=jE(e);if(t){var i=jE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return UE(this,r)}}function UE(e,t){return!t||"object"!==LE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jE(e){return(jE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var VE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&NE(e,t)}(o,e);var t,r,n,i=GE(o);function o(){return OE(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"pickRayTarget",value:function(e){return e&&OB(e)}},{key:"selection",get:function(){return xB().getStateManager().kaf.selection}},{key:"hint",get:function(){return xB().getStateManager().kaf.kaf2.hint}},{key:"designModeCtx",get:function(){return xB().designModeContext}}])&&kE(t.prototype,r),n&&kE(t,n),o}(Bi.ToolModule.Feature);function YE(e){return(YE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function HE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qE(e,t){return(qE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function JE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zE(e);if(t){var i=zE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return WE(this,r)}}function WE(e,t){return!t||"object"!==YE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zE(e){return(zE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var XE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qE(e,t)}(o,e);var t,r,n,i=JE(o);function o(){var e;return HE(this,o),(e=i.apply(this,arguments)).isMouseDown=!1,e}return t=o,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(e){if(!this.isMouseDown){var t=this.context.pick(e.sceneId,e.event),r=this.pickRayTarget(null==t?void 0:t.entity);if(wt.eventNames().includes(bt.PLANK_FACE_HOVER)&&r instanceof Oe.CoreParamModel){var n=t.entity,i=n.point,o={modelId:n.entityId,id:Hh(r,i)};wt.emit(bt.PLANK_FACE_HOVER,o)}if(r){var A=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),ye.CUSTOM,this.hint.hint(A)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&KE(t.prototype,r),n&&KE(t,n),o}(VE);function ZE(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return $E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $E(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function $E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function eB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tB(e,t){return(tB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=iB(e);if(t){var i=iB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nB(this,r)}}function nB(e,t){return!t||"object"!==oB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function iB(e){return(iB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oB(e){return(oB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var AB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":oB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},aB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":oB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},sB=Bi.__INTERNAL__.Highlighters.WireGeometry,uB=Bi.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,cB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tB(e,t)}(o,e);var t,r,n,i=rB(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this)).models=e,r.createFittingModelBox=t,r}return t=o,(r=[{key:"getGeometry",value:function(){var e,t=new sB,r=ZE(this.models);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=void 0;i=n instanceof Oe.CoreParamModel||n instanceof Oe.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var o=uB(i);t.append(o)}}catch(e){r.e(e)}finally{r.f()}return t}}])&&eB(t.prototype,r),n&&eB(t,n),o}(Bi.Entity),lB=cB=AB([Object(Bi.provideEntityAPIs)([new Bi.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),aB("design:paramtypes",[Array,Function])],cB);function gB(e){return(gB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function hB(e,t){return(hB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=IB(e);if(t){var i=IB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return dB(this,r)}}function dB(e,t){return!t||"object"!==gB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function IB(e){return(IB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hB(e,t)}(o,e);var t,r,n,i=pB(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this))._init(),e}return t=o,(r=[{key:"_init",value:function(){var e=this,t={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(t){var r=t.map((function(e){return OB(e)}));return new lB(r.filter((function(e){return e})),e.createFittingModelBox)}};this.selection.addMultiSelectionConfig(t)}},{key:"createFittingModelBox",value:function(e){return e instanceof yr?e.boundingBox:MC(e)}},{key:"onClick",value:function(e){this.triggerClick(e,Ce.CLICK)}},{key:"onDblClick",value:function(e){this.designModeCtx.isMultiSelect||this.triggerClick(e,Ce.DB_CLICK)}},{key:"triggerClick",value:function(e,t){var r=this.context.pick(e.sceneId,e.event),n=this.pickRayTarget(null==r?void 0:r.entity);if(wt.eventNames().includes(bt.PLANK_FACE_CLICK)&&n instanceof Oe.CoreParamModel){var i=r.entity,o=i.point,A={modelId:i.entityId,id:Hh(n,o)};wt.emit(bt.PLANK_FACE_CLICK,A)}if(n){var a=this.designModeCtx.getSelectEntity(n,t);this.designModeCtx.getDesignMode()===ye.CUSTOM?a&&this.selection.select(a):(this.selection.select(a),this.designModeCtx.setCurSelectEntity(a))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&fB(t.prototype,r),n&&fB(t,n),o}(VE);function CB(e){return(CB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function EB(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function BB(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?EB(Object(r),!0).forEach((function(t){vB(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EB(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function vB(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function QB(e,t,r){return(QB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=wB(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function bB(e,t){return(bB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=wB(e);if(t){var i=wB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return SB(this,r)}}function SB(e,t){return!t||"object"!==CB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wB(e){return(wB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var DB,RB=new Ei.SingletonRef,MB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bB(e,t)}(o,e);var t,r,n,i=_B(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:AC,axrs:py,singleton:RB},e)).stateManager=t,r.viewer=new ns,r.designModeContext=new FE,r}return t=o,(r=[{key:"init",value:function(){QB(wB(o.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var e=this.stateManager;e.initState(),Cy(e);var t=this.getDependentPlugin(Bi.AppServicePlugin),r=this.getDependentPlugin(Cf);e.kaf=t.stateManager,e.core=r.stateManager}},{key:"initNet",value:function(){QB(wB(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new Ac),this.client=new _u(this.net)}},{key:"initApp",value:function(){var e=this,t=this.stateManager,r=t.core,n=r.design,i=r.pad,o=this.getDependentPlugin(Bi.AppServicePlugin);this.viewer.config(o,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return e.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(e,t){for(var r=t.point,n=i.findModelOrAssemblyModelById(e.entityId);n&&!AI.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:cA,point:r}:BB(BB({},e),{},{point:r})},paramModelSymbol:cA,filterParamModel:function(t){return!e.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(t.getCategory().categoryId)}}),this.viewer.registerReducer((function(e,t,r){r.interactionPriority=e.isAppendHardware?2:0})),o.registerEntityDocument(new _E((function(){return t.core.fittingDesign}))),t.kaf.toolbox.addIdleToolFeature((function(){return new yB})),t.kaf.toolbox.addIdleToolFeature((function(){return new XE})),o.setLayout(Ty)}}])&&mB(t.prototype,r),n&&mB(t,n),o}(Ei.PluginApplication),xB=RB.instance;function PB(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TB(e,t){var r=new Map;return function(){var n,i=t.apply(void 0,arguments);if(r.has(i))n=r.get(i);else if(n=e.apply(void 0,arguments),Object(Rt.isObject)(n)&&Object(Rt.isFunction)(n.then)&&Object(Rt.isFunction)(n.catch)){var o=Promise.resolve(n);r.set(i,o),o.finally((function(){r.delete(i)}))}return n}}function FB(e){return e instanceof It?cA:e instanceof _t?uA:e instanceof yr?ih:e instanceof Jr?oh:void 0}function LB(e){return{entityId:e.id,entityType:FB(e)}}function OB(e){var t=e.entityId,r=e.entityType,n=xB().getStateManager().core,i=n.fittingDesign,o=n.pad;switch(r){case cA:return o.findModelOrAssemblyModelById(t);case uA:return o.findParamModelAssembly(t);case oh:return i.getGrooveFittings().find((function(e){return e.id===t}));case ih:return i.getFittings().find((function(e){return e.id===t}));default:return}}var kB=(PB(DB={},be.PARAM_MODEL,cA),PB(DB,be.PARAM_MODEL_ASSEMBLY,uA),PB(DB,be.HOLE,ih),PB(DB,be.GROOVE,ih),PB(DB,be.HARDWARE_GROOVE,oh),PB(DB,be.HARDWARE,cA),DB);function NB(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function GB(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){NB(o,n,i,A,a,"next",e)}function a(e){NB(o,n,i,A,a,"throw",e)}A(void 0)}))}}var UB=new Map;function jB(e){return["designid","levelid","modelid","toolType"].map((function(t){return e[t]||""})).join(":")}var VB=TB(function(){var e=GB(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=nc(),n=jB(t),!UB.has(n)){e.next=4;break}return e.abrupt("return",UB.get(n));case 4:return e.next=6,r.get("/cos/api/fitting-design",{params:t});case 6:return i=e.sent,UB.set(n,i.data.d),e.abrupt("return",i.data.d);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),jB);function YB(){var e=mf(ag);"function"==typeof e.fittingDesignHasChanged&&e.fittingDesignHasChanged().catch((function(){}))}var HB,KB,qB=function(){var e=GB(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=nc(),i=jB(r),e.prev=2,e.next=5,n.post("/cos/api/fitting-design",t,{params:r});case 5:UB.set(i,t),YB(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t,r){return e.apply(this,arguments)}}(),JB=function(){var e=GB(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=nc(),n=jB(t),e.prev=2,e.next=5,r.delete("/cos/api/fitting-design",{params:t});case 5:UB.has(n)&&UB.delete(n),YB(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();function WB(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function zB(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){WB(o,n,i,A,a,"next",e)}function a(e){WB(o,n,i,A,a,"throw",e)}A(void 0)}))}}!function(e){e.UNKNOWN="UNKNOWN",e.PENDING="PENDING",e.RUNNING="RUNNING",e.SAVING="SAVING",e.SUCCESS="SUCCESS",e.FAIL="FAIL",e.CANCEL="CANCEL",e.TIMEOUT="TIMEOUT"}(HB||(HB={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW"}(KB||(KB={}));var XB=function(){var e=zB(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(Rt.castArray)(t),n=mf(Eg),e.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ZB=TB(function(){var e=zB(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=mf(Qf.MiniAppParamModelJsonDataService),e.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")})),$B=TB(function(){var e=zB(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=mf(Qf.MiniAppParamModelJsonDataService),e.abrupt("return",n.getModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")}));function ev(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rv(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function nv(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){rv(o,n,i,A,a,"next",e)}function a(e){rv(o,n,i,A,a,"throw",e)}A(void 0)}))}}var iv=iI()(function(){var e=nv(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=nc(),e.next=3,r.gzipGet("/dcs-model/api/c/parammodeldata",{params:{obsbgid:t,cache:!0}});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ev(Object(r),!0).forEach((function(t){tv(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ev(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({promise:!0},oI)),ov=iI()(function(){var e=nv(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=nc(),e.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:t});case 3:return i=e.sent,e.abrupt("return",(null===(r=i.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(Rt.mapValues)(i.data.d.modelCenterMap,(function(e){return JSON.parse(e)})):{});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var Av=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function av(e){return(av="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function uv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sv(Object(r),!0).forEach((function(t){cv(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sv(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function cv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lv(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function gv(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){lv(o,n,i,A,a,"next",e)}function a(e){lv(o,n,i,A,a,"throw",e)}A(void 0)}))}}function fv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pv(e,t){return(pv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=yv(e);if(t){var i=yv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Iv(this,r)}}function Iv(e,t){return!t||"object"!==av(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yv(e){return(yv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cv=function(){return dy().fittingDesign.fittingDesignSense},Ev=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pv(e,t)}(c,e);var t,r,n,i,o,A,a,u=dv(c);function c(){return fv(this,c),u.apply(this,arguments)}return t=c,(r=[{key:"toggleAutoSave",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Cv().$actionEnableAutoSave.dispatch(e)}},{key:"isAutoSave",value:function(){return Cv().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(a=gv(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(dy().viewParamModel.state.state.currModelId!==t||Cv().state.state.design.id!==t)){e.next=3;break}return e.abrupt("return",this.getConnectedFittingDesign());case 3:return e.next=5,qh(t);case 5:return r=e.sent,e.abrupt("return",VB(uv(uv({},r),{},{modelid:t})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Cv().getConnectedFittingDesign(e,t)}},{key:"validateFittingDesign",value:function(e,t){var r=dy().entry.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(!r)return{validated:!1};var n=dy().fittingDesign.senseSetting.getSenseSettings();return{validated:function(e){if(!e.isClosedPath())return!1;for(var t=e.points,r=e.lines,n=t.length,i=0;i<n;i++){var o={type:ii.POINT,val:t[i]},A={type:ii.LINE,val:r[i]};if(!pi(o.val))return!1;if(!di(A.val))return!1;if(!yi(o,A))return!1;for(var a=i+1;a<n;a++){var s={type:ii.POINT,val:t[a]},u={type:ii.LINE,val:r[a]};if(!yi(o,s))return!1;if(!yi(o,u))return!1;if(!yi(A,s))return!1;if(!yi(A,u))return!1}}return!0}(Ci(e,r,Object(Rt.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(A=gv(s.a.mark((function e(t){var r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},e.abrupt("return",Cv().appendFittingDataToFittingDesign(t,r));case 2:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"saveDesign",value:(o=gv(s.a.mark((function e(t){var r,n,i,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=r.timeout,i=Nh(n),Cv().$actionSaveFittingDesign.started.dispatch({defer:i,design:t}),e.abrupt("return",i.promise);case 5:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"clearDesign",value:(i=gv(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t||{}).timeout,i=void 0===n?5e4:n,o=r.modelId,A=Nh(i),Cv().$actionClearFittingDesign.started.dispatch({defer:A,modelId:o}),e.abrupt("return",A.promise);case 4:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&hv(t.prototype,r),n&&hv(t,n),c}(Av);function Bv(e){return(Bv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Qv(e,t){return(Qv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Sv(e);if(t){var i=Sv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _v(this,r)}}function _v(e,t){return!t||"object"!==Bv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Sv(e){return(Sv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wv=(new Gn.a).setFromCenterAndSize(new Le.a(0,0,0),new Le.a(200,200,100)),Dv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qv(e,t)}(o,e);var t,r,n,i=bv(o);function o(){return vv(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"resetDistanceAndLookAt",value:function(){var e=this.state,t=e.initCameraAttributes,r=t.position,n=t.lookAt,i=e.cameraAttributes.position,o=n.clone().sub(r).length(),A=n.clone().add(i.clone().sub(n).normalize().mul(o));this.updateCameraAttributes({position:A,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return wv}}])&&mv(t.prototype,r),n&&mv(t,n),o}(Bi.Scene3DStateManager);function Rv(e){return(Rv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xv(e,t){return(xv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Fv(e);if(t){var i=Fv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Tv(this,r)}}function Tv(e,t){return!t||"object"!==Rv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fv(e){return(Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xv(e,t)}(r,e);var t=Pv(r);function r(){return Mv(this,r),t.apply(this,arguments)}return r}(Bi.types.combine({scene3D:Dv})),Ov=window.document.createElement("script");Ov.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(Ov);function kv(e){return(kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Uv(e,t){return(Uv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Yv(e);if(t){var i=Yv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Vv(this,r)}}function Vv(e,t){return!t||"object"!==kv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yv(e){return(Yv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Uv(e,t)}(o,e);var t,r,n,i=jv(o);function o(){var e;return Nv(this,o),(e=i.apply(this,arguments)).rootState=new Lv,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new MB(this,this.rootState);e.init(),e.run()}}])&&Gv(t.prototype,r),n&&Gv(t,n),o}(cf.BasePlugin);function Kv(e){return(Kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Wv(e,t){return(Wv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Zv(e);if(t){var i=Zv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Xv(this,r)}}function Xv(e,t){return!t||"object"!==Kv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zv(e){return(Zv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Hv.dependencies=[Bi.AppServicePlugin,Cf];var $v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wv(e,t)}(o,e);var t,r,n,i=zv(o);function o(){return qv(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleModelViewIntersected",value:function(e){dy().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(e)}},{key:"toggleModelViewedIntersected",value:function(e){dy().fittingDesign.intersected.toggleShowIntersectGroupData(e)}}])&&Jv(t.prototype,r),n&&Jv(t,n),o}(Av);function em(e){return(em="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function rm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){tm(o,n,i,A,a,"next",e)}function a(e){tm(o,n,i,A,a,"throw",e)}A(void 0)}))}}function nm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function im(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function om(e,t){return(om=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Am(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sm(e);if(t){var i=sm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return am(this,r)}}function am(e,t){return!t||"object"!==em(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sm(e){return(sm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var um=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&om(e,t)}(u,e);var t,r,n,i,o,A,a=Am(u);function u(){return nm(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"getAllCustomModels",value:(A=rm(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().scene.getAllCustomModels());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=rm(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().scene.getCustomModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=rm(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().scene.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&im(t.prototype,r),n&&im(t,n),u}(Av);function cm(e){return(cm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fm(e,t){return(fm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=dm(e);if(t){var i=dm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return pm(this,r)}}function pm(e,t){return!t||"object"!==cm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dm(e){return(dm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Im=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fm(e,t)}(o,e);var t,r,n,i=hm(o);function o(){return lm(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setFittingHint",value:function(e){dy().fittingDesign.fittingHint.setFittingHint(e)}},{key:"clearFittingHint",value:function(e){dy().fittingDesign.fittingHint.clearFittingHint(e)}}])&&gm(t.prototype,r),n&&gm(t,n),o}(Av);function ym(e){return(ym="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Em(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Cm(o,n,i,A,a,"next",e)}function a(e){Cm(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Bm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mm(e,t){return(mm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_m(e);if(t){var i=_m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bm(this,r)}}function bm(e,t){return!t||"object"!==ym(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _m(e){return(_m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Sm,wm,Dm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mm(e,t)}(a,e);var t,r,n,i,o,A=Qm(a);function a(){return Bm(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getAllFittingModels",value:(o=Em(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().fittingDesign.fittingModel.getAllFittingModels(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=Em(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().fittingDesign.fittingModel.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&vm(t.prototype,r),n&&vm(t,n),a}(Av);function Rm(e){return(Rm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Pm(e,t){return(Pm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Lm(e);if(t){var i=Lm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Fm(this,r)}}function Fm(e,t){return!t||"object"!==Rm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Lm(e){return(Lm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.View3D="view3d",e.Roamer="roamer"}(Sm||(Sm={})),function(e){e.UP="UP",e.DOWN="DOWN",e.LEFT="LEFT",e.RIGHT="RIGHT",e.FRONT="FRONT",e.BACK="BACK"}(wm||(wm={}));var Om=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pm(e,t)}(o,e);var t,r,n,i=Tm(o);function o(){return Mm(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleCameraMode",value:function(e){var t;switch(e){case Sm.View3D:t=Bi.PerspectiveCameraMode.View3D;break;case Sm.Roamer:t=Bi.PerspectiveCameraMode.Roamer}xB().getStateManager().scene3D.updatePerspectiveCameraMode(t)}},{key:"moveCamera",value:function(e){var t,r=xB().getStateManager().scene3D;switch(e){case wm.UP:case wm.FRONT:t=Bi.ArrowType.UP;break;case wm.DOWN:case wm.BACK:t=Bi.ArrowType.DOWN;break;case wm.LEFT:t=Bi.ArrowType.LEFT;break;case wm.RIGHT:t=Bi.ArrowType.RIGHT}if(t){if(e===wm.UP||e===wm.DOWN)return void r.onQEPress(t);r.onWASDPress(t)}}}])&&xm(t.prototype,r),n&&xm(t,n),o}(Av);function km(e){return(km="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Um(e,t){return(Um=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ym(e);if(t){var i=Ym(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Vm(this,r)}}function Vm(e,t){return!t||"object"!==km(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ym(e){return(Ym=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Um(e,t)}(o,e);var t,r,n,i=jm(o);function o(){return Nm(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDefaultHint",value:function(e){dy().fittingDesign.plankFaceHint.setDefaultHintConfig(e)}},{key:"setModelHint",value:function(e){dy().fittingDesign.plankFaceHint.setModelHint(e)}},{key:"clearModelHint",value:function(e){dy().fittingDesign.plankFaceHint.clearModelHint(e)}}])&&Gm(t.prototype,r),n&&Gm(t,n),o}(Av);function Km(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function qm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Km(o,n,i,A,a,"next",e)}function a(e){Km(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Jm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zm(e,t){return(zm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$m(e);if(t){var i=$m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Zm(this,r)}}function Zm(e,t){return!t||"object"!==eQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $m(e){return($m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eQ(e){return(eQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var tQ,rQ,nQ=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":eQ(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},iQ=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":eQ(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},oQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zm(e,t)}(a,e);var t,r,n,i,o,A=Xm(a);function a(){return Jm(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getParamData",value:(o=qm(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().viewParamModel.getParamModelJsonData(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamIntersected",value:(i=qm(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dy().fittingDesign.intersected.getParamModelIntersectedData(t);case 2:return r=e.sent,e.abrupt("return",(n=r,{intersectedGroups:Object(Rt.map)(n.intersectedGroups,(function(e){return Uh(Uh({},e),{},{intersecteds:Object(Rt.map)(e.intersecteds,(function(e){return Object(Rt.omit)(e,["shell"])}))})}))}));case 4:case"end":return e.stop()}var n}),e)}))),function(e){return i.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.ignoreCategory||(e.ignoreCategory=me),dy().viewParamModel.getTopModelList(e)}},{key:"getParamModelPhotoById",value:function(e){return dy().viewParamModel.getParamModelPhotoData(e)}}])&&Wm(t.prototype,r),n&&Wm(t,n),a}(Av);function AQ(e){return(AQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uQ(e,t){return(uQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function cQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=gQ(e);if(t){var i=gQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return lQ(this,r)}}function lQ(e,t){return!t||"object"!==AQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gQ(e){return(gQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}nQ([Ie.observeAsyncApiDeco({serviceName:"ModelService"}),iQ("design:type",Function),iQ("design:paramtypes",["function"!=typeof!1&&Object]),iQ("design:returntype","function"==typeof(tQ="undefined"!=typeof Promise&&Promise)?tQ:Object)],oQ.prototype,"getParamData",null),nQ([Ie.observeAsyncApiDeco({serviceName:"ModelService"}),iQ("design:type",Function),iQ("design:paramtypes",["function"!=typeof!1&&Object]),iQ("design:returntype","function"==typeof(rQ="undefined"!=typeof Promise&&Promise)?rQ:Object)],oQ.prototype,"getParamIntersected",null);var fQ,hQ,pQ=function(){return dy().select},dQ=function(){return dy().baseDesignInfo};!function(e){e[e.NULL=0]="NULL",e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(fQ||(fQ={})),function(e){e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(hQ||(hQ={}));var IQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uQ(e,t)}(o,e);var t,r,n,i=cQ(o);function o(){var e;return aQ(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.__generateEntity=function(e){return Object(Rt.castArray)(e).map((function(e){var t={__sceneId:Xf.SCENE_ID,entityId:e.id,entityType:cA};return e.type===hQ.CASBIN&&(t.entityId=dQ().state.casbinModelIdMap[e.id]),t}))},e.onSelectedChanged=function(){wt.emit(bt.SELECTION_SERVICE_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){var e=pQ().state.state.selectedData,t=dy().viewParamModel.state.state.allSubModels;if(e.length){var r=e[0].$model;if(r&&r instanceof It&&r.isAppendHardware)return{data:[r.hardwareData],type:fQ.CASBIN};var n=Object(Rt.map)(e,"id"),i=t.filter((function(e){return n.includes(e.id)}));if(n.length)return{data:i,type:fQ.MODEL}}return{data:[],type:fQ.NULL}}},{key:"select",value:function(e){var t=this.__generateEntity(e);pQ().select(t)}},{key:"unSelect",value:function(e){if(e){var t=this.__generateEntity(e);pQ().unSelect(t)}else pQ().select([])}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,pQ().on(hy.EVENT_SELECT_CHANGED,this.onSelectedChanged))}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),wt.on(bt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"off",value:function(e){wt.off(bt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),wt.once(bt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"__onDestroy",value:function(){pQ().off(hy.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&sQ(t.prototype,r),n&&sQ(t,n),o}(Av);function yQ(e){return(yQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function CQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function BQ(e,t){return(BQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=QQ(e);if(t){var i=QQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return mQ(this,r)}}function mQ(e,t){return!t||"object"!==yQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function QQ(e){return(QQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bQ=function(){return dy().select},_Q=function(){return xB().designModeContext},SQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&BQ(e,t)}(o,e);var t,r,n,i=vQ(o);function o(){var e;return CQ(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.plankFaceClickEvent={on:function(e){wt.on(bt.PLANK_FACE_CLICK,e)},once:function(e){wt.once(bt.PLANK_FACE_CLICK,e)},off:function(e){wt.off(bt.PLANK_FACE_CLICK,e)}},e.plankFaceHoverEvent={on:function(e){wt.on(bt.PLANK_FACE_HOVER,e)},once:function(e){wt.once(bt.PLANK_FACE_HOVER,e)},off:function(e){wt.off(bt.PLANK_FACE_HOVER,e)}},e.onSelectedChanged=function(){wt.emit(bt.SELECTION_SERVICE_V2_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){return bQ().state.state.selectedDataV2.map(this._genElement).filter((function(e){return!!e}))}},{key:"select",value:function(e){var t=Object(Rt.castArray)(e).map(this._genEntityFromElement);bQ().select(t),_Q().setCurSelectEntity(t)}},{key:"unSelect",value:function(e){if(e){var t=Object(Rt.castArray)(e).map(this._genEntityFromElement);bQ().unSelect(t);var r=_Q().getCurSelectEntity();r&&(Array.isArray(r)?_Q().setCurSelectEntity(Object(Rt.difference)(r,t)):t.includes(r)&&_Q().setCurSelectEntity(void 0))}else bQ().select(),_Q().setCurSelectEntity(void 0)}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),wt.on(bt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"off",value:function(e){wt.off(bt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),wt.once(bt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,bQ().on(hy.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(e){return{entityId:e.id,entityType:kB[e.type]}}},{key:"_genElement",value:function(e){var t;if(e instanceof It?t=e.isAppendHardware?be.HARDWARE:be.PARAM_MODEL:e instanceof _t?t=be.PARAM_MODEL_ASSEMBLY:e instanceof Jr?t=be.HARDWARE_GROOVE:e instanceof yr&&(t=e.type===c.HOLE?be.HOLE:be.GROOVE),t)return{id:e.id,type:t}}},{key:"__onDestroy",value:function(){bQ().off(hy.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&EQ(t.prototype,r),n&&EQ(t,n),o}(Av);function wQ(e){return(wQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function RQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){DQ(o,n,i,A,a,"next",e)}function a(e){DQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function MQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function PQ(e,t){return(PQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function TQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=LQ(e);if(t){var i=LQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return FQ(this,r)}}function FQ(e,t){return!t||"object"!==wQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LQ(e){return(LQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var OQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&PQ(e,t)}(u,e);var t,r,n,i,o,A,a=TQ(u);function u(){return MQ(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"viewSelected",value:(A=RQ(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().viewParamModel.viewSelectedParamModel());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"viewModelById",value:(o=RQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().viewParamModel.viewParamModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"resetPerspective",value:function(){var e=xB().getStateManager().scene3D;e.updateEnableCameraAnimation(!0),e.reset()}},{key:"toggleModelBorder",value:function(e){dy().scene.$actionToggleRenderBorder.dispatch(e)}},{key:"toggleModelTransparent",value:function(e){dy().scene.$actionToggleRenderTranslucent.dispatch(e)}},{key:"setting",value:function(e){dy().fittingDesign.senseSetting.$actionSenseSetting.dispatch(e)}},{key:"refreshModel",value:(i=RQ(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().viewParamModel.refreshCustomModelData());case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})}])&&xQ(t.prototype,r),n&&xQ(t,n),u}(Av),kQ=r(244);function NQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function GQ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?NQ(Object(r),!0).forEach((function(t){UQ(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NQ(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function UQ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jQ(e){return function(e){if(Array.isArray(e))return VQ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return VQ(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return VQ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function VQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function YQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var HQ=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isRealPath=!1,this._changeMap={},this.id=zt()(),this.modelID=t,this.paths=r,r.forEach((function(e){e.plankArea=n}))}var t,r,n;return t=e,(r=[{key:"getRealPaths",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var n=r.force,i=void 0!==n&&n,o=r.resetCenter,A=void 0===o||o;if(!i&&A&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!i&&!A&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new e(this.modelID,[]);var a=this.getFace2ds();if(this.paths.length>1){var s=[];u.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),u.FacesBoolean.FaceBooleanType.subtract,s),a=s}var c=0===a.length?a[0]:{loops:(t=[]).concat.apply(t,jQ(a.map((function(e){return e.loops}))))};if(A){Object(kQ.calculateFaceBBox)(c);var l=c.box.center,g=u.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(e){e.loops.forEach((function(e){e.forEach((function(e){e.transform(g)}))}))}))}var f=a.map((function(e){return e.loops[0]})).map((function(e){return qQ(Qe.OUTER,e)})),h=a.reduce((function(e,t){return e.push.apply(e,jQ(t.loops.slice(1))),e}),[]).map((function(e){return qQ(Qe.INNER,e,!0)})),p=new e(this.modelID,[].concat(jQ(f),jQ(h)));return A?this._realPathsResetCenterCache=p:this._realPathsCache=p,p._isRealPath=!0,p}},{key:"getCenterPoint",value:function(){var e=KQ(this.paths.find((function(e){return e.type===Qe.OUTER})));Object(kQ.calculateFaceBBox)(e);var t=e.box.center;return{x:t.x,y:t.y}}},{key:"getFace2ds",value:function(){return this.paths.map(KQ)}},{key:"_trackUpdateField",value:function(e,t,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,i=e.field;t===r||n.some((function(t){return t.field===i&&t.context.id===e.context.id}))||n.push(e)}},{key:"changeMap",get:function(){return this._changeMap},set:function(e){this._changeMap=e}}])&&YQ(t.prototype,r),n&&YQ(t,n),e}();function KQ(e){var t=[];if(e.lines.forEach((function(e){var r=e.start;r.getType()!==_.NONE&&t.push(r.getCurveLineAndPoints().curveLine),t.push(e.getRealLine())})),e.offset){var r=(0,u.LoopCCW.isPolygonCCW2D)(t.map((function(e){return e.startPoint})))?e.offset:-e.offset;return{loops:u.Path2dOffset.offsetPath2d(t,r).resultPaths}}return{loops:[t]}}function qQ(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.map((function(e){return new wr({type:_.NONE,position:e.startPoint})})),i=t.map((function(e){var t;return t=e instanceof u.LineSeg2d?{type:S.SEGMENT}:e instanceof u.Arc2d?JQ(e):WQ(e),new Qr(t)})),o=u.LoopCCW.isPolygonCCW2D(n.map((function(e){return e.getPosition()})));r!==o&&(n=n.reverse(),i=(i=i.reverse().map((function(e){return"boolean"==typeof e.clockwise&&(e.clockwise=!e.clockwise),e}))).slice(1).concat(i[0]));var A=XQ(n.map((function(e){return e.getPosition()})));return n=n.slice(A).concat(n.slice(0,A)),i=i.slice(A).concat(i.slice(0,A)),new Tr({type:e,points:n,lines:i,forceCCW:!1})}function JQ(e){var t={};t.type=S.CIRCLE_ARC,t.radius=e.radius,t.clockwise=!e.isCCW;var r=e.center,n=e.startPoint,i=e.endPoint,o=new u.LineSeg2d(n,i),A=o.length/2,a=new u.Vector2d(o.getPoint(A)),s=new u.Vector2d(r).subtracted(a).normalized();return t.clockwise?t.minorArc=s.isSameDirection(o.rightNormal):t.minorArc=s.isSameDirection(o.leftNormal),t}function WQ(e){var t={};return t.type=S.ELLIPSE_ARC,t.majorRadius=e.majorRadius,t.minorRadius=e.minorRadius,t.clockwise=!e.isCCW,t.ellipseCenter=e.ccs.origin,t}function zQ(e){var t=e.changeMap.update,r=e._isRealPath?e.getCenterPoint():null,n=e._isRealPath?u.Matrix3.makeTranslation(-r.x,-r.y):void 0;t&&t.length>0&&(t.forEach((function(e){var t=e.field,r=e.context;"hint"===t&&((r=r).getHint()?vc(r,n):function(e,t){var r=dc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=n.findIndex((function(r){return r.linkModel.id===e&&r.id===t}));if(i>-1){var o=Ic(n);o.splice(i,1),r.setPlankOutlineHintModels(o)}}(r.path.plankArea.modelID,r.id))})),e.changeMap=GQ(GQ({},e.changeMap),{},{update:[]}))}function XQ(e){if(!e.length)return 0;var t=e[0].y,r=e[0].x;e.slice(1).forEach((function(e){t<e.y&&(t=e.y),r>e.x&&(r=e.x)}));var n,i,o=-r,A=-t;return e.forEach((function(t,r){var a=t.x,s=t.y,u=Math.pow(a+o,2)+Math.pow(s+A,2);void 0===n||u<n?(n=u,i=r):n===u&&e[i].x>t.x&&(i=r)})),i}function ZQ(e){return(ZQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tb(e,t){return(tb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ib(e);if(t){var i=ib(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nb(this,r)}}function nb(e,t){return!t||"object"!==ZQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ib(e){return(ib=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ob=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tb(e,t)}(o,e);var t,r,n,i=rb(o);function o(){return $Q(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"parseModelPlankPath",value:function(e){return t=e.modelID,r=e.data,n=[],r.path&&n.push(Fr(Qe.OUTER,r.path)),n.push.apply(n,jQ(r.holes.map((function(e){return Fr(Qe.INNER,e)})))),new HQ(t,n);var t,r,n}},{key:"syncModelPlankPath",value:function(e){zQ(e)}}])&&eb(t.prototype,r),n&&eb(t,n),o}(Av);function Ab(e){return(Ab="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ab(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function sb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ub(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cb(e,t){return(cb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fb(e);if(t){var i=fb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gb(this,r)}}function gb(e,t){return!t||"object"!==Ab(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fb(e){return(fb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cb(e,t)}(a,e);var t,r,n,i,o,A=lb(a);function a(){return sb(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"stable",value:(i=s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",dy().viewParamModel.validateModelStable(t.modelId));case 1:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){ab(o,r,n,A,a,"next",e)}function a(e){ab(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&ub(t.prototype,r),n&&ub(t,n),a}(Av);function pb(e){return(pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function db(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ib(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yb(e,t){return(yb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Bb(e);if(t){var i=Bb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Eb(this,r)}}function Eb(e,t){return!t||"object"!==pb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bb(e){return(Bb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yb(e,t)}(o,e);var t,r,n,i=Cb(o);function o(){return db(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDesignMode",value:function(e){var t=e.mode,r=e.customModeCb;xB().designModeContext.setDesignMode(t,r)}},{key:"registerMultiSelectShortcut",value:function(e){xB().designModeContext.registerMultiSelectShortcut(e)}}])&&Ib(t.prototype,r),n&&Ib(t,n),o}(Av),mb=r(428),Qb=r.n(mb),bb=new Ei.I18NManager,_b="custom_order_split",Sb={"custom.pad.resetPerspective":"重置视角","custom.pad.confirm":"确定","custom.pad.cannotAdd":"无法适配该模型","custom.pad.chooseBasicModule":"请选择基础模块","custom.pad.loadSeriesFailed":"加载系列失败","custom.pad.invalidSeries":"系列信息无效","custom.pad.invalidURL":"页面走丢了","custom.pad.loadDesignFailed":"产品加载失败","custom.pad.invalidDesign":"产品信息无效","custom.pad.loadFailed":"数据加载失败","custom.pad.invalidData":"数据无效","custom.pad.saveFailed":"产品保存失败","custom.pad.previewFailed":"生成预览图失败","custom.pad.save":"保存","custom.pad.saveAs":"另存为","custom.pad.saveTitle":"产品保存","custom.pad.saveAsTitle":"产品另存为","custom.pad.saveName":"产品名称","custom.pad.saveNameHolder":"请输入产品名称","custom.pad.saveRequired":"该项为必填项","custom.pad.savePos":"存储位置","custom.pad.savePersonal":"个人库","custom.pad.saveEnterprise":"企业库","custom.pad.cancel":"取消","custom.pad.askSave":"是否保存?","custom.pad.askSaveDesc":"是否要保存当前产品方案?","custom.pad.notSave":"不保存","custom.pad.getAuthFailed":"获取用户账号类型失败","custom.pad.uploadCoverFailed":"上传图片封面失败","custom.pad.hideDoor":"隐藏柜门","custom.pad.showDoor":"显示柜门","custom.pad.showDoorTip":"柜门已隐藏, 点击此处可显示柜门","custom.pad.shadingMode":"材质","custom.pad.outlineShadingMode":"材质 + 线框","custom.pad.frameStyle":"柜体样式","custom.pad.replaceFail":"修改样式失败","custom.pad.productNameExist":"产品名称已存在","custom.pad.saveSuccess":"产品保存成功","custom.pad.defaultSaveName":"未命名","custom.pad.showRuler":"显示尺寸","custom.pad.hideRuler":"隐藏尺寸"};function wb(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Db(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){wb(o,n,i,A,a,"next",e)}function a(e){wb(o,n,i,A,a,"throw",e)}A(void 0)}))}}var Rb=Object(Rt.once)((function(){return!!Object(mc.parseServQueryParams)()}));function Mb(){return xb.apply(this,arguments)}function xb(){return(xb=Db(s.a.mark((function e(){var t,r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},r=mc.servkit.createTerminal({id:t.clientId||"custom-order-split",type:mc.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:mc.EServChannel.WINDOW,config:{slave:{getWindow:function(e){return{target:window.parent,window:window}}}}}}}),e.next=4,r.openSession({timeout:t.timeout||3e4});case 4:return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Pb=r(531),Tb=r.n(Pb),Fb=r(1126),Lb=r.n(Fb);function Ob(e){return(Ob="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Gb(e,t){return(Gb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ub(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Vb(e);if(t){var i=Vb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jb(this,r)}}function jb(e,t){return!t||"object"!==Ob(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vb(e){return(Vb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gb(e,t)}(o,e);var t,r,n,i=Ub(o);function o(){return kb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.tip,r=e.noImg,n=e.imgSrc,i=e.className;return mi.a.createElement("div",{className:Tb()(Lb.a.empty,i)},!r&&mi.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),t&&mi.a.createElement("p",null,t))}}])&&Nb(t.prototype,r),n&&Nb(t,n),o}(mi.a.PureComponent);function Hb(e){return(Hb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jb(e,t){return(Jb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xb(e);if(t){var i=Xb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zb(this,r)}}function zb(e,t){return!t||"object"!==Hb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xb(e){return(Xb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jb(e,t)}(o,e);var t,r,n,i=Wb(o);function o(){return Kb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props;return mi.a.createElement(Bi.Scene3D,e)}}])&&qb(t.prototype,r),n&&qb(t,n),o}(vi.PureComponent),$b=r(1127),e_=r.n($b);function t_(e){return(t_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r_(){return(r_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function n_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o_(e,t){return(o_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=s_(e);if(t){var i=s_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a_(this,r)}}function a_(e,t){return!t||"object"!==t_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s_(e){return(s_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}vi.PureComponent;var u_=r(91);function c_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l_(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}window.React=mi.a;var g_=document.getElementById("root");function f_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function p_(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){h_(o,n,i,A,a,"next",e)}function a(e){h_(o,n,i,A,a,"throw",e)}A(void 0)}))}}function d_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I_=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.serviceMap=new Map,this.initLange(de.ZH_CN,{zh_CN:Sb}),function(e){yf=e}(this)}var t,r,n,i,o;return t=e,(r=[{key:"startOnApiCalledEvent",value:function(){var e=this,t={on:function(e){return wt.on(bt.API_CALLED,e),function(){return wt.off(bt.API_CALLED,e)}},once:function(e){return wt.once(bt.API_CALLED,e),function(){return wt.off(bt.API_CALLED,e)}},emit:function(e){wt.emit(bt.API_CALLED,e)}};Ie.setEvent(t),t.on((function(t){var r=t.args,n=t.errMsg,i=t.status,o=t.apiName,A=t.duration,a=t.serviceName,s=e.getCustomMiniAppService(ug);if(s){var u="".concat(a,".").concat(o);if(s.logApiCalledInfo({status:i,apiType:"CUSTOM_SPLIT_API",apiName:u,duration:A}),!i){var c=n instanceof Error?n.message:n&&n.toString?n.toString():"unknown",l="\n called ".concat(u," api fail:\n arguments is ").concat(JSON.stringify(r),",\n errMsg is ").concat(c,"\n ");s.logApiError(new Error(l),"miniAppApiCalledError")}}}))}},{key:"isInCustomMiniAppMode",value:function(){return Rb()}},{key:"start",value:(o=p_(s.a.mark((function e(t){var r,n,i=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isInCustomMiniAppMode()){e.next=7;break}if(mc.sappSDK.isStarted){e.next=4;break}return e.next=4,mc.sappSDK.setConfig({useTerminalId:null==t?void 0:t.clientId,onClose:function(){var e=p_(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.stop();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).start();case 4:this.sappSDK=mc.sappSDK,e.next=12;break;case 7:return e.next=9,kh(30);case 9:return e.next=11,Mb(t);case 11:this.sappSDK=e.sent;case 12:return this.startOnApiCalledEvent(),e.next=15,Promise.resolve([Bi.App,Hv]).then((function(e){var t=c_(e,2),r=t[0],n=t[1];(new r).registerPlugin(n).start({fpsDetectorEnabled:!0}),document.body.removeChild(g_)})).catch((function(e){Object(u_.unmountComponentAtNode)(g_),Object(u_.render)(mi.a.createElement(Yb,null),g_),console.error("micros/pad",e)}));case 15:return(r=this.getCustomMiniAppService(Ag))?(nc().setMiniAppHttpProxyClientService(r),Sf(nc())):Sf(rc()),(Ef=new _f.AttachedService).config.setRequestClient(vf),Bf=new _f.ParamModelDataService({paramModelConstructor:It,requestClient:vf}),new _f.ParamModelAssemblyDataService({paramModelAssemblyConstructor:_t,requestClient:vf}),n=this.getService(OQ),e.prev=19,e.next=22,n.viewSelected();case 22:e.next=27;break;case 24:e.prev=24,e.t0=e.catch(19),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.error(e.t0);case 27:case"end":return e.stop()}}),e,this,[[19,24]])}))),function(e){return o.apply(this,arguments)})},{key:"initLange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de.ZH_CN,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(Rt.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),Qb.a.init({lang:e,debug:!1,initImmediate:!0,translatorType:mb.ENUM.TranslatorType.I18next,packages:[_b],resource:f_({},_b,t)}),bb.init({namespace:_b,resources:_b})}},{key:"stop",value:(i=p_(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.getCustomMiniAppService(ag))){e.next=4;break}return e.next=4,t.lockModelBySplit();case 4:this.serviceMap.forEach((function(e){Object(Rt.isFunction)(e.__onDestroy)&&e.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getService",value:function(e){if(Av.isPrototypeOf(e)){var t=this.serviceMap,r=t.get(e);return r||(r=new e,t.set(e,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(e){var t=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return t instanceof mc.SappSDK?t.getService(e):t.client.getService(e)}},{key:"getCustomMiniAppServiceUnSafe",value:function(e){return this.getCustomMiniAppService(e)}}])&&d_(t.prototype,r),n&&d_(t,n),e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"changeLanguage",(function(){return X})),r.d(t,"cloneInstance",(function(){return Z})),r.d(t,"createInstance",(function(){return $})),r.d(t,"dir",(function(){return ee})),r.d(t,"exists",(function(){return te})),r.d(t,"getFixedT",(function(){return re})),r.d(t,"init",(function(){return ne})),r.d(t,"loadLanguages",(function(){return ie})),r.d(t,"loadNamespaces",(function(){return oe})),r.d(t,"loadResources",(function(){return Ae})),r.d(t,"off",(function(){return ae})),r.d(t,"on",(function(){return se})),r.d(t,"setDefaultNamespace",(function(){return ue})),r.d(t,"t",(function(){return ce})),r.d(t,"use",(function(){return le}));var n=r(191),i=r.n(n),o=r(85),A=r.n(o),a=r(73),s=r.n(a),u=r(74),c=r.n(u),l=r(212),g=r.n(l),f=r(247),h=r.n(f),p=r(248),d=r.n(p),I=r(101),y=r.n(I),C=r(1119),E=r.n(C),B={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var r;console&&console[e]&&(r=console)[e].apply(r,E()(t))}},v=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.init(t,r)}return c()(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||B,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,A()({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),m=function(){function e(){s()(this,e),this.observers={}}return c()(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){var r=this;this.observers[e]&&this.observers[e].forEach((function(){if(t){var n=r.observers[e].indexOf(t);n>-1&&r.observers[e].splice(n,1)}else delete r.observers[e]}))}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function Q(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function b(e){return null==e?"":""+e}function _(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function S(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var A=n(o.shift());!e[A]&&r&&(e[A]=new r),e=e[A]}return i()?{}:{obj:e,k:n(o.shift())}}function w(e,t,r){var n=S(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=S(e,t),n=r.obj,i=r.k;if(n)return n[i]}function R(e,t,r){for(var n in t)n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):R(e[n],t[n],r):e[n]=t[n];return e}function M(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return d()(t,e),c()(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=[e,t];return r&&"string"!=typeof r&&(o=o.concat(r)),r&&"string"==typeof r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split(".")),D(this.data,o)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var A=[e,t];r&&(A=A.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(A=e.split("."))[1]),this.addNamespaces(t),w(this.data,A,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=D(this.data,a)||{};n?R(s,r,i):s=A()({},s,r),w(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?A()({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(m),F={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}},L=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],e,y()(y()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=v.create("translator"),r}return d()(t,e),c()(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=t.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var o=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var r=this;if("object"!==i()(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),a=o.key,s=o.namespaces,u=s[s.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){var g=t.nsSeparator||this.options.nsSeparator;return u+g+a}return a}var f=this.resolve(e,t),h=f&&f.res,p=f&&f.usedKey||a,d=f&&f.exactUsedKey||a,I=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],C=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,B="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(E&&h&&B&&y.indexOf(I)<0&&("string"!=typeof C||"[object Array]"!==I)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,t):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");if(n){var v="[object Array]"===I,m=v?[]:{},Q=v?d:p;for(var b in h)if(Object.prototype.hasOwnProperty.call(h,b)){var _="".concat(Q).concat(n).concat(b);m[b]=this.translate(_,A()({},t,{joinArrays:!1,ns:s})),m[b]===_&&(m[b]=h[b])}h=m}}else if(E&&"string"==typeof C&&"[object Array]"===I)(h=h.join(C))&&(h=this.extendTranslation(h,e,t));else{var S=!1,w=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(S=!0,void 0!==t.count){var D=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(D)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(w=!0,h=a);var R=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(w||S||R){this.logger.log(R?"updateKey":"missingKey",c,u,a,R?t.defaultValue:h);var M=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var P=0;P<x.length;P++)M.push(x[P]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var T=function(e,n){r.options.missingKeyHandler?r.options.missingKeyHandler(e,u,n,R?t.defaultValue:h,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,u,n,R?t.defaultValue:h,R,t),r.emit("missingKey",e,u,n,h)};if(this.options.saveMissing){var F=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&F?M.forEach((function(e){r.pluralResolver.getPluralFormsOfKey(e,a).forEach((function(t){return T([e],t)}))})):T(M,a)}}h=this.extendTranslation(h,e,t,f),w&&h===a&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(a)),w&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,r,n){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,r,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(A()({},r,{interpolation:A()({},this.options.interpolation,r.interpolation)}));var o=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(o=A()({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,r.lng||this.language,r),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var a=r.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==r.applyPostProcessor&&(e=F.handle(s,e,t,r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,A=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!A.isValidLookup(t)){var s=A.extractFromKey(e,a),u=s.key;r=u;var c=s.namespaces;A.options.fallbackNS&&(c=c.concat(A.options.fallbackNS));var l=void 0!==a.count&&"string"!=typeof a.count,g=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:A.languageUtils.toResolveHierarchy(a.lng||A.language,a.fallbackLng);c.forEach((function(e){A.isValidLookup(t)||(o=e,f.forEach((function(r){if(!A.isValidLookup(t)){i=r;var o,s,c=u,f=[c];if(A.i18nFormat&&A.i18nFormat.addLookupKeys)A.i18nFormat.addLookupKeys(f,u,r,e,a);else l&&(o=A.pluralResolver.getSuffix(r,a.count)),l&&g&&f.push(c+o),g&&f.push(c+="".concat(A.options.contextSeparator).concat(a.context)),l&&f.push(c+=o);for(;s=f.pop();)A.isValidLookup(t)||(n=s,t=A.getResource(r,e,s,a))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}]),t}(m);function O(e){return e.charAt(0).toUpperCase()+e.slice(1)}var k=function(){function e(t){s()(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=v.create("languageUtils")}return c()(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=O(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=O(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=O(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isWhitelisted(e)?i.push(e):r.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],G={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};function U(){var e={};return N.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:G[t.fc]}}))})),e}var j=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=U()}return c()(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=this,n=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var o=r.getSuffix(e,i);n.push("".concat(t).concat(o))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),o=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var A=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):A():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?A():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s()(this,e),this.logger=v.create("interpolator"),this.init(t,!0)}return c()(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e}),e.interpolation||(e.interpolation={escapeValue:!0});var r=e.interpolation;this.escape=void 0!==r.escape?r.escape:P,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?M(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?M(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?M(r.nestingPrefix):r.nestingPrefixEscaped||M("$t("),this.nestingSuffix=r.nestingSuffix?M(r.nestingSuffix):r.nestingSuffixEscaped||M(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,A,a=this;function s(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0)return D(t,e);var n=e.split(a.formatSeparator),i=n.shift().trim(),o=n.join(a.formatSeparator).trim();return a.format(D(t,i),o,r)};this.resetRegExp();var c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(A=0;(i=this.regexpUnescape.exec(e))&&(o=u(i[1].trim()),e=e.replace(i[0],o),this.regexpUnescape.lastIndex=0,!(++A>=this.maxReplaces)););for(A=0;i=this.regexp.exec(e);){if(void 0===(o=u(i[1].trim())))if("function"==typeof c){var l=c(e,i,n);o="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o="";else"string"==typeof o||this.useRawValueToEscape||(o=b(o));if(o=this.escapeValue?s(this.escape(o)):s(o),e=e.replace(i[0],o),this.regexp.lastIndex=0,++A>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=A()({},i);function a(e,t){if(e.indexOf(",")<0)return e;var r=e.split(",");e=r.shift();var n=r.join(",");n=(n=this.interpolate(n,o)).replace(/'/g,'"');try{o=JSON.parse(n),t&&(o=A()({},t,o))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(o.applyPostProcessor=!1;r=this.nestingRegexp.exec(e);){if((n=t(a.call(this,r[1].trim(),o),o))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=b(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}(),Y=r(726),H=r.n(Y);var K=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s()(this,t),i=g()(this,h()(t).call(this)),m.call(y()(y()(i))),i.backend=e,i.store=r,i.languageUtils=n.languageUtils,i.options=o,i.logger=v.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return d()(t,e),c()(t,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o=[],A=[],a=[],s=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?A.indexOf(a)<0&&A.push(a):(i.state[a]=1,n=!1,A.indexOf(a)<0&&A.push(a),o.indexOf(a)<0&&o.push(a),s.indexOf(t)<0&&s.push(t)))})),n||a.push(e)})),(o.length||A.length)&&this.queue.push({pending:A,loaded:{},errors:[],callback:n}),{toLoad:o,pending:A,toLoadLanguages:a,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=H()(n,2),o=i[0],A=i[1];t&&this.emit("failedLoading",o,A,t),r&&this.store.addResourceBundle(o,A,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,i,s,u,c,l;n=r.loaded,i=A,u=S(n,[o],Object),c=u.obj,l=u.k,c[l]=c[l]||[],s&&(c[l]=c[l].concat(i)),s||c[l].push(i),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,A=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(a,s){a&&s&&i<5?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,A)}),o):A(a,s)})):A(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=H()(n,2),o=i[0],A=i[1];this.read(o,A,"read",null,null,(function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(A," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(A," for language ").concat(o),i),t.loaded(e,n,i)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,A()({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n)}}]),t}(m);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===i()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i()(e[2])||"object"===i()(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function J(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function W(){}var z=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(s()(this,t),e=g()(this,h()(t).call(this)),m.call(y()(y()(e))),e.options=J(r),e.services={},e.logger=v,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),g()(e,y()(y()(e)));setTimeout((function(){e.init(r,n)}),0)}return e}return d()(t,e),c()(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(r=t,t={}),this.options=A()({},q(),this.options,J(t)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?v.init(n(this.modules.logger),this.options):v.init(null,this.options);var i=new k(this.options);this.store=new T(this.options.resources,this.options);var o=this.services;o.logger=v,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new j(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new V(this.options),o.backendConnector=new K(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new L(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}var a=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var s=Q(),u=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(n),r(t,n)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var r=[],n=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(this.language)n(this.language);else{var i=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);i.forEach((function(e){return n(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return n(e)})),this.services.backendConnector.load(r,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,r){var n=Q();return e||(e=this.languages),t||(t=this.options.ns),r||(r=W),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this,n=Q();this.emit("languageChanging",e);var i=function(e){e&&(r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.translator.language||r.translator.changeLanguage(e),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(e)),r.loadResources((function(i){!function(e,i){r.translator.changeLanguage(i),i&&(r.emit("languageChanged",i),r.logger.log("languageChanged",i)),n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var o=A()({},n);if("object"!==i()(n)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(s))}return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,r.t(t,o)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=t,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"loadNamespaces",value:function(e,t){var r=this,n=Q();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=Q();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,i=A()({},this.options,r,{isClone:!0}),o=new t(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.translator=new L(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(i,n),o.translator.options=o.options,o}}]),t}(m)),X=(t.default=z,z.changeLanguage.bind(z)),Z=z.cloneInstance.bind(z),$=z.createInstance.bind(z),ee=z.dir.bind(z),te=z.exists.bind(z),re=z.getFixedT.bind(z),ne=z.init.bind(z),ie=z.loadLanguages.bind(z),oe=z.loadNamespaces.bind(z),Ae=z.loadResources.bind(z),ae=z.off.bind(z),se=z.on.bind(z),ue=z.setDefaultNamespace.bind(z),ce=z.t.bind(z),le=z.use.bind(z)}])}));
|
|
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(Lt.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:vg(this.displayInfos.values()),wireFrames:Object(Lt.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(Lt.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(e){var t=new rg.a;if(Object(Lt.extend)(t,e),t.meshModels=t.meshModels.map((function(e){var t=e.displayMaterial,r=new Ag.a,n=new rn.a;return Object(Lt.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(Lt.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(Lt.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(1121),Pg=r.n(xg),Tg=r(357),Fg=r.n(Tg),Lg=r(717),Og=r.n(Lg),kg=r(1122),Ng=r.n(kg),Gg=r(723),Ug=r.n(Gg),jg=r(724),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(528),Xg=r.n(zg),Zg=r(1123),$g=r.n(Zg),ef=r(722),tf=r.n(ef),rf=r(721),nf=r.n(rf),of=r(358),Af=r.n(of),af=r(242),sf=r.n(af),uf=r(728),cf=r.n(uf),lf=r(716),gf=r.n(lf),ff=r(1124),hf=r.n(ff),pf=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[ii.a,Kn.a,Fg.a,Te.a,Og.a,Le.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,OA.Vector3,Mg.a,Pg.a,Ss.ParamStore,Ug.a,Vg.a,Ag.a,rn.a,ig.FurnitureModel,Map,OA.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 Lf(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 Lf(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 Lf(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 Lf(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 Of(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,o;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.state.currentCustomData,r){t.next=3;break}return t.abrupt("return",n);case 3:if(i=Object(Lt.castArray)(r),o=Object(Lt.difference)(i,e.lastCurrentCustomDataArgs),e.lastCurrentCustomDataArgs=i,!o.length&&n){t.next=12;break}return t.next=9,iv(r);case 9:n=t.sent,t.next=13;break;case 12:return t.abrupt("return",n);case 13:return e.state.currentCustomData=n,t.abrupt("return",n);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.loadFittingHardwareToSense=function(){var t=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(Lt.uniq)(Object(Lt.flatten)(Object(Lt.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(Lt.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(Lt.mapValues)(Object(Lt.keyBy)(Object(Lt.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(Lt.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=Of(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 Le.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=Oh(e);if(t){var i=Oh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Lh(this,r)}}function Lh(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 Oh(e){return(Oh=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(Lt.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(Lt.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(Lt.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(Lt.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(Lt.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(Lt.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(Lt.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(Lt.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(Lt.filter)(i.holes[u],f),o.grooves[u]=Object(Lt.filter)(i.grooves[u],f),t.next=27;break;case 26:Object(Lt.keys)(o).forEach((function(e){i[e]&&i[e][r]&&(o[e][r]=Object(Lt.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(Lt.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(Lt.pull)(Object(Lt.keys)(h),"id").forEach((function(e){var t=h[e];Object(Lt.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(Lt.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 Lp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Op(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}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 Lp(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(Lt.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(Lt.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)}}])&&Op(t.prototype,r),n&&Op(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(Lt.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(Lt.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(Lt.mapValues)(e,(function(e){return function(e,t){var r={};return Object(Lt.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(Lt.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(Lt.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(Lt.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=Ld(e);if(t){var i=Ld(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 Ld(e){return(Ld=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&&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(Lt.castArray)(t.renderIgnoreCategory)),Object(Lt.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(Od),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(715),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(Lt.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(Lt.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(729);function LI(e){return(LI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OI(e,t){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"!==LI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function 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 OI(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:OA.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=OA.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=OA.RenderMode.SHADING,e.abrupt("break",14);case 7:return n=OA.RenderMode.OUTLINE_WITH_SHADING,e.abrupt("break",14);case 9:return i=!0,e.abrupt("break",14);case 11:return n=OA.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===OA.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?OA.RenderMode.OUTLINE_WITH_SHADING:OA.RenderMode.SHADING,e.next=3,Object(uh.put)(this.$actionMergeState.message({renderMode:n}));case 3:NB().viewer.toggleShowModelOutline(n===OA.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(Lt.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(Lt.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(1125),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 Ly(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==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 Oy(this,r)}}function Oy(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=Ly(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=Ly(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(OA.BackgroundMode.SolidColorBackground),t.background.solid.color.set(new OA.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(Lt.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(2073);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 OA.BoxGeometry(n.x,n.y,n.z),u=new OA.MeshBasicMaterial({color:A,opacity:a,visible:o,transparent:!0}),c=new OA.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 OA.CylinderGeometry(s,s,o),c=new OA.MeshBasicMaterial({color:A,opacity:a,visible:n,transparent:!0}),l=new OA.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)},LC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&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 OC(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 OA.LineBasicMaterial,u=new OA.MeshBasicMaterial({transparent:!0,opacity:a}),c=new OA.Mesh(void 0,u),l=new OA.Line(void 0,s),g=new OA.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 OA.Shape,u=A?new OA.Geometry:null;s.moveTo(a.x,a.y),n.forEach((function(e){s.lineTo(e.x,e.y),A&&u.vertices.push(new OA.Vector3(e.x,e.y,i))})),s.lineTo(a.x,a.y),o&&(s.holes=o);A&&(u.vertices.push(new OA.Vector3(a.x,a.y,i)),r.geometry&&r.geometry.dispose(),r.geometry=u);var c=new OA.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)}LC=TC([Object(Si.provideEntityAPIs)([new Si.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=new OA.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=OC({matrix:l,depth:0,points:s,color:i,side:OA.Side.FrontSide,position:g,opacity:o}),h=OC({matrix:l,depth:-n,points:s,color:i,side:OA.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 OA.MeshBasicMaterial({opacity:o,transparent:!0}),a=new OA.Mesh(new OA.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 OA.BufferGeometry){var s=bC(e.topPoints,e.bottomPoints);a.geometry.addAttribute("position",new OA.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:OA.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 OA.Mesh&&e.material&&Object(Lt.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])],LC);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 OA.Geometry,r=e.getVertices().map((function(e){var t=e;return new OA.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 OA.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 OA.LineBasicMaterial({color:t,opacity:r,transparent:!0}),A=new OA.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 OA.BufferGeometry;if(t.index=new OA.BufferAttribute(new Uint16Array(e.indices),1),t.addAttribute("position",new OA.BufferAttribute(new Float32Array(e.vertices),3)),t.addAttribute("uv",new OA.BufferAttribute(new Float32Array(e.textures),2)),e.normals){var r=new Float32Array(e.normals);t.addAttribute("normal",new OA.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 OA.Group,A=XC(r),a=new OA.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:OA.Side.DoubleSide}),s=new OA.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 OA.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 OA.SphereBufferGeometry(3),uE=new OA.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 OA.Group;r&&r.forEach((function(e){var t=XC(fi(e,o)),r=new OA.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:e.color,opacity:e.opacity,transparent:!0,side:OA.Side.DoubleSide}),n=new OA.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(Lt.zip)(u,[].concat(cE(u.slice(1)),[u[0]]))),cE(Object(Lt.zip)(c,[].concat(cE(c.slice(1)),[c[0]]))),cE(Object(Lt.zip)(u,c))).flat().map((function(e){return[e.x,e.y,e.z]})).flat()}var l=Object(Lt.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 OA.MeshBasicMaterial({opacity:n,transparent:!0}),l=new OA.Mesh(new OA.BufferGeometry,c);if(c.setValues({side:OA.Side.DoubleSide,color:r}),l.setAttribute("transparent-line-origin",!0),l.setAttribute("outline",!1),l.setAttribute("shadowCaster",!1),l.geometry instanceof OA.BufferGeometry){var g=bC(a,s);l.geometry.addAttribute("position",new OA.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 LC(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 LE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var OE=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(Lt.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(Lt.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(Lt.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)}}])&&LE(t.prototype,r),n&&LE(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 OE,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(Lt.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(Lt.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(Lt.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(Lt.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(Lt.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 LB,OB=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:OB},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=OB.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(Lt.isObject)(n)&&Object(Lt.isFunction)(n.then)&&Object(Lt.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(LB={},Me.PARAM_MODEL,dA),GB(LB,Me.PARAM_MODEL_ASSEMBLY,pA),GB(LB,Me.HOLE,ch),GB(LB,Me.GROOVE,ch),GB(LB,Me.HARDWARE_GROOVE,lh),GB(LB,Me.HARDWARE,dA),LB);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(Lt.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(Lt.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(Lt.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)),Lv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&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 Ov(e){return(Ov="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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"!==Ov(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function 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:Lv})),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,Lm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("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 Om(e){return(Om="function"==typeof Symbol&&"symbol"==typeof Symbol.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"!==Om(t)&&"function"!=typeof t?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(Lt.map)(n.intersectedGroups,(function(e){return qh(qh({},e),{},{intersecteds:Object(Lt.map)(e.intersecteds,(function(e){return Object(Lt.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(Lt.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(Lt.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(Lt.castArray)(e).map(this._genEntityFromElement);xQ().select(t),PQ().setCurSelectEntity(t)}},{key:"unSelect",value:function(e){if(e){var t=Object(Lt.castArray)(e).map(this._genEntityFromElement);xQ().unSelect(t);var r=PQ().getCurSelectEntity();r&&(Array.isArray(r)?PQ().setCurSelectEntity(Object(Lt.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 LQ(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 OQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){LQ(o,n,i,A,a,"next",e)}function a(e){LQ(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=OQ(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=OQ(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=OQ(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(428),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 Lb(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 Ob=Object(Lt.once)((function(){return!!Object(Dc.parseServQueryParams)()}));function kb(){return Nb.apply(this,arguments)}function Nb(){return(Nb=Lb(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(531),Ub=r.n(Gb),jb=r(1126),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(1127),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 Ob()}},{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(Lt.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(Lt.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(1119),E=r.n(C),B={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var r;console&&console[e]&&(r=console)[e].apply(r,E()(t))}},v=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.init(t,r)}return c()(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||B,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,A()({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),m=function(){function e(){s()(this,e),this.observers={}}return c()(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){var r=this;this.observers[e]&&this.observers[e].forEach((function(){if(t){var n=r.observers[e].indexOf(t);n>-1&&r.observers[e].splice(n,1)}else delete r.observers[e]}))}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function Q(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function b(e){return null==e?"":""+e}function _(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function S(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var A=n(o.shift());!e[A]&&r&&(e[A]=new r),e=e[A]}return i()?{}:{obj:e,k:n(o.shift())}}function w(e,t,r){var n=S(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=S(e,t),n=r.obj,i=r.k;if(n)return n[i]}function R(e,t,r){for(var n in t)n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):R(e[n],t[n],r):e[n]=t[n];return e}function M(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return d()(t,e),c()(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=[e,t];return r&&"string"!=typeof r&&(o=o.concat(r)),r&&"string"==typeof r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split(".")),D(this.data,o)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var A=[e,t];r&&(A=A.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(A=e.split("."))[1]),this.addNamespaces(t),w(this.data,A,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=D(this.data,a)||{};n?R(s,r,i):s=A()({},s,r),w(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?A()({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(m),F={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}},L=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],e,y()(y()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=v.create("translator"),r}return d()(t,e),c()(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=t.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var o=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var r=this;if("object"!==i()(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),a=o.key,s=o.namespaces,u=s[s.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){var g=t.nsSeparator||this.options.nsSeparator;return u+g+a}return a}var f=this.resolve(e,t),h=f&&f.res,p=f&&f.usedKey||a,d=f&&f.exactUsedKey||a,I=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],C=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,B="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(E&&h&&B&&y.indexOf(I)<0&&("string"!=typeof C||"[object Array]"!==I)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,t):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");if(n){var v="[object Array]"===I,m=v?[]:{},Q=v?d:p;for(var b in h)if(Object.prototype.hasOwnProperty.call(h,b)){var _="".concat(Q).concat(n).concat(b);m[b]=this.translate(_,A()({},t,{joinArrays:!1,ns:s})),m[b]===_&&(m[b]=h[b])}h=m}}else if(E&&"string"==typeof C&&"[object Array]"===I)(h=h.join(C))&&(h=this.extendTranslation(h,e,t));else{var S=!1,w=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(S=!0,void 0!==t.count){var D=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(D)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(w=!0,h=a);var R=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(w||S||R){this.logger.log(R?"updateKey":"missingKey",c,u,a,R?t.defaultValue:h);var M=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var P=0;P<x.length;P++)M.push(x[P]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var T=function(e,n){r.options.missingKeyHandler?r.options.missingKeyHandler(e,u,n,R?t.defaultValue:h,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,u,n,R?t.defaultValue:h,R,t),r.emit("missingKey",e,u,n,h)};if(this.options.saveMissing){var F=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&F?M.forEach((function(e){r.pluralResolver.getPluralFormsOfKey(e,a).forEach((function(t){return T([e],t)}))})):T(M,a)}}h=this.extendTranslation(h,e,t,f),w&&h===a&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(a)),w&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,r,n){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,r,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(A()({},r,{interpolation:A()({},this.options.interpolation,r.interpolation)}));var o=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(o=A()({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,r.lng||this.language,r),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var a=r.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==r.applyPostProcessor&&(e=F.handle(s,e,t,r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,A=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!A.isValidLookup(t)){var s=A.extractFromKey(e,a),u=s.key;r=u;var c=s.namespaces;A.options.fallbackNS&&(c=c.concat(A.options.fallbackNS));var l=void 0!==a.count&&"string"!=typeof a.count,g=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:A.languageUtils.toResolveHierarchy(a.lng||A.language,a.fallbackLng);c.forEach((function(e){A.isValidLookup(t)||(o=e,f.forEach((function(r){if(!A.isValidLookup(t)){i=r;var o,s,c=u,f=[c];if(A.i18nFormat&&A.i18nFormat.addLookupKeys)A.i18nFormat.addLookupKeys(f,u,r,e,a);else l&&(o=A.pluralResolver.getSuffix(r,a.count)),l&&g&&f.push(c+o),g&&f.push(c+="".concat(A.options.contextSeparator).concat(a.context)),l&&f.push(c+=o);for(;s=f.pop();)A.isValidLookup(t)||(n=s,t=A.getResource(r,e,s,a))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}]),t}(m);function O(e){return e.charAt(0).toUpperCase()+e.slice(1)}var k=function(){function e(t){s()(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=v.create("languageUtils")}return c()(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=O(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=O(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=O(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isWhitelisted(e)?i.push(e):r.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],G={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};function U(){var e={};return N.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:G[t.fc]}}))})),e}var j=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=U()}return c()(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=this,n=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var o=r.getSuffix(e,i);n.push("".concat(t).concat(o))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),o=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var A=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):A():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?A():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s()(this,e),this.logger=v.create("interpolator"),this.init(t,!0)}return c()(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e}),e.interpolation||(e.interpolation={escapeValue:!0});var r=e.interpolation;this.escape=void 0!==r.escape?r.escape:P,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?M(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?M(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?M(r.nestingPrefix):r.nestingPrefixEscaped||M("$t("),this.nestingSuffix=r.nestingSuffix?M(r.nestingSuffix):r.nestingSuffixEscaped||M(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,A,a=this;function s(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0)return D(t,e);var n=e.split(a.formatSeparator),i=n.shift().trim(),o=n.join(a.formatSeparator).trim();return a.format(D(t,i),o,r)};this.resetRegExp();var c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(A=0;(i=this.regexpUnescape.exec(e))&&(o=u(i[1].trim()),e=e.replace(i[0],o),this.regexpUnescape.lastIndex=0,!(++A>=this.maxReplaces)););for(A=0;i=this.regexp.exec(e);){if(void 0===(o=u(i[1].trim())))if("function"==typeof c){var l=c(e,i,n);o="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o="";else"string"==typeof o||this.useRawValueToEscape||(o=b(o));if(o=this.escapeValue?s(this.escape(o)):s(o),e=e.replace(i[0],o),this.regexp.lastIndex=0,++A>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=A()({},i);function a(e,t){if(e.indexOf(",")<0)return e;var r=e.split(",");e=r.shift();var n=r.join(",");n=(n=this.interpolate(n,o)).replace(/'/g,'"');try{o=JSON.parse(n),t&&(o=A()({},t,o))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(o.applyPostProcessor=!1;r=this.nestingRegexp.exec(e);){if((n=t(a.call(this,r[1].trim(),o),o))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=b(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}(),Y=r(726),H=r.n(Y);var K=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s()(this,t),i=g()(this,h()(t).call(this)),m.call(y()(y()(i))),i.backend=e,i.store=r,i.languageUtils=n.languageUtils,i.options=o,i.logger=v.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return d()(t,e),c()(t,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o=[],A=[],a=[],s=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?A.indexOf(a)<0&&A.push(a):(i.state[a]=1,n=!1,A.indexOf(a)<0&&A.push(a),o.indexOf(a)<0&&o.push(a),s.indexOf(t)<0&&s.push(t)))})),n||a.push(e)})),(o.length||A.length)&&this.queue.push({pending:A,loaded:{},errors:[],callback:n}),{toLoad:o,pending:A,toLoadLanguages:a,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=H()(n,2),o=i[0],A=i[1];t&&this.emit("failedLoading",o,A,t),r&&this.store.addResourceBundle(o,A,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,i,s,u,c,l;n=r.loaded,i=A,u=S(n,[o],Object),c=u.obj,l=u.k,c[l]=c[l]||[],s&&(c[l]=c[l].concat(i)),s||c[l].push(i),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,A=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(a,s){a&&s&&i<5?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,A)}),o):A(a,s)})):A(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=H()(n,2),o=i[0],A=i[1];this.read(o,A,"read",null,null,(function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(A," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(A," for language ").concat(o),i),t.loaded(e,n,i)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,A()({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n)}}]),t}(m);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===i()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i()(e[2])||"object"===i()(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function J(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function W(){}var z=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(s()(this,t),e=g()(this,h()(t).call(this)),m.call(y()(y()(e))),e.options=J(r),e.services={},e.logger=v,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),g()(e,y()(y()(e)));setTimeout((function(){e.init(r,n)}),0)}return e}return d()(t,e),c()(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(r=t,t={}),this.options=A()({},q(),this.options,J(t)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?v.init(n(this.modules.logger),this.options):v.init(null,this.options);var i=new k(this.options);this.store=new T(this.options.resources,this.options);var o=this.services;o.logger=v,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new j(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new V(this.options),o.backendConnector=new K(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new L(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}var a=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var s=Q(),u=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(n),r(t,n)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var r=[],n=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(this.language)n(this.language);else{var i=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);i.forEach((function(e){return n(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return n(e)})),this.services.backendConnector.load(r,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,r){var n=Q();return e||(e=this.languages),t||(t=this.options.ns),r||(r=W),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this,n=Q();this.emit("languageChanging",e);var i=function(e){e&&(r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.translator.language||r.translator.changeLanguage(e),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(e)),r.loadResources((function(i){!function(e,i){r.translator.changeLanguage(i),i&&(r.emit("languageChanged",i),r.logger.log("languageChanged",i)),n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var o=A()({},n);if("object"!==i()(n)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(s))}return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,r.t(t,o)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=t,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"loadNamespaces",value:function(e,t){var r=this,n=Q();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=Q();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,i=A()({},this.options,r,{isClone:!0}),o=new t(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.translator=new L(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(i,n),o.translator.options=o.options,o}}]),t}(m)),X=(t.default=z,z.changeLanguage.bind(z)),Z=z.cloneInstance.bind(z),$=z.createInstance.bind(z),ee=z.dir.bind(z),te=z.exists.bind(z),re=z.getFixedT.bind(z),ne=z.init.bind(z),ie=z.loadLanguages.bind(z),oe=z.loadNamespaces.bind(z),Ae=z.loadResources.bind(z),ae=z.off.bind(z),se=z.on.bind(z),ue=z.setDefaultNamespace.bind(z),ce=z.t.bind(z),le=z.use.bind(z)}])}));
|