github.com/minio/console@v1.4.1/web-app/build/static/js/6758.cf46c98c.chunk.js (about)

     1  (self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[6758],{72271:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});n(65043);var r=n(89923),o=n(70579);const s=e=>{let{iconComponent:t,entity:n}=e;return(0,o.jsx)(r.xA9,{container:!0,children:(0,o.jsx)(r.xA9,{item:!0,xs:12,children:(0,o.jsx)(r.lVp,{title:"".concat(n," not available"),iconComponent:t,help:(0,o.jsxs)(r.azJ,{sx:{fontSize:"14px",["@media (max-width: ".concat(r.nmC.sm,"px)")]:{display:"flex",flexFlow:"column"}},children:[(0,o.jsx)("span",{children:"This feature is not available for a single-disk setup.\xa0"}),(0,o.jsxs)("span",{children:["Please deploy a server in"," ",(0,o.jsx)("a",{href:"https://min.io/docs/minio/linux/operations/install-deploy-manage/deploy-minio-multi-node-multi-drive.html?ref=con",target:"_blank",rel:"noopener",children:"Distributed Mode"})," ","to use this feature."]})]})})})})}},41206:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(65043),o=n(89923),s=n(61476),i=n.n(s),l=n(6681),a=n(70579);const c=e=>{let{value:t,label:n="",tooltip:s="",mode:c="json",onChange:d,editorHeight:u=250,helptip:p}=e;return(0,a.jsx)(o.BYM,{value:t,onChange:e=>d(e),mode:c,tooltip:s,editorHeight:u,label:n,helpTools:(0,a.jsx)(r.Fragment,{children:(0,a.jsx)(l.A,{tooltip:"Copy to Clipboard",children:(0,a.jsx)(i(),{text:t,children:(0,a.jsx)(o.$nd,{type:"button",id:"copy-code-mirror",icon:(0,a.jsx)(o.TdU,{}),color:"primary",variant:"regular"})})})}),helpTip:p,helpTipPlacement:"right"})}},23758:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(65043),o=n(89923),s=n(94574),i=n(33097),l=n.n(i),a=n(70579);const c=s.Ay.button((e=>{let{theme:t}=e;return{border:"1px solid ".concat(l()(t,"borderColor","#E2E2E2")),borderRadius:3,color:l()(t,"secondaryText","#5B5C5C"),backgroundColor:l()(t,"boxBackground","#FBFAFA"),fontSize:12}})),d=e=>{let{id:t,unitSelected:n,unitsList:s,disabled:i=!1,onUnitChange:l}=e;const[d,u]=r.useState(null),p=Boolean(d),x=e=>{u(null),""!==e&&l&&l(e)};return(0,a.jsxs)(r.Fragment,{children:[(0,a.jsx)(c,{id:"".concat(t,"-button"),"aria-controls":"".concat(t,"-menu"),"aria-haspopup":"true","aria-expanded":p?"true":void 0,onClick:e=>{u(e.currentTarget)},disabled:i,type:"button",children:n}),(0,a.jsx)(o.Vey,{id:"upload-main-menu",options:s,selectedOption:"",onSelect:e=>x(e),hideTriggerAction:()=>{x("")},open:p,anchorEl:d,anchorOrigin:"end"})]})}},66758:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>F});var r=n(65043),o=n(22166),s=n(73216),i=n(89923),l=n(24241),a=n(33097),c=n.n(a),d=n(56483),u=n(50108),p=n(877),x=n(87734),h=n(13839);var f=n(41206),m=n(94574),g=n(70579);const j=m.Ay.table((e=>{let{theme:t}=e;return{"& .objectGeneralTitle":{lineHeight:1,fontSize:50,color:c()(t,"mutedText","#87888d")},"& .generalUnit":{color:c()(t,"fontColor","#000"),fontSize:12,fontWeight:"bold"},"& .testUnitRes":{fontSize:60,color:c()(t,"signalColors.main","#07193E"),fontWeight:"bold",textAlign:"right"},"& .metricValContainer":{lineHeight:1,verticalAlign:"bottom"},"& .objectsUnitRes":{fontSize:22,marginTop:6,color:c()(t,"mutedText","#87888d"),fontWeight:"bold",textAlign:"right"},"& .objectsUnit":{color:c()(t,"mutedText","#87888d"),fontSize:16,fontWeight:"bold"},"& .iconTd":{verticalAlign:"bottom"}}})),b=e=>{let{title:t,icon:n,throughput:r,objects:o}=e;const s=(0,d.GT)(r);let i="0",l="";return 0!==s.total&&(i=s.total.toString(),l="".concat(s.unit,"/s")),(0,g.jsxs)(j,{children:[(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{className:"objectGeneralTitle",children:t}),(0,g.jsx)("td",{className:"iconTd",children:n})]}),(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{className:"metricValContainer testUnitRes",children:i}),(0,g.jsx)("td",{className:"metricValContainer generalUnit",children:l})]}),(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{className:"metricValContainer objectsUnitRes",children:o}),(0,g.jsx)("td",{className:"metricValContainer objectsUnit",children:0!==o&&"Objs/S"})]})]})},y=m.Ay.div((e=>{let{theme:t}=e;return{"& .actionButtons":{textAlign:"right"},"& .descriptorLabel":{fontWeight:"bold",fontSize:14},"& .resultsContainer":{backgroundColor:c()(t,"boxBackground","#FBFAFA"),borderTop:"".concat(c()(t,"borderColor","#E2E2E2")," 1px solid"),marginTop:30,padding:25},"& .resultsIcon":{display:"flex",alignItems:"center","& svg":{fill:c()(t,"screenTitle.iconColor","#07193E")}},"& .detailedItem":{display:"flex",alignItems:"center",justifyContent:"flex-start"},"& .detailedVersion":{display:"flex",alignItems:"center",justifyContent:"flex-end"},"& .serversTable":{width:"100%",marginTop:15,"& thead > tr > th":{textAlign:"left",padding:15,fontSize:14,fontWeight:"bold"},"& tbody > tr":{"&:last-of-type":{"& > td":{borderBottom:"".concat(c()(t,"borderColor","#E2E2E2")," 1px solid")}},"& > td":{borderTop:"".concat(c()(t,"borderColor","#E2E2E2")," 1px solid"),padding:15,fontSize:14,"&:first-of-type":{borderLeft:"".concat(c()(t,"borderColor","#E2E2E2")," 1px solid")},"&:last-of-type":{borderRight:"".concat(c()(t,"borderColor","#E2E2E2")," 1px solid")}}}},"& .serverIcon":{width:55},"& .serverValue":{width:140},"& .serverHost":{maxWidth:540,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"& .tableOverflow":{overflowX:"auto",paddingBottom:15},"& .objectGeneral":{marginTop:15},"& .download":{"& .min-icon":{width:35,height:35,color:c()(t,"signalColors.good","#4CCB92")}},"& .upload":{"& .min-icon":{width:35,height:35,color:c()(t,"signalColors.info","#2781B0")}},"& .versionIcon":{color:c()(t,"screenTitle.iconColor","#07193E"),marginRight:20}}})),v=e=>{let{results:t,start:n}=e;const[o,s]=(0,r.useState)(!1),l=t[t.length-1]||[],a=c()(l,"GETStats.servers",[])||[],m=c()(l,"PUTStats.servers",[])||[],j=c()(l,"GETStats.throughputPerSec",0),v=c()(l,"GETStats.objectsPerSec",0),C=c()(l,"PUTStats.throughputPerSec",0),w=c()(l,"PUTStats.objectsPerSec",0);let S=[];a.forEach((e=>{const t=e.endpoint,n=m.find((e=>e.endpoint===t));let r={getUnit:"-",getValue:"N/A",host:e.endpoint,putUnit:"-",putValue:"N/A"};if(e.err&&""!==e.err)r.getError=e.err,r.getUnit="-",r.getValue="N/A";else{const t=(0,d.GT)(e.throughputPerSec.toString());r.getUnit=t.unit,r.getValue=t.total.toString()}if(n)if(n.err&&""!==n.err)r.putError=n.err,r.putUnit="-",r.putValue="N/A";else{const e=(0,d.GT)(n.throughputPerSec.toString());r.putUnit=e.unit,r.putValue=e.total.toString()}S.push(r)}));const A=l?JSON.stringify(l,null,4):"",O=(e=>[{get:0,put:0},...e.filter((e=>"0"!==e.version&&0!==e.disks)).map((e=>{var t,n;return{get:(null===(t=e.GETStats)||void 0===t?void 0:t.throughputPerSec)||0,put:(null===(n=e.PUTStats)||void 0===n?void 0:n.throughputPerSec)||0}}))])(t);return(0,g.jsxs)(y,{children:[(0,g.jsxs)(i.xA9,{container:!0,className:"objectGeneral",children:[(0,g.jsx)(i.xA9,{item:!0,xs:12,md:6,lg:6,children:(0,g.jsxs)(i.xA9,{container:!0,className:"objectGeneral",children:[(0,g.jsx)(i.xA9,{item:!0,xs:12,md:6,lg:6,children:(0,g.jsx)(b,{icon:(0,g.jsx)("div",{className:"download",children:(0,g.jsx)(i.CB9,{})}),title:"GET",throughput:"".concat(j),objects:v})}),(0,g.jsx)(i.xA9,{item:!0,xs:12,md:6,lg:6,children:(0,g.jsx)(b,{icon:(0,g.jsx)("div",{className:"upload",children:(0,g.jsx)(i.VJE,{})}),title:"PUT",throughput:"".concat(C),objects:w})})]})}),(0,g.jsx)(i.xA9,{item:!0,xs:12,md:6,lg:6,children:(0,g.jsx)(u.u,{width:"99%",children:(0,g.jsxs)(p.Q,{data:O,children:[(0,g.jsxs)("defs",{children:[(0,g.jsxs)("linearGradient",{id:"colorPut",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,g.jsx)("stop",{offset:"0%",stopColor:"#2781B0",stopOpacity:.9}),(0,g.jsx)("stop",{offset:"95%",stopColor:"#fff",stopOpacity:0})]}),(0,g.jsxs)("linearGradient",{id:"colorGet",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,g.jsx)("stop",{offset:"0%",stopColor:"#4CCB92",stopOpacity:.9}),(0,g.jsx)("stop",{offset:"95%",stopColor:"#fff",stopOpacity:0})]})]}),(0,g.jsx)(x.d,{strokeDasharray:"0 0",strokeWidth:1,strokeOpacity:.5,stroke:"#F1F1F1",vertical:!1}),(0,g.jsx)(h.G,{type:"monotone",dataKey:"get",stroke:"#4CCB92",fill:"url(#colorGet)",fillOpacity:.3,strokeWidth:2,dot:!1}),(0,g.jsx)(h.G,{type:"monotone",dataKey:"put",stroke:"#2781B0",fill:"url(#colorPut)",fillOpacity:.3,strokeWidth:2,dot:!1})]})})})]}),(0,g.jsx)("br",{}),O.length>1&&(0,g.jsxs)(r.Fragment,{children:[(0,g.jsxs)(i.xA9,{container:!0,children:[(0,g.jsx)(i.xA9,{item:!0,xs:12,md:6,className:"descriptorLabel",children:n?(0,g.jsx)(r.Fragment,{children:"Preliminar Results:"}):(0,g.jsx)(r.Fragment,{children:o?"JSON Results:":"Detailed Results:"})}),(0,g.jsx)(i.xA9,{item:!0,xs:12,md:6,sx:{display:"flex",justifyContent:"right",gap:8},children:!n&&(0,g.jsxs)(r.Fragment,{children:[(0,g.jsx)(i.$nd,{id:"download-results","aria-label":"Download Results",onClick:()=>{const e=new Date;let t=document.createElement("a");t.setAttribute("href","data:text/plain;charset=utf-8,"+JSON.stringify(l)),t.setAttribute("download","speedtest_results-".concat(e.toISOString(),".log")),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)},icon:(0,g.jsx)(i.s3U,{})}),"\xa0",(0,g.jsx)(i.$nd,{id:"toggle-json","aria-label":"Toogle JSON",onClick:()=>{s(!o)},icon:(0,g.jsx)(i.iv,{})})]})})]}),(0,g.jsx)(i.azJ,{withBorders:!0,useBackground:!0,sx:{marginTop:15},children:(0,g.jsx)(i.xA9,{container:!0,children:o?(0,g.jsx)(r.Fragment,{children:(0,g.jsx)(f.A,{value:A,onChange:()=>{}})}):(0,g.jsxs)(r.Fragment,{children:[(0,g.jsx)(i.xA9,{item:!0,xs:12,sm:12,md:1,lg:1,className:"resultsIcon",children:(0,g.jsx)(i.RJ2,{width:45})}),(0,g.jsxs)(i.xA9,{item:!0,xs:12,sm:6,md:3,lg:2,className:"detailedItem",children:["Nodes:\xa0",(0,g.jsx)("strong",{children:l.servers})]}),(0,g.jsxs)(i.xA9,{item:!0,xs:12,sm:6,md:3,lg:2,className:"detailedItem",children:["Drives:\xa0",(0,g.jsx)("strong",{children:l.disks})]}),(0,g.jsxs)(i.xA9,{item:!0,xs:12,sm:6,md:3,lg:2,className:"detailedItem",children:["Concurrent:\xa0",(0,g.jsx)("strong",{children:l.concurrent})]}),(0,g.jsxs)(i.xA9,{item:!0,xs:12,sm:12,md:12,lg:5,className:"detailedVersion",children:[(0,g.jsx)("span",{className:"versionIcon",children:(0,g.jsx)(i.mzI,{})})," ","MinIO VERSION\xa0",(0,g.jsx)("strong",{children:l.version})]}),(0,g.jsx)(i.xA9,{item:!0,xs:12,className:"tableOverflow",children:(0,g.jsxs)("table",{className:"serversTable",cellSpacing:0,cellPadding:0,children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("th",{colSpan:2,children:"Servers"}),(0,g.jsx)("th",{children:"GET"}),(0,g.jsx)("th",{children:"PUT"})]})}),(0,g.jsx)("tbody",{children:S.map(((e,t)=>(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{className:"serverIcon",children:(0,g.jsx)(i.NBP,{})}),(0,g.jsx)("td",{className:"serverHost",children:e.host}),e.getError&&""!==e.getError?(0,g.jsx)("td",{children:e.getError}):(0,g.jsx)(r.Fragment,{children:(0,g.jsxs)("td",{className:"serverValue",children:[(0,d.Af)(parseFloat(e.getValue)),"\xa0",e.getUnit,"/s."]})}),e.putError&&""!==e.putError?(0,g.jsx)("td",{children:e.putError}):(0,g.jsx)(r.Fragment,{children:(0,g.jsxs)("td",{className:"serverValue",children:[(0,d.Af)(parseFloat(e.putValue)),"\xa0",e.putUnit,"/s."]})})]},"storage-".concat(t.toString()))))})]})})]})})})]})]})};var C=n(18575),w=n(23758),S=n(72271),A=n(28481),O=n(48793),E=n(55968),T=n(77938),P=n(64159),k=n(14558),N=n(20554),R=n(32511),U=n(99161);const F=()=>{const e=(0,o.d4)(P.Rq),t=(0,s.Zp)(),[n,a]=(0,r.useState)(!1),[c,d]=(0,r.useState)(null),[u,p]=(0,r.useState)("64"),[x,h]=(0,r.useState)("MB"),[f,m]=(0,r.useState)("10"),[j,b]=(0,r.useState)(0),[y,F]=(0,r.useState)(0),[I,z]=(0,r.useState)(0),[B,D]=(0,r.useState)(0),V=(0,k.vf)();(0,r.useEffect)((()=>{if(n){const e=new URL(window.location.toString()),t=!1?"9090":e.port,n=new URL(document.baseURI).pathname,r=(0,R.nw)(e.protocol),o=new WebSocket("".concat(r,"://").concat(e.hostname,":").concat(t).concat(n,"ws/speedtest?&size=").concat(u).concat(x,"&duration=").concat(f,"s")),s=l.c9.now(),i=s.toUnixInteger()/1e3,c=s.plus({seconds:2*parseInt("10")}).toUnixInteger()/1e3,p=(c-i)/1e3;b(c),F(i),z(p);let h=null;if(null!==o)return o.onopen=()=>{console.log("WebSocket Client Connected"),o.send("ok"),h=setInterval((()=>{o.send("ok")}),1e4)},o.onmessage=e=>{const t=JSON.parse(e.data.toString());d((e=>{let n=[];e&&(n=[...e]);const r=0!==t.servers?[t]:[];return[...n,...r]}));const n=l.c9.now().toUnixInteger()/1e3;F(n)},o.onclose=()=>{clearInterval(h),console.log("connection closed by server"),a(!1)},()=>{o.close(1e3),clearInterval(h),console.log("closing websockets")}}else a(!1)}),[u,x,n,f]),(0,r.useEffect)((()=>{let e=100-100*((j-y)/1e3)/I;e>100&&(e=100),D(e)}),[n,y,j,I]);const G=n?"Start":null!==c?"Retest":"Start",J=(0,N.jL)();return(0,r.useEffect)((()=>{J((0,P.ph)("performance"))}),[]),(0,g.jsxs)(r.Fragment,{children:[(0,g.jsx)(O.A,{label:"Performance",actions:(0,g.jsx)(E.A,{})}),(0,g.jsxs)(i.Mxu,{children:[!V&&(0,g.jsx)(A.A,{compactMode:!0}),e?(0,g.jsxs)(T.R,{scopes:[U.OV.ADMIN_HEAL],resource:U.Ms,children:[(0,g.jsxs)(i.azJ,{withBorders:!0,children:[(0,g.jsxs)(i.xA9,{container:!0,children:[(0,g.jsxs)(i.xA9,{item:!0,md:3,sm:12,children:[(0,g.jsx)(i.azJ,{sx:{fontSize:13,marginBottom:8},children:n?(0,g.jsxs)(r.Fragment,{children:["Speedtest in progress...",(0,g.jsx)(i.aHM,{style:{width:15,height:15}})]}):(0,g.jsx)(r.Fragment,{children:c&&!n?(0,g.jsx)("b",{children:"Speed Test results:"}):(0,g.jsx)("b",{children:"Performance test"})})}),(0,g.jsx)(i.azJ,{children:(0,g.jsx)(C.A,{value:B,ready:null!==c&&!n,indeterminate:n,size:"small"})})]}),(0,g.jsx)(i.xA9,{item:!0,md:4,sm:12,children:(0,g.jsx)("div",{style:{marginLeft:10,width:300},children:(0,g.jsx)(i.cl_,{id:"size",name:"size",label:"Object Size",onChange:e=>{p(e.target.value)},noLabelMinWidth:!0,value:u,disabled:n||!V,overlayObject:(0,g.jsx)(w.A,{id:"size-unit",onUnitChange:h,unitSelected:x,unitsList:[{label:"KiB",value:"KiB"},{label:"MiB",value:"MiB"},{label:"GiB",value:"GiB"}],disabled:n||!V})})})}),(0,g.jsx)(i.xA9,{item:!0,md:4,sm:12,children:(0,g.jsx)("div",{style:{marginLeft:10,width:300},children:(0,g.jsx)(i.cl_,{id:"duration",name:"duration",label:"Duration",onChange:e=>{e.target.validity.valid&&m(e.target.value)},noLabelMinWidth:!0,value:f,disabled:n||!V,overlayObject:(0,g.jsx)(w.A,{id:"size-unit",onUnitChange:()=>{},unitSelected:"s",unitsList:[{label:"s",value:"s"}],disabled:n||!V}),pattern:"[0-9]*"})})}),(0,g.jsx)(i.xA9,{item:!0,md:1,sm:12,sx:{textAlign:"center"},children:(0,g.jsx)(i.$nd,{onClick:()=>{V?(d(null),a(!0)):t("/support/register")},color:"primary",type:"button",id:"start-speed-test",variant:V&&null!==c&&!n?"callAction":"regular",disabled:""===f.trim()||""===u.trim()||n||!V,label:G})})]}),(0,g.jsx)(i.xA9,{container:!0,children:(0,g.jsx)(i.xA9,{item:!0,xs:12,children:(0,g.jsx)(r.Fragment,{children:(0,g.jsx)(i.xA9,{item:!0,xs:12,children:null!==c&&(0,g.jsx)(r.Fragment,{children:(0,g.jsx)(v,{results:c,start:n})})})})})})]}),!n&&!c&&V&&(0,g.jsxs)(r.Fragment,{children:[(0,g.jsx)("br",{}),(0,g.jsx)(i.lVp,{title:"During the speed test all your production traffic will be temporarily suspended.",iconComponent:(0,g.jsx)(i.cJw,{}),help:(0,g.jsx)(r.Fragment,{})})]})]}):(0,g.jsx)(S.A,{iconComponent:(0,g.jsx)(i.vhL,{}),entity:"Speedtest"})]})]})}},28481:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(65043),o=n(73216),s=n(89923),i=n(70579);const l=e=>{let{compactMode:t=!1}=e;const n=(0,o.Zp)(),l=(0,i.jsx)(s.$nd,{id:"go-to-register",type:"submit",variant:"callAction",color:"primary",onClick:()=>n("/support/register"),children:"Register your Cluster"}),a="Please use your MinIO Subscription Network login credentials to register this cluster and enable this feature.";return t?(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(s.xA9,{sx:{"& div.leftItems":{marginBottom:0}},children:(0,i.jsx)(s.lVp,{title:(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexGrow:1},children:[(0,i.jsx)("span",{children:a})," ",l]}),iconComponent:(0,i.jsx)(s.cJw,{}),help:null})}),(0,i.jsx)("br",{})]}):(0,i.jsx)(s.azJ,{sx:{padding:"25px",border:"1px solid #eaeaea",display:"flex",alignItems:"center",justifyContent:"center",flexFlow:"row",marginBottom:"15px",["@media (max-width: ".concat(s.nmC.sm,"px)")]:{flexFlow:"column"}},children:(0,i.jsxs)(s.xA9,{container:!0,children:[(0,i.jsx)(s.xA9,{item:!0,xs:12,children:(0,i.jsx)(s.azJ,{sx:{marginRight:"8px",fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center","& .min-icon":{width:"83px",height:"14px",marginLeft:"5px",marginRight:"5px"}},children:"Register your cluster"})}),(0,i.jsx)(s.xA9,{item:!0,xs:12,children:(0,i.jsx)(s.azJ,{sx:{display:"flex",flexFlow:"row",["@media (max-width: ".concat(s.nmC.sm,"px)")]:{flexFlow:"column"}},children:(0,i.jsxs)(s.azJ,{sx:{display:"flex",flexFlow:"column",flex:"2"},children:[(0,i.jsx)(s.azJ,{sx:{fontSize:"16px",display:"flex",flexFlow:"column",marginTop:"15px",marginBottom:"15px"},children:a}),(0,i.jsx)(s.azJ,{sx:{flex:"1"},children:(0,i.jsx)(s.azJ,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end"},children:l})})]})})})]})})}},75270:(e,t,n)=>{"use strict";var r=n(40139),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,s,i,l,a,c,d=!1;t||(t={}),n=t.debug||!1;try{if(i=r(),l=document.createRange(),a=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var s=o[t.format]||o.default;window.clipboardData.setData(s,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),l.selectNodeContents(c),a.addRange(l),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");d=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),d=!0}catch(u){n&&console.error("unable to copy using clipboardData: ",u),n&&console.error("falling back to prompt"),s=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(s,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(l):a.removeAllRanges()),c&&document.body.removeChild(c),i()}return d}},24480:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var o=l(n(65043)),s=l(n(75270)),i=["text","onCopy","options","children"];function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function x(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=f(e);if(t){var s=f(this).constructor;n=Reflect.construct(o,arguments,s)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}(this,n)}}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(a,e);var t,n,r,l=x(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m(h(e=l.call.apply(l,[this].concat(n))),"onClick",(function(t){var n=e.props,r=n.text,i=n.onCopy,l=n.children,a=n.options,c=o.default.Children.only(l),d=(0,s.default)(r,a);i&&i(r,d),c&&c.props&&"function"===typeof c.props.onClick&&c.props.onClick(t)})),e}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=d(e,i),r=o.default.Children.only(t);return o.default.cloneElement(r,c(c({},n),{},{onClick:this.onClick}))}}])&&u(t.prototype,n),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.default.PureComponent);t.CopyToClipboard=g,m(g,"defaultProps",{onCopy:void 0,options:void 0})},61476:(e,t,n)=>{"use strict";var r=n(24480).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},40139:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}}}]);
     2  //# sourceMappingURL=6758.cf46c98c.chunk.js.map