-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathp__Three__birdCage__index.async.js
1 lines (1 loc) · 18.2 KB
/
p__Three__birdCage__index.async.js
1
(self.webpackChunk=self.webpackChunk||[]).push([[1832],{32857:function(h,r){"use strict";var a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};r.Z=a},48820:function(h,r){"use strict";var a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};r.Z=a},27363:function(h,r){"use strict";var a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};r.Z=a},63404:function(h,r){"use strict";var a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};r.Z=a},78848:function(h,r,a){"use strict";a.r(r),a.d(r,{default:function(){return K}});var f=a(49677),d=a.n(f),C=a(15009),x=a.n(C),g=a(99289),u=a.n(g),m=a(12444),y=a.n(m),E=a(72004),V=a.n(E),L=a(25098),M=a.n(L),v=a(31996),w=a.n(v),i=a(26037),b=a.n(i),S=a(9783),o=a.n(S),I=a(39318),G=a(61456),R=a(21990),O=a(40877),D=a(18423),l=D.Z.Three,H=D.Z.TWEEN,U=D.Z.OrbitControls,B=D.Z.dat,N=D.Z.Stats,X=D.Z.OBJLoader,J=D.Z.MTLLoader,F=D.Z.GLTFLoader,$=D.Z.CalcThree,Y=V()(function z(){var e=this;y()(this,z),o()(this,"container",void 0),o()(this,"camera",void 0),o()(this,"camera2",void 0),o()(this,"scene",void 0),o()(this,"renderer",void 0),o()(this,"stats",void 0),o()(this,"animateFrame",void 0),o()(this,"tween",void 0),o()(this,"mixer",void 0),o()(this,"clock",new l.Clock),o()(this,"controls",void 0),o()(this,"Geometrys",{}),o()(this,"Materials",{}),o()(this,"Meshs",{}),o()(this,"birdGroup",{}),o()(this,"ballsGroup",{}),o()(this,"GuiInit",null),o()(this,"guiData",{x:.005,color:"#000000",autoRotate:!0,selfControl:!1,showHelpBall:!1}),o()(this,"birdAnimate",{direction:new l.Vector3(1,0,0),speed:15,speedDecay:0}),o()(this,"moveState",{up:0,down:0,left:0,right:0,rollLeft:0,rollRight:0}),o()(this,"rotateQuaternion",new l.Quaternion),o()(this,"birdUp",new l.Vector3(0,1,0)),o()(this,"rotateSpeed",new l.Vector3(1,1,1)),o()(this,"targetPosition",new l.Vector3(0,0,0)),o()(this,"mouseData",{mouseX:0,mouseY:0}),o()(this,"pointer",new l.Vector2(-2,-2)),o()(this,"init",function(t){e.container=document.getElementById(t);var n=e.container.clientWidth,s=e.container.clientHeight;e.scene=new l.Scene,e.scene=new l.Scene,e.camera=new l.PerspectiveCamera(45,n/s,1,500),e.camera.position.x=0,e.camera.position.y=0,e.camera.position.z=150,e.camera.lookAt(e.scene.position),e.renderer=new l.WebGLRenderer,e.renderer.setPixelRatio(window.devicePixelRatio),e.renderer.setSize(n,s),e.renderer.autoClear=!1,e.container.appendChild(e.renderer.domElement),e.controls=new U(e.camera,e.renderer.domElement),e.controls.enableDamping=!0,e.controls.dampingFactor=.1,e.addThings(),e.addLight(),e.animate(),e.initStats(),e.initEventListen(),e.initGui()}),o()(this,"destroy",function(){e.toggleGui(0),Object.values(e.Geometrys).forEach(function(t){t.dispose()}),Object.values(e.Materials).forEach(function(t){t.dispose()}),e.scene.clear(),e.renderer.dispose(),e.renderer.forceContextLoss(),e.camera=null,e.camera2=null,e.scene=null,e.renderer=null,e.GuiInit=null,e.stats=null,e.tween&&(e.tween.stop(),e.tween=null),e.birdGroup=null,e.ballsGroup=null,cancelAnimationFrame(e.animateFrame)}),o()(this,"initEventListen",function(){e.container.addEventListener("pointermove",e.onPointerMove),document.addEventListener("keydown",e.onKeyDown),document.addEventListener("keyup",e.onKeyUp)}),o()(this,"onPointerMove",function(t){if(t.isPrimary!==!1){e.mouseData.mouseX=t.clientX-e.container.offsetLeft,e.mouseData.mouseY=t.clientY-e.container.offsetTop;var n=window.pageYOffset||document.documentElement.scrollTop;e.pointer.x=e.mouseData.mouseX/e.container.clientWidth*2-1,e.pointer.y=-((e.mouseData.mouseY+n)/e.container.clientHeight)*2+1}}),o()(this,"onKeyDown",function(t){if(t.keyCode===38)return e.moveState.up=1,t.preventDefault&&t.preventDefault(),t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),!1;if(t.keyCode===40)return e.moveState.down=1,t.preventDefault&&t.preventDefault(),t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),!1;t.keyCode===37?e.moveState.left=1:t.keyCode===39?e.moveState.right=1:t.code=="KeyQ"?e.moveState.rollLeft=1:t.code=="KeyE"&&(e.moveState.rollRight=1)}),o()(this,"onKeyUp",function(t){t.keyCode===38?e.moveState.up=0:t.keyCode===40?e.moveState.down=0:t.keyCode===37?e.moveState.left=0:t.keyCode===39?e.moveState.right=0:t.code=="KeyQ"?e.moveState.rollLeft=0:t.code=="KeyE"&&(e.moveState.rollRight=0)}),o()(this,"initStats",function(){e.stats=new N,e.stats.showPanel(0),e.stats.dom.style.position="absolute",e.container.appendChild(e.stats.dom)}),o()(this,"initGui",function(){if(e.GuiInit){e.toggleGui();return}e.GuiInit=new B.GUI({}),e.GuiInit.domElement.style.position="absolute",e.GuiInit.domElement.style.right="10px",e.GuiInit.domElement.style.top="10px";var t=e.GuiInit.addFolder("\u63A7\u5236\u7A97\u53E3");t.addColor(e.guiData,"color").name("\u80CC\u666F\u989C\u8272"),t.open();var n=e.GuiInit.addFolder("\u5C0F\u9E1F");n.add(e.birdAnimate,"speed",10,25,.1).name("\u901F\u5EA6"),n.add(e.guiData,"selfControl").name("\u952E\u76D8\u63A7\u5236"),n.add(e.guiData,"showHelpBall").name("\u8F85\u52A9\u7403"),n.open()}),o()(this,"toggleGui",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!(!e.GuiInit||!e.GuiInit.domElement)){var n=e.GuiInit.domElement.style.display=="none"?"":"none";t==0&&(n="none"),e.GuiInit.domElement.style.display=n}}),o()(this,"addLight",function(){var t=new l.AmbientLight(6842472);e.scene.add(t);var n=new l.DirectionalLight(16777215);n.position.set(550,100,550),n.intensity=.6,e.scene.add(n)}),o()(this,"addThings",function(){e.birdGroup=new l.Group,e.scene.add(e.birdGroup),e.ballsGroup=new l.Group,e.scene.add(e.ballsGroup),e.addBird(),e.addball(),e.initTween()}),o()(this,"addball",function(){var t=new l.SphereGeometry(1,26,15),n=new l.MeshBasicMaterial({color:16646143});e.Meshs.sphereMesh=new l.Mesh(t,n),e.ballsGroup.add(e.Meshs.sphereMesh);var s=new l.MeshBasicMaterial({color:16715424}),c=new l.Mesh(t,s);e.ballsGroup.add(c),e.Meshs.sphereRandom=new l.Mesh(t,s),e.ballsGroup.add(e.Meshs.sphereRandom)}),o()(this,"addBird",function(){new F().load("../models/Parrot.glb",function(t){e.mixer=new l.AnimationMixer(t.scene),t.animations.forEach(function(n){e.mixer.clipAction(n).play()}),e.Meshs.bird=t.scene.children[0],e.Meshs.bird.scale.set(.2,.2,.2),e.birdGroup.add(t.scene),console.log("bird",e.Meshs.bird)})}),o()(this,"initTween",function(){}),o()(this,"calcMove",function(t){var n=e.birdAnimate,s=n.speed,c=n.direction,p=new l.Vector3;p.copy(c),p.normalize(),p.multiplyScalar(t*s),e.birdGroup&&e.birdGroup.position.add(p)}),o()(this,"calcRotation",function(t){var n,s=e.birdAnimate.direction,c=new l.Vector3(0,0,0);if(c.y=e.moveState.left-e.moveState.right,c.x=e.moveState.down-e.moveState.up,c.z=-e.moveState.rollLeft+e.moveState.rollRight,e.rotateQuaternion.set(c.x*e.rotateSpeed.x*.01,c.y*e.rotateSpeed.y*.01,c.z*e.rotateSpeed.z*.01,1).normalize(),(n=e.Meshs.bird)===null||n===void 0||n.quaternion.multiply(e.rotateQuaternion),e.Meshs.bird){var p=new l.Vector3(0,0,-1);p.applyMatrix4(e.Meshs.bird.matrix),e.birdAnimate.direction=p.multiplyScalar(-1).normalize()}}),o()(this,"randomDurationMax",3),o()(this,"randomDuration",0),o()(this,"randomTarget",function(t){if(e.targetPosition.clone().sub(e.birdGroup.position).length()<5&&(e.randomDuration=e.randomDurationMax),e.randomDuration<e.randomDurationMax)e.randomDuration+=t;else{var n;e.randomDuration=0;var s=Math.random()*100-50,c=Math.random()*100-50,p=Math.random()*100-50;e.targetPosition.set(s,c,p),(n=e.Meshs.sphereRandom)===null||n===void 0||n.position.copy(e.targetPosition)}}),o()(this,"_m1",new l.Matrix4),o()(this,"FlyToTarget",function(t){if(e.Meshs.bird){var n,s=e.targetPosition.clone().sub(e.birdGroup.position).normalize(),c=e.birdAnimate.direction.clone().lerp(s,.1).add(e.birdGroup.position.clone());e.birdAnimate.direction=e.birdAnimate.direction.lerp(s,.02),e.caculateUp(),e._m1.lookAt(c,e.birdGroup.position,e.birdUp),e.rotateQuaternion.setFromRotationMatrix(e._m1),(n=e.Meshs.bird)===null||n===void 0||n.quaternion.copy(e.rotateQuaternion)}}),o()(this,"prevDirection",new l.Vector3),o()(this,"caculateUp",function(){var t=e.birdAnimate.direction,n=new l.Vector3(0,1,0),s=t.angleTo(e.prevDirection),c=t.clone().add(e.prevDirection).multiplyScalar(-1).normalize(),p=n.clone().addScaledVector(c,s*100).normalize();e.birdUp.copy(p),e.prevDirection.copy(t)}),o()(this,"animate",function(){e.stats&&e.stats.begin(),e.render(),H.update(),e.controls.update(),e.stats&&e.stats.end(),e.animateFrame=requestAnimationFrame(e.animate)}),o()(this,"render",function(){var t=e.clock.getDelta();if(e.mixer&&e.mixer.update(t),e.calcMove(t),e.guiData.selfControl?e.calcRotation(t):(e.randomTarget(t),e.FlyToTarget(t)),e.Meshs.bird){var n,s=new l.Vector3(0,0,-1);s.applyMatrix4(e.Meshs.bird.matrix),(n=e.Meshs.sphereMesh)===null||n===void 0||n.position.copy(s.multiplyScalar(-5))}e.ballsGroup.visible=e.guiData.showHelpBall,e.renderer.clear(),e.renderer.setClearColor(e.guiData.color,1);var c=e.container.clientWidth,p=e.container.clientHeight;e.renderer.setViewport(0,0,c,p),e.renderer.render(e.scene,e.camera)})}),k=new Y,Z=k,T=a(85893),j=G.Z.Title,A=G.Z.Paragraph,W=G.Z.Text,K=function(z){w()(t,z);var e=b()(t);function t(){var n;y()(this,t);for(var s=arguments.length,c=new Array(s),p=0;p<s;p++)c[p]=arguments[p];return n=e.call.apply(e,[this].concat(c)),o()(M()(n),"state",{}),n}return V()(t,[{key:"didShow",value:function(){var n=u()(x()().mark(function c(){return x()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:case"end":return P.stop()}},c)}));function s(){return n.apply(this,arguments)}return s}()},{key:"didMount",value:function(){var n=u()(x()().mark(function c(){return x()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:Z.init("WebGL-bird-cage");case 1:case"end":return P.stop()}},c)}));function s(){return n.apply(this,arguments)}return s}()},{key:"willUnmount",value:function(){Z.destroy()}},{key:"render",value:function(){return d()(this.state),(0,T.jsxs)(R.Z,{title:"",children:[(0,T.jsx)(O.Z,{}),(0,T.jsxs)(G.Z,{children:[(0,T.jsx)(j,{level:3}),(0,T.jsx)(A,{children:(0,T.jsx)(W,{})}),(0,T.jsx)(A,{})]}),(0,T.jsx)("div",{id:"WebGL-bird-cage",style:{width:"600px",height:"600px",position:"relative"}})]})}}]),t}(I.Z)},20640:function(h,r,a){"use strict";var f=a(11742),d={"text/plain":"Text","text/html":"Url",default:"Text"},C="Copy to clipboard: #{key}, Enter";function x(u){var m=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return u.replace(/#{\s*key\s*}/g,m)}function g(u,m){var y,E,V,L,M,v,w=!1;m||(m={}),y=m.debug||!1;try{V=f(),L=document.createRange(),M=document.getSelection(),v=document.createElement("span"),v.textContent=u,v.ariaHidden="true",v.style.all="unset",v.style.position="fixed",v.style.top=0,v.style.clip="rect(0, 0, 0, 0)",v.style.whiteSpace="pre",v.style.webkitUserSelect="text",v.style.MozUserSelect="text",v.style.msUserSelect="text",v.style.userSelect="text",v.addEventListener("copy",function(b){if(b.stopPropagation(),m.format)if(b.preventDefault(),typeof b.clipboardData=="undefined"){y&&console.warn("unable to use e.clipboardData"),y&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var S=d[m.format]||d.default;window.clipboardData.setData(S,u)}else b.clipboardData.clearData(),b.clipboardData.setData(m.format,u);m.onCopy&&(b.preventDefault(),m.onCopy(b.clipboardData))}),document.body.appendChild(v),L.selectNodeContents(v),M.addRange(L);var i=document.execCommand("copy");if(!i)throw new Error("copy command was unsuccessful");w=!0}catch(b){y&&console.error("unable to copy using execCommand: ",b),y&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(m.format||"text",u),m.onCopy&&m.onCopy(window.clipboardData),w=!0}catch(S){y&&console.error("unable to copy using clipboardData: ",S),y&&console.error("falling back to prompt"),E=x("message"in m?m.message:C),window.prompt(E,u)}}finally{M&&(typeof M.removeRange=="function"?M.removeRange(L):M.removeAllRanges()),v&&document.body.removeChild(v),V()}return w}h.exports=g},62906:function(h,r){"use strict";r.Z={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"}},18758:function(h,r){"use strict";var a={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};r.Z=a},43763:function(h,r,a){"use strict";a.d(r,{Z:function(){return v}});var f=a(87462),d=a(71002),C=a(1413),x=a(91),g=a(67294),u=a(11276),m=a(43159),y=a(93967),E=a.n(y);function V(w){var i=w.showArrow,b=w.arrowContent,S=w.children,o=w.prefixCls,I=w.id,G=w.overlayInnerStyle,R=w.className,O=w.style;return g.createElement("div",{className:E()("".concat(o,"-content"),R),style:O},i!==!1&&g.createElement("div",{className:"".concat(o,"-arrow"),key:"arrow"},b),g.createElement("div",{className:"".concat(o,"-inner"),id:I,role:"tooltip",style:G},typeof S=="function"?S():S))}var L=function(i,b){var S=i.overlayClassName,o=i.trigger,I=o===void 0?["hover"]:o,G=i.mouseEnterDelay,R=G===void 0?0:G,O=i.mouseLeaveDelay,D=O===void 0?.1:O,l=i.overlayStyle,H=i.prefixCls,U=H===void 0?"rc-tooltip":H,B=i.children,N=i.onVisibleChange,X=i.afterVisibleChange,J=i.transitionName,F=i.animation,$=i.motion,Y=i.placement,k=Y===void 0?"right":Y,Z=i.align,T=Z===void 0?{}:Z,j=i.destroyTooltipOnHide,A=j===void 0?!1:j,W=i.defaultVisible,K=i.getTooltipContainer,z=i.overlayInnerStyle,e=i.arrowContent,t=i.overlay,n=i.id,s=i.showArrow,c=(0,x.Z)(i,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),p=(0,g.useRef)(null);(0,g.useImperativeHandle)(b,function(){return p.current});var P=(0,C.Z)({},c);"visible"in i&&(P.popupVisible=i.visible);var ee=function(){return g.createElement(V,{showArrow:s,arrowContent:e,key:"content",prefixCls:U,id:n,overlayInnerStyle:z},t)},Q=!1,q=!1;if(typeof A=="boolean")Q=A;else if(A&&(0,d.Z)(A)==="object"){var _=A.keepParent;Q=_===!0,q=_===!1}return g.createElement(u.Z,(0,f.Z)({popupClassName:S,prefixCls:U,popup:ee,action:I,builtinPlacements:m.C,popupPlacement:k,ref:p,popupAlign:T,getPopupContainer:K,onPopupVisibleChange:N,afterPopupVisibleChange:X,popupTransitionName:J,popupAnimation:F,popupMotion:$,defaultPopupVisible:W,destroyPopupOnHide:Q,autoDestroy:q,mouseLeaveDelay:D,popupStyle:l,mouseEnterDelay:R},P),B)},M=(0,g.forwardRef)(L),v=M},43159:function(h,r,a){"use strict";a.d(r,{C:function(){return C}});var f={adjustX:1,adjustY:1},d=[0,0],C={left:{points:["cr","cl"],overflow:f,offset:[-4,0],targetOffset:d},right:{points:["cl","cr"],overflow:f,offset:[4,0],targetOffset:d},top:{points:["bc","tc"],overflow:f,offset:[0,-4],targetOffset:d},bottom:{points:["tc","bc"],overflow:f,offset:[0,4],targetOffset:d},topLeft:{points:["bl","tl"],overflow:f,offset:[0,-4],targetOffset:d},leftTop:{points:["tr","tl"],overflow:f,offset:[-4,0],targetOffset:d},topRight:{points:["br","tr"],overflow:f,offset:[0,-4],targetOffset:d},rightTop:{points:["tl","tr"],overflow:f,offset:[4,0],targetOffset:d},bottomRight:{points:["tr","br"],overflow:f,offset:[0,4],targetOffset:d},rightBottom:{points:["bl","br"],overflow:f,offset:[4,0],targetOffset:d},bottomLeft:{points:["tl","bl"],overflow:f,offset:[0,4],targetOffset:d},leftBottom:{points:["br","bl"],overflow:f,offset:[-4,0],targetOffset:d}},x=null},79370:function(h,r,a){"use strict";a.d(r,{G:function(){return x}});var f=a(98924),d=function(u){if((0,f.Z)()&&window.document.documentElement){var m=Array.isArray(u)?u:[u],y=window.document.documentElement;return m.some(function(E){return E in y.style})}return!1},C=function(u,m){if(!d(u))return!1;var y=document.createElement("div"),E=y.style[u];return y.style[u]=m,y.style[u]!==E};function x(g,u){return!Array.isArray(g)&&u!==void 0?C(g,u):d(g)}},11742:function(h){h.exports=function(){var r=document.getSelection();if(!r.rangeCount)return function(){};for(var a=document.activeElement,f=[],d=0;d<r.rangeCount;d++)f.push(r.getRangeAt(d));switch(a.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":a.blur();break;default:a=null;break}return r.removeAllRanges(),function(){r.type==="Caret"&&r.removeAllRanges(),r.rangeCount||f.forEach(function(C){r.addRange(C)}),a&&a.focus()}}},49677:function(h){function r(a){if(a==null)throw new TypeError("Cannot destructure "+a)}h.exports=r,h.exports.__esModule=!0,h.exports.default=h.exports}}]);