1"use strict";(self.webpackChunksketchfab=self.webpackChunksketchfab||[]).push([[1087],{XuRc:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n("3Z9q"),a=n("g/7r");const i=(e,t,n,i=[])=>{const r=(0,o.useRef)(e()),s=e=>t((t=>{const o=n(t,e);return r.current=o,o})),l=(0,o.useRef)(s);(0,o.useEffect)((()=>{l.current=s}));const c=(0,o.useMemo)((()=>{let e=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const t={getState:()=>r.current,dispatch:(...t)=>e(...t)},n=i.map((e=>e(t)));return e=(0,a.qC)(...n)(((...e)=>l.current(...e))),e}),[]);return[e(),c]}},"8xE2":(e,t,n)=>{n.d(t,{Z:()=>l});var o=n("sQwH"),a=n("NQ1V"),i=n("3Z9q"),r=n("g/7r"),s=n("X40V");class l extends i.Component{constructor(...e){super(...e),(0,a.Z)(this,"onClickIfSpacebar",(e=>{var t=e.keyCode||e.which;0!==t&&32!==t||this.onClick(e)})),(0,a.Z)(this,"onClick",(e=>{e.preventDefault(),this.props.disabled||this.props.onChange(!this.props.isChecked,e)}))}render(){const{isChecked:e,isIndeterminate:t,name:n,isTouched:a,error:l,disabled:c=!1,label:d="",className:u="",children:p,title:m}=this.props;return(0,o.Z)(i.Fragment,{},void 0,(0,o.Z)("div",{onKeyDown:this.onClickIfSpacebar,onClick:this.onClick,className:`c-checkbox ${u} ${c?"--disabled":""} ${t?"--indeterminate":""} ${e?"--active":""}`,title:m},void 0,(0,o.Z)("input",{id:n,className:"c-checkbox__input",type:"checkbox",name:n,checked:e,onChange:r.EI,disabled:c}),(0,o.Z)("div",{"data-selenium":`checkbox-${n}`,className:"c-checkbox__actor"}),(0,o.Z)("label",{tabIndex:0,className:(0,s.AK)("c-checkbox__label",{"--disabled":c}),htmlFor:n},void 0,p||d)),a&&l?(0,o.Z)("label",{className:"form-error"},void 0,l):null)}}},"4jm9":(e,t,n)=>{n.d(t,{Z:()=>c});var o=n("D4hk"),a=n("3MRe"),i=n("3Z9q"),r=n("X40V"),s=n("VbvF");const l=["value","className"];function c(e){let{value:t,className:n}=e,c=(0,a.Z)(e,l);return i.createElement("textarea",(0,o.Z)({readOnly:!0,className:(0,r.AK)(s.Z.view,n),value:t},c))}},QhFo:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n("D4hk"),a=n("3MRe"),i=n("3Z9q"),r=n("vAnt"),s=n("mtQg");const l=["textToCopy"];function c(e){let{textToCopy:t}=e,n=(0,a.Z)(e,l);const[c,d]=i.useState(!1),u=(0,s.Z)(t,(()=>d(!0))),p=i.useRef();return i.useEffect((()=>(c&&(p.current=window.setTimeout((()=>{d(!1)}),3e3)),()=>clearTimeout(p.current))),[c]),i.createElement(r.Z,(0,o.Z)({onClick:u,type:c?"important":"primary",text:c?"Copied to clipboard":"Copy to clipboard",iconClassName:"fa-regular fa-copy",size:"medium"},n))}},rzLk:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n("D4hk"),a=n("sQwH"),i=n("3MRe"),r=n("3Z9q"),s=n("X40V");const l=["message","className","direction"],c=e=>{let{message:t,className:n,direction:c="up"}=e,d=(0,i.Z)(e,l);return r.createElement("a",(0,o.Z)({target:"_blank",rel:"noopener noreferrer",className:(0,s.AK)("help","fa-regular","fa-question-circle",n)},d),(0,a.Z)("span",{className:`tooltip tooltip-${c}`},void 0,t))}},KGKI:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n("D4hk"),a=n("sQwH"),i=n("3MRe"),r=n("3Z9q"),s=n("X40V");const l=["onChange","value","name","disabled","className","data-selenium","checked","children"],c=e=>{let{onChange:t,value:n,name:c="",disabled:d=!1,className:u,"data-selenium":p,checked:m=n,children:Z}=e,b=(0,i.Z)(e,l);return r.createElement("div",(0,o.Z)({onClick:e=>{d||(e.preventDefault(),t(!n))},className:(0,s.AK)(u,"form-onoff-wrapper",{"--checked":m}),"data-selenium":`switch-${p}`},b),(0,a.Z)("input",{className:"form-onoff",type:"checkbox","data-ref":"input",checked:m,onChange:e=>t(e.target.checked)}),(0,a.Z)("label",{className:(0,s.AK)({"form-onoff-actor":!0,disabled:d}),htmlFor:c}),(0,a.Z)("div",{className:(0,s.AK)("form-onoff__label",{"--disabled":d})},void 0,Z))}},AFjX:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n("sQwH"),a=n("D4hk"),i=n("3MRe"),r=n("3Z9q"),s=n("X40V");const l=["title","isDisabled","render"];function c({tabs:e,selectedTabIndex:t=0,onSelectTab:n,className:c="",headerProps:d}){return(0,o.Z)("section",{className:(0,s.AK)("c-tabs",c)},void 0,r.createElement("header",(0,a.Z)({className:"c-tabs__header",role:"tablist"},d),e.map(((e,o)=>{let{title:c,isDisabled:d,render:u}=e,p=(0,i.Z)(e,l);return r.createElement("div",(0,a.Z)({role:"tab",tabIndex:0,"aria-selected":o===t,key:o,className:(0,s.AK)("c-tabs__tab",{"--active":o===t}
1,{"--disabled":Boolean(d)}),onClick:()=>!d&&n(o)},p),c)}))),(0,o.Z)("main",{className:"c-tabs__main"},void 0,e[t].render()))}},zIQK:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n("D4hk"),a=n("sQwH"),i=n("3MRe"),r=n("3Z9q"),s=n("X40V");const l=["text","direction","children","className"],c=e=>{let{text:t,direction:n="down",children:c,className:d}=e,u=(0,i.Z)(e,l);return(0,a.Z)(r.Fragment,{},void 0,t?r.createElement("div",(0,o.Z)({className:(0,s.AK)("options help",d)},u),(0,a.Z)("div",{className:(0,s.AK)("tooltip",`tooltip-${n}`)},void 0,t),c):c)}},"1xsz":(e,t,n)=>{n.d(t,{Z:()=>c});var o,a=n("sQwH"),i=(n("3Z9q"),n("iu9k")),r=n("zIQK"),s=n("E0cd"),l=n("X40V");const c=({tooltipText:e,className:t,referer:n,tooltipDirection:c})=>(0,a.Z)(r.Z,{text:e,direction:c},void 0,(0,a.Z)("div",{},void 0,(0,a.Z)("a",{href:(0,i.HQ)("pages:plans",{},{ref:n}),className:(0,l.AK)(s.Z.view,t),target:"_blank"},void 0,o||(o=(0,a.Z)("i",{className:"fa-regular fa-lock-keyhole"})),"upgrade now")))},"e+fc":(e,t,n)=>{n.d(t,{I:()=>b,Z:()=>f});var o=n("NQ1V"),a=n("3Z9q"),i=n("hrlB"),r=n("wHg8"),s=n("Fnsp"),l=n("X40V"),c=n("zIYZ"),d=n("JBVY"),u=n("iu9k"),p=n("a261");function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const b="viewer/inspector/toggle",h={convertVertexColor8Bit:"convert_vertex_color_8bit",debug3D:"debug3d",materialF0:"material_f0",shadowPCF:"shadow_PCF",webgl2:"webgl2"};function v({model:e,versionUid:t,defaultOptions:n=i.Z.defaultInternalEmbedOptions,embedOptions:o=i.Z.defaultInternalEmbedOptions,isInspectorOpen:m=!1,className:v},f){const g=a.useRef(null),w=t?new URL(e.embedUrl).origin+(0,u.HQ)("models:embed_specific_version",{model_id:e.uid,version_uid:t}):e.embedUrl,N=a.useRef(!0);a.useEffect((()=>{const e=g.current;if(e&&e.contentWindow){e.focus();const t=e=>{document.body.dispatchEvent(new KeyboardEvent("keydown",e))};return e.contentWindow.addEventListener("keydown",t),()=>{e.contentWindow&&e.contentWindow.removeEventListener("keydown",t)}}}),[]),a.useEffect((()=>{const e=g.current;e&&e.contentWindow&&e.contentWindow.postMessage(b,"*")}),[m]);const C=w+((e,t)=>(0,d.cA)("?",Z(Z({},e),(0,c.m_)((0,r.Z)(t,((e,t)=>h[t]||(0,s.Z)(t))),((e,t)=>p[t]&&p[t].defaultValue!==e)))))(n,o);return a.useEffect((()=>{if(N.current)return void(N.current=!1);const e=g.current;if(e){const t=e.parentElement;t&&t.removeChild(e),requestAnimationFrame((()=>t&&t.appendChild(e)))}}),[C]),a.createElement("div",{className:(0,l.AK)("c-viewer",v),ref:f},a.createElement("iframe",{title:e.name+" 3D model - Sketchfab",ref:g,className:"c-viewer__iframe",src:C,id:"api-frame",allow:"autoplay; fullscreen; xr-spatial-tracking","xr-spatial-tracking":"true","execution-while-out-of-viewport":"true","execution-while-not-rendered":"true","web-share":"true",allowFullScreen:!0}))}const f=a.forwardRef(v)},mtQg:(e,t,n)=>{n.d(t,{Z:()=>o});const o=(e,t,n)=>async function(){const o="function"==typeof e?e():e instanceof Element?e.innerText:e;try{await navigator.clipboard.writeText(o),t&&t()}catch(e){n&&n(e)}}},"BR/Y":(e,t,n)=>{n.d(t,{Z:()=>p});var o=n("3Z9q"),a=n("4fae"),i=n("MB/E"),r=n("D7W8"),s=n("rEmB"),l=n("Sbzs"),c=n("HGbS"),d=n("XuRc"),u=n("MBtD");const p=(e,t,n,p=[])=>{const m=(0,o.useContext)(c.N1),[Z,b]=(0,o.useState)(t),h=(0,o.useRef)(t),v=(0,o.useRef)({}),f=(0,o.useRef)(!0),g=(0,o.useCallback)((e=>{const{entities:t}=(0,a.Fv)(e,n);(0,r.Z)(t)||(0,s.Z)(t,v.current)||(v.current=t,f.current=!0,i.n2.store.dispatch(i.Nw.entities.update(t)),f.current=!1)}),[n]),w=(0,o.useCallback)((()=>h.current),[]),N=(0,o.useCallback)((e=>{h.current=(0,l.Z)(e)?e(h.current):e,b(h.current),g(h.current)}),[g]);(0,o.useEffect)((()=>(0,u.se)(i.n2.store,i.wl.entities.all,(e=>{f.current||(e=>{const{result:t}=(0,a.Fv)(h.current,n),o=(0,a.cY)(t,n,e);h.current=o,b(o)})(e)}))),[n]);const C=(0,o.useMemo)((()=>[(0,c.OF)(m),...p]),[m]),[,k]=(0,d.Z)(w,N,e,C);return[Z,k]}},fEbO:(e,t,n)=>{n.d(t,{ZP:()=>c,d9:()=>s,s0:()=>r});var o=n("3Z9q"),a=n("VDcQ"),i=n("MB/E");const r="viewer/stop",s="viewer/start";function l(e,t){try{e&&e.contentWindow&&e.contentWindow.postMessage(t,"*")}catch(e){console.error(e)}}function c(){const e=(0,a.v9)(i.wl.authUser.canAccessFeature("ff_useonevieweratatime"));o.useEffect((()=>
1{if(!e)return;const t=document.querySelector("#api-frame");return l(t,r),()=>{l(t,s)}}),[e])}},R276:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n("NQ1V"),a=n("3Z9q"),i=n("HGbS"),r=n("BR/Y");function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const c=(e,t,n,o)=>{const s=a.useMemo((()=>o?{value:o}:{value:{}}),[o]),[c,d]=(0,r.Z)(((e,t)=>t.payload.effect.caseOf({Pending:()=>l(l({},e),{},{loading:!0}),Rejected:()=>l(l({},e),{},{loading:!1}),Resolved:t=>l(l({},e),{},{loading:!1,value:t})})),{value:t,loading:!1},s);return a.useEffect((()=>{const t=(0,i.GZ)({type:"RUN",payload:{effect:e}});d(t)}),n),[c.value,c.loading]}},XFpV:(e,t,n)=>{n.r(t),n.d(t,{buildUrlFromParameters:()=>me,default:()=>Ze});var o=n("NQ1V"),a=n("sQwH"),i=n("IDtV"),r=n("rEmB"),s=n("8nmZ"),l=n("3Z9q"),c=n("X40V"),d=n("hDfq"),u=n("iu9k"),p=n("4jm9"),m=n("QhFo"),Z=n("YpOo"),b=n("AFjX"),h=n("zIQK"),v=n("e+fc"),f=n("8xE2"),g=n("KGKI"),w=n("oU1a"),N=n("GR31"),C=n("rzLk"),k=n("R276");const O=function({modelUid:e,urlOptions:t,setUrlOptions:n,embedOptions:o}){const[i]=(0,k.Z)((({Api:t})=>t.getAnnotations(e).then((e=>e.results))),[],[]);return(0,a.Z)("div",{},void 0,(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"Choose how to display annotations"),(0,a.Z)(f.Z,{className:w.Z.checkbox,isChecked:t.annotations_visible,label:"Show Annotations",name:"showAnnotations",disabled:o.bbCode||!i.length,onChange:e=>{n({annotations_visible:e})}})),(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"Preselect annotation"),(0,a.Z)("div",{className:`${w.Z.optionContent} --with-child --annotationOption`},void 0,(0,a.Z)(g.Z,{value:t.annotation,disabled:o.bbCode||!i.length,onChange:e=>{n({annotation:e?1:0})},"data-selenium":"annotation"}),t.annotation&&!o.bbCode?(0,a.Z)(N.Z,{onChange:e=>{n({annotation:e})},className:w.Z.annotationDropdown,theme:"white-background",value:t.annotation?t.annotation:1,disabled:!t.annotation||o.bbCode||!i.length,options:i?i.map(((e,t)=>({title:(0,a.Z)("div",{className:"c-visibility-select__text","data-selenium":"public-option"},void 0,t+1),value:t+1}))):[]}):null)),(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"Autopilot"),(0,a.Z)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"}},void 0,(0,a.Z)("div",{className:`${w.Z.optionContent} --with-child --annotationOption`},void 0,(0,a.Z)("div",{className:w.Z.optionContent},void 0,(0,a.Z)(g.Z,{value:Boolean(t.annotation_cycle),onChange:e=>{n(e?{annotation_cycle:t.annotation_cycle>1?t.annotation_cycle:1}:{annotation_cycle:null})},disabled:o.bbCode||!i.length,name:"annotation_cycle"}),(0,a.Z)(C.Z,{message:"Autopilot mode will move through annotations at a selected speed.",className:w.Z.helpIcon})),null!==t.annotation_cycle?(0,a.Z)("div",{className:`${w.Z.sizeContainer} ${w.Z.cycleInput}`},void 0,(0,a.Z)("input",{type:"number",className:`${w.Z.input}`,disabled:o.bbCode||!i.length,defaultValue:t.annotation_cycle?t.annotation_cycle:1,min:0,onChange:e=>{Number(e.target.value)>1&&n({annotation_cycle:e.target.value})}})):null),null!==t.annotation_cycle?(0,a.Z)("span",{className:w.Z.inputUnit},void 0,"second",t.annotation_cycle>1?"s":""):null)))};var y,_,x,P,E=n("1xsz"),D=n("V4X4");function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?j(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const $=function({urlOptions:e,setUrlOptions:t,embedOptions:n,setEmbedOptions:o,hasAccessWithPlan:i,isOwner:r}){const[s,c]=l.useState("");return l.useEffect((()=>{/^#[0-9A-F]{6}$/i.test(`#${s}`)&&t({ui_color:s})}),[s]),(0,a.Z)("div",{},void 0,(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"Fixed Size"),(0,a.Z)("div",{className:`${w.Z.optionContent} --with-child`},void 0,(0,a.Z)("div",{className:w.Z.optionContent},void 0,(0,a.Z)(g.Z,{value:n.fixed,onChange:e=>o(A(A({},n),{},{fixed:e})),disabled:n.bbCode,"data-selenium":"fixedSize"}),(0,a.Z)(C.Z,{message:"Choose between a fixed or a responsive size",className:w.Z.helpIcon,direction:"down"})),(0,a.Z)("div",{className:w.Z.sizeContainer},void 0,(0,a.Z)(D.Z,{type:"number",className:w.Z.input,min:0,disabled:!n.fixed||n.bbCode,value:String(n.width),onChange:e=>o(A(A({},n),{},{width:Number(e)}))}),(0,a.Z)("span",{className:w.Z.inputSeparator},void 0,"x"),(0,a.Z)(D.Z,{type:"number",className:w.Z.input,min:0,disabled:!n.fixed||n.bbCode,value:String(n.height),onChange:e=>o(A(A({},n),{},{height:Number(e)}))})))),(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"Description"),(0,a.Z)(f.Z,{className:w.Z.checkbox,isChecked:n.showCaption,label:"Show Caption",name:"Show Caption",onChange:e=>o(A(A({},n),{},{showCaption:e}))}),(0,a.Z)("div",{className:`${w.Z.optionContent} --with-child`},void 0,(0,a.Z)(f.Z,{className:w.Z.checkbox,isChecked:e.ui_infos,disabled:n.bbCode||!i("prem"),label:"Show model information",name:"Show model information",onChange:e=>{t({ui_infos:e?1:0})}}),!i("prem")&&r?y||(y=(0,a.Z)(E.Z,{tooltipText:"Upgrade your plan to Premium to change.",referer:"embed_popup"})):null)),(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"Theme"),(0,a.Z)("div",{className:w.Z.optionContent},void 0,(0,a.Z)(g.Z,{value:e.ui_theme,onChange:e=>t({ui_theme:e?"dark":0}),disabled:n.bbCode,"data-selenium":"ui_theme"},void 0,"Dark Theme"),(0,a.Z)(C.Z,{message:"Recommended with light background",className:w.Z.helpIcon}))),(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"Brand"),(0,a.Z)("div",{className:`${w.Z.optionContent} --with-child`},void 0,(0,a.Z)(f.Z,{className:w.Z.checkbox,isChecked:!e.ui_watermark_link,label:"Remove watermark link",name:"Remove watermark link",onChange:e=>{t({ui_watermark_link:e?0:1})},disabled:!i("prem")||n.bbCode}),!i("prem")&&r?_||(_=(0,a.Z)(E.Z,{tooltipText:"Upgrade your plan to Premium to change.",referer:"embed_popup"})):null),(0,a.Z)("div",{className:`${w.Z.optionContent} --with-child`},void 0,(0,a.Z)(f.Z,{className:w.Z.checkbox,isChecked:!e.ui_watermark,label:"Remove watermark",name:"Remove watermark",disabled:!i("prem")||n.bbCode,onChange:e=>t({ui_watermark:e?0:1})}),!i("prem")&&r?x||(x=(0,a.Z)(E.Z,{tooltipText:"Upgrade your plan to Premium to change.",referer:"embed_popup"})):null)),(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"UI color"),(0,a.Z)("div",{className:`${w.Z.optionContent} --with-child`},void 0,(0,a.Z)("div",{className:w.Z.colorContainer},void 0,(0,a.Z)("input",{type:"string",value:`#${s}`,maxLength:7,"data-selenium":"colorInput",onChange:e=>{const{value:t}=e.target,n=e.target.value.startsWith("#")?t.substring(1):t;c(n)},disabled:!i("prem")||n.bbCode}),(0,a.Z)(C.Z,{message:"This sets the color of loading bars and other UI elements",className:w.Z.helpIcon})),!i("prem")&&r?P||(P=(0,a.Z)(E.Z,{tooltipText:"Upgrade your plan to Premium to change interface color.",referer:"embed_popup"})):null)),(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"Code format"),(0,a.Z)(f.Z,{className:w.Z.checkbox,isChecked:n.bbCode,label:"Use BBcode",name:"BBcode",onChange:e=>o(A(A({},n),{},{bbCode:e}))})),(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"Do not track"),(0,a.Z)("div",{className:w.Z.optionContent},void 0,(0,a.Z)(f.Z,{className:w.Z.checkbox,isChecked:e.dnt,label:"Disable user tracking",name:"dnt",onCh
1ange:e=>t({dnt:e?1:0})}),(0,a.Z)(C.Z,{message:"Prevent the 3D viewer from tracking session data, including cookies.",className:w.Z.helpIcon}))))};const S=function({urlOptions:e,setUrlOptions:t,embedOptions:n}){return(0,a.Z)("div",{className:w.Z.contentContainer},void 0,(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"Choose how to present the model"),(0,a.Z)(f.Z,{className:w.Z.checkbox,disabled:n.bbCode,isChecked:e.autostart,label:"Autostart",name:"Autostart",onChange:e=>{t({autostart:e?1:0})}}),(0,a.Z)(f.Z,{className:w.Z.checkbox,isChecked:e.camera,disabled:n.bbCode,label:"Animated entrance",name:"Animated entrance",onChange:e=>{t({camera:e?1:0})}}),(0,a.Z)(f.Z,{className:w.Z.checkbox,isChecked:e.autospin,disabled:n.bbCode,label:"Turntable animation",name:"Turntable animation",onChange:e=>{t({autospin:e?1:0})}}),(0,a.Z)("div",{className:w.Z.optionContent},void 0,(0,a.Z)(f.Z,{className:w.Z.checkbox,isChecked:e.preload,disabled:n.bbCode,label:"Preload textures",name:"Preload textures",onChange:e=>{t({preload:e?1:0})}}),(0,a.Z)(C.Z,{message:"Performance will be improved when unchecked.",className:w.Z.helpIcon})),(0,a.Z)("div",{className:w.Z.optionContent},void 0,(0,a.Z)(f.Z,{className:w.Z.checkbox,isChecked:e.transparent,disabled:n.bbCode,label:"Transparent background",name:"Transparent background",onChange:e=>{t({transparent:e?1:0})}}),(0,a.Z)(C.Z,{message:"Rendering quality is better with background enabled. You can edit the background in 3D Settings.",className:w.Z.helpIcon}))),(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"Navigation hint"),(0,a.Z)(N.Z,{onChange:e=>{t({ui_hint:e})},theme:"white-background",disabled:n.bbCode,value:e.ui_hint,className:w.Z.navigationHintDropdown,options:[{title:"Never show hint",value:0},{title:"Show hint once per session",value:1},{title:"Always show hint",value:2}]})))};var R=n("D4hk"),T=n("3MRe"),I=n("6lnf");const U=["values","options","onToggleOption","className"],F=e=>{let{values:t,options:n,onToggleOption:o,className:i}=e,r=(0,T.Z)(e,U);return(0,a.Z)("ul",{className:`${I.Z.switchList} ${i||""}`},void 0,n.map((e=>{const n=t.includes(e.value),i=Boolean(e.disabled);return l.createElement("li",(0,R.Z)({key:e.value,className:(0,c.AK)("c-dropdown-select__option",{"--disabled":i})},r),(0,a.Z)("div",{className:I.Z.row},void 0,(0,a.Z)(g.Z,{className:I.Z.switchButton,name:e.value,value:n,onChange:()=>o(e.value),disabled:i,"data-selenium":e.value},void 0,e.title)))})))};var L,M,z=n("0qif");function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const K=[{title:"Help",value:"ui_help"},{title:"Settings",value:"ui_settings"},{title:"Inspector",value:"ui_inspector"},{title:"VR",value:"ui_vr"},{title:"Fullscreen",value:"ui_fullscreen"},{title:"Annotations",value:"ui_annotations"},{title:"Animation",value:"ui_animations"},{title:(0,a.Z)(l.Fragment,{},void 0,"Viewer stop"," ",(0,a.Z)(C.Z,{message:'This will hide the "Stop" button in the top right so that users cannot stop the 3D render once it is started',className:w.Z.helpIcon})),value:"ui_stop"}];const B=function({urlOptions:e,setUrlOptions:t,embedOptions:n,hasAccessWithPlan:o,isOwner:i}){return(0,a.Z)("div",{className:w.Z.optionContainer},void 0,(0,a.Z)("div",{className:w.Z.optionTitle},void 0,"Choose which buttons to display"),(0,a.Z)("div",{},void 0,!o("prem")&&i?L||(L=(0,a.Z)(E.Z,{tooltipText:"Upgrade your plan to Premium to change.",referer:"embed_popup"})):null),(0,a.Z)(F,{options:K.map((e=>V(V({},e),{},{disabled:n.bbCode||!o("prem")}))),values:K.filter((t=>e[t.value])).map((e=>e.value)),onToggleOption:n=>
1{t({[n]:e[n]?0:1})}}),(0,a.Z)("div",{className:`${w.Z.optionContent} --arOption`},void 0,(0,a.Z)(g.Z,{value:e.ui_ar,onChange:e=>t({ui_ar:e}),disabled:n.bbCode||!o("prem"),"data-selenium":"ui_ar"},void 0,"AR"),!o("prem")&&i?M||(M=(0,a.Z)(E.Z,{className:"--ar",tooltipText:"Upgrade your plan to Premium to change.",referer:"embed_popup",tooltipDirection:"up"})):null),(0,a.Z)("div",{className:w.Z.helpLink},void 0,(0,a.Z)("a",{target:"_blank",href:(0,z.F)("APP_FREE_AR"),className:(0,c.AK)("help","fa-regular","fa-question-circle",w.Z.helpIcon),rel:"noopener noreferrer"}),(0,a.Z)("a",{target:"_blank",href:(0,z.F)("APP_FREE_AR"),rel:"noopener noreferrer"},void 0,"Learn about AR on Sketchfab")))};var Q;const H=function(e){return l.createElement("svg",(0,R.Z)({width:12,height:16},e),Q||(Q=(0,a.Z)("path",{d:"M5.383 15.677C.843 9.095 0 8.42 0 6a6 6 0 1112 0c0 2.42-.843 3.095-5.383 9.677a.75.75 0 01-1.234 0zM6 8.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z"})))};var X;const W=function(e){return l.createElement("svg",(0,R.Z)({width:16,height:16},e),X||(X=(0,a.Z)("path",{d:"M3.445 7.643l4.198-4.197L6.267 2.07 4.343 3.993a.247.247 0 01-.35 0l-.35-.35a.247.247 0 010-.349L5.568 1.37 4.518.32a.99.99 0 00-1.4 0L.322 3.12a.99.99 0 000 1.4l3.124 3.124zM15.561 4a1.498 1.498 0 000-2.119L14.15.47a1.499 1.499 0 00-2.12 0l-1.435 1.435 3.53 3.53L15.562 4zM9.89 2.61L.626 11.874l-.585 3.35a.662.662 0 00.767.767l3.351-.588 9.261-9.26L9.89 2.61zm5.821 8.903l-1.049-1.05-1.924 1.925a.247.247 0 01-.35 0l-.349-.35a.248.248 0 010-.35l1.924-1.923-1.377-1.377-4.197 4.197 3.125 3.125a.99.99 0 001.4 0l2.797-2.798a.99.99 0 000-1.399z"})))};var Y;const G=function(e){return l.createElement("svg",(0,R.Z)({width:14,height:16},e),Y||(Y=(0,a.Z)("path",{d:"M.25 5.742l5.816 3.144v6.989L.25 12.52V5.742zm13.434 0v6.774L7.87 15.875v-6.99l5.815-3.143zM6.95.125l6.674 3.854-6.676 3.537L.273 3.979 6.95.125z"})))};var J;const ee=function(e){return l.createElement("svg",(0,R.Z)({width:24,height:16},e),J||(J=(0,a.Z)("path",{d:"M16 0H8C3.583 0 0 3.583 0 8s3.583 8 8 8h8c4.417 0 8-3.583 8-8s-3.583-8-8-8zm0 13.333A5.33 5.33 0 0110.667 8 5.33 5.33 0 0116 2.667 5.33 5.33 0 0121.333 8 5.33 5.33 0 0116 13.333z"})))};var te,ne,oe,ae,ie=n("1nxQ"),re=n("fEbO"),se=n("VDcQ"),le=n("MB/E");function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ue={autospin:0,autostart:0,camera:1,annotations_visible:0,preload:0,annotation:0,annotation_cycle:null,transparent:0,ui_animations:1,ui_infos:1,ui_stop:1,ui_inspector:1,ui_watermark_link:1,ui_watermark:1,ui_hint:1,ui_ar:1,ui_help:1,ui_settings:1,ui_vr:1,ui_fullscreen:1,ui_annotations:1,ui_theme:0,ui_color:"",dnt:0},pe={showCaption:!0,fixed:!1,width:640,height:480,bbCode:!1},me=e=>Object.keys(e).filter((t=>e[t]!==ue[t])).map((t=>`${t}=${e[t]?"ui_hint"===t||"ui_color"===t||"ui_theme"===t||"annotation_cycle"===t?e[t]:1:0}`)).join("&");const Ze=(0,i.Z)((function({popup:e,model:t}){(0,re.ZP)();const[n,o]=l.useState(0),[i,f]=l.useState(ue),[g,N]=l.useState(pe),C=(0,c.aj)("breakpointMedium"),k=((e,t,n)=>{const o=me(t),a=e.org?e.org:e.user;return`<div class="sketchfab-embed-wrapper">\n <iframe title="${(0,ie.r)(e.name)}"\n frameborder="0"\n allowfullscreen\n mozallowfullscreen="true"\n webkitallowfullscreen="true"\n allow="autoplay; fullscreen; xr-spatial-tracking"\n xr-spatial-tracking\n execution-while-out-of-viewport\n execution-while-not-rendered\n web-share\n ${n.fixed?` width="${n.width}" height="${n.height}"`:""}\n src="${e.embedUrl}${(0,r.Z)(t,ue)?"":"?"}${o}">\n </iframe> ${n.showCaption?`<p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;">\n <a href="${e.viewerUrl}" target="_blank" rel="nofollow" style="font-weight: bold; color: #1CAAD9;">\n ${(0,ie.r)(e.name)}\n </a>\n by <a href="${window.location.origin}/${a.username}" target="_blank" rel="nofollow" style="font-weight: bold; color: #1CAAD9;">\n ${(0,ie.r)(a.displayName)}\n </a>\n on <a href="${window.location.origin}" target="_blank" rel="nofollow" style="font-weight: bold; color: #1CAAD9;">Sketchfab</a></p>`:""}</div>`.replace(/[\n\r]/g,"").replace(/\s+/g," ").trim()})(t,i,g),y=((e,t)=>{const n=e.org?e.org:e.user;return`[sketchfab]${e.uid}[/sketchfab] ${t.showCaption?`[url=${e.viewerUrl}]${e.name}[/url] by [url=${window.location.origin}/${n.username}]${n.displayName}[/url] on [url=${window.location.origin}]Sketchfab[/url]`:""}`.replace(/[\n\r]/g,"").trim()})(t,g),_=(0,s.Z)((e=>!!t.org||(0,d.Di)(t.user.account,e))),x=(0,se.v9)(le.wl.authUser.user).uid===t.user.uid,P=t.org?t.org:t.user;return(0,a.Z)(Z.Z,{className:w.Z.view,title:"Embed viewer",onClose:e.continue,footer
1:!C&&(0,a.Z)(l.Fragment,{},void 0,(0,a.Z)("div",{className:w.Z.clipboard},void 0,(0,a.Z)(m.Z,{textToCopy:g.bbCode?y:k})),(0,a.Z)("div",{className:w.Z.helpLinkContainer},void 0,(0,a.Z)("a",{className:w.Z.helpLink,rel:"noopener noreferrer",href:(0,z.F)("EMBEDDING_YOUR_3D_MODELS"),target:"_blank"},void 0,te||(te=(0,a.Z)("i",{className:"fa-regular fa-question-circle"})),"Learn about embedding"),(0,a.Z)("a",{className:w.Z.helpLink,rel:"noopener noreferrer",href:"https://sketchfab.com/developers/viewer",target:"_blank"},void 0,ne||(ne=(0,a.Z)("i",{className:"fa-regular fa-question-circle"})),"API References")))},void 0,(0,a.Z)("div",{className:w.Z.content},void 0,(0,a.Z)("div",{className:w.Z.viewerBloc},void 0,(0,a.Z)(v.Z,{model:t,embedOptions:i,defaultOptions:ue}),(0,a.Z)("div",{className:w.Z.meta},void 0,(0,a.Z)("div",{className:(0,c.AK)(w.Z.caption,{[(0,c.c6)(w.Z,"hidden")]:!g.showCaption})},void 0,(0,a.Z)("a",{href:t.embedUrl},void 0,t.name)," by"," ",(0,a.Z)("a",{href:(0,u.HQ)("users:profile_summary",{username:P.username})},void 0,P.displayName)," ","on ",(0,a.Z)("a",{href:window.location.origin},void 0,"Sketchfab")),(0,a.Z)(p.Z,{value:g.bbCode?y:k,className:w.Z.code,"data-selenium":"embedCode"}),C?(0,a.Z)("div",{className:w.Z.clipboard},void 0,(0,a.Z)(m.Z,{textToCopy:g.bbCode?y:k})):null)),(0,a.Z)("div",{className:w.Z.optionsBloc},void 0,(0,a.Z)(b.Z,{selectedTabIndex:n,onSelectTab:o,className:w.Z.tabsContainer,tabs:[{title:(0,a.Z)(h.Z,{text:"Appearance",className:"c-tabs__tooltip"},void 0,(0,a.Z)(W,{className:(0,c.AK)(w.Z.tabIcon,{"--selected":0===n})})),render:()=>(0,a.Z)($,{hasAccessWithPlan:_,urlOptions:i,setUrlOptions:e=>{f(de(de({},i),e))},embedOptions:g,setEmbedOptions:N,isOwner:x}),"data-selenium":"appearance"},{title:(0,a.Z)(h.Z,{text:"Content",className:"c-tabs__tooltip"},void 0,(0,a.Z)(G,{className:w.Z.tabIcon})),render:()=>(0,a.Z)(S,{embedOptions:g,urlOptions:i,setUrlOptions:e=>{f(de(de({},i),e))}}),"data-selenium":"content"},{title:(0,a.Z)(h.Z,{text:"Control Options",className:"c-tabs__tooltip"},void 0,(0,a.Z)(ee,{className:w.Z.tabIcon})),render:()=>(0,a.Z)(B,{hasAccessWithPlan:_,embedOptions:g,urlOptions:i,setUrlOptions:e=>{f(de(de({},i),e))},isOwner:x}),"data-selenium":"controlOptions"},{title:(0,a.Z)(h.Z,{text:"Annotations",className:"c-tabs__tooltip"},void 0,(0,a.Z)(H,{className:w.Z.tabIcon})),render:()=>(0,a.Z)(O,{modelUid:t.uid,embedOptions:g,urlOptions:i,setUrlOptions:e=>{f(de(de({},i),e))}}),"data-selenium":"annotations"}]}),C?(0,a.Z)("div",{className:w.Z.helpLinkContainer},void 0,(0,a.Z)("a",{className:w.Z.helpLink,rel:"noopener noreferrer",href:(0,z.F)("EMBEDDING_YOUR_3D_MODELS"),target:"_blank"},void 0,oe||(oe=(0,a.Z)("i",{className:"fa-regular fa-question-circle"})),"Learn about embedding"),(0,a.Z)("a",{className:w.Z.helpLink,rel:"noopener noreferrer",href:"https://sketchfab.com/developers/viewer",target:"_blank"},void 0,ae||(ae=(0,a.Z)("i",{className:"fa-regular fa-question-circle"})),"API References")):null)))}))}}]); 2//# sourceMappingURL=ac4c4d51c141b8793523c9ae63cc7283-v2.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.