PageSourceSearch

https://static.sketchfab.com/static/builds/web/dist/23470f212898de0b3af0f095e72145c5-v2.js

js sketchfab.com collected 2026-09-24 08:24:12 UTC 89,134 bytes, 2 lines download raw bytes

1(self.webpackChunksketchfab=self.webpackChunksketchfab||[]).push([[6595],{Kjxj:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});var o=a("Hjnd"),i=a.n(o),s=a("k46e"),r=a("eKF4");const n={name:"DragAndDrop",dependencies:["WithOptionTypes"],_dragAndDropEnabled:!1,initializeDragAndDrop:function(e){var t="boolean"==typeof this.options.dragAndDrop?{enabled:this.options.dragAndDrop}:this.options.dragAndDrop||{};this.options.dragAndDrop=(0,s.Z)({},t,e),this._dragAndDropEnabled=void 0===this.options.dragAndDrop.enabled||this.options.dragAndDrop.enabled,this.onDragEnter=this.onDragEnter.bind(this),this.onDragOver=this.onDragOver.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.onDrop=this.onDrop.bind(this),this.onDragLeave=this.onDragLeave.bind(this),this._dragAndDropInitialized=!0,this.delegateDragAndDrop()},getDragAndDropEnabled:function(){return this._dragAndDropEnabled},setDragAndDropElements:function(){this.setDragAndDropTargetElement(),this.setDragAndDropDropboxElement()},setDragAndDropTargetElement:function(){this.options.dragAndDrop.target?"object"==typeof this.options.dragAndDrop.target||this.options.dragAndDrop.external?this._$dragAndDropTarget=i()(this.options.dragAndDrop.target):this.options.dragAndDrop.external||(this._$dragAndDropTarget=this.$(this.options.dragAndDrop.target)):this._$dragAndDropTarget=this.$el},getDragAndDropTarget:function(){return this._$dragAndDropTarget},getDragAndDropDropbox:function(){return this._$dropbox},setDragAndDropDropboxElement:function(){if(this.options.dragAndDrop.dropbox){var e=this.options.dragAndDrop.dropbox,t=typeof e;this._$dropbox="string"===t?this.$(e):"function"===t?i()(e.call(this)):i()(e)}else this._$dropbox=this._$dragAndDropTarget},delegateDragAndDrop:function(){this._dragAndDropInitialized&&(this.setDragAndDropElements(),this._$dragAndDropTarget&&r.Z.me().isAuthenticated()&&this.getDragAndDropEnabled()&&(this._$dragAndDropTarget.on("dragenter",this.onDragEnter),this._$dragAndDropTarget.on("dragover",this.onDragOver),this._$dragAndDropTarget.on("drop",this.onDrop),this._$dragAndDropTarget.on("dragend",this.onDragEnd),this._$dragAndDropTarget.on("dragleave",this.onDragLeave)))},undelegateDragAndDrop:function(){this._$dragAndDropTarget&&(this._$dragAndDropTarget.off("dragenter",this.onDragEnter),this._$dragAndDropTarget.off("dragover",this.onDragOver),this._$dragAndDropTarget.off("drop",this.onDrop),this._$dragAndDropTarget.off("dragend",this.onDragEnd),this._$dragAndDropTarget.off("dragleave",this.onDragLeave))},isNotDraggingFile:function(e){var t=(e.originalEvent?e.originalEvent:e).dataTransfer;return t&&t.types&&t.types.concat&&-1===t.types.indexOf("Files")},isDropPending:function(){return!1},onDragEnter:function(e){if(!this.isNotDraggingFile(e)&&!this.isDropPending()){e.preventDefault();var t=this.getDragAndDropDropbox();t.addClass("file-upload-drag"),e.target===t[0]&&t.addClass("accepting")}},onDragEnd:function(e){var t=this.getDragAndDropDropbox(),a=this.getDragAndDropTarget();e.target===t[0]&&t.removeClass("accepting"),e.target===a[0]&&t.removeClass("file-upload-drag"),e.preventDefault()},onDragOver:function(e){e.preventDefault()},onDragLeave:function(e){e.preventDefault(),this.onDragEnd(e)},onDrop:function(e){e.preventDefault();var t=(e=e.originalEvent?e.originalEvent:e).dataTransfer.files,a=this.getDragAndDropDropbox();a.removeClass("file-upload-drag accepting"),t&&t.length&&e.target===a[0]&&this.onFilesDrop(t)},onFilesDrop:function(e){console.info(e.length+" files were dropped on the following element : ",this._$dropbox," nothing has been done with them.")}}},"7txH":(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});var o,i=a("MQQR"),s=[{type:"VERTEX_SHADER",text:["attribute vec3 aPosition;
1","void main() {","gl_Position = vec4(aPosition, 1.0);","}"].join("\n")},{type:"FRAGMENT_SHADER",text:["#version 100","#ifdef GL_FRAGMENT_PRECISION_HIGH","  precision highp float;","#else"," precision mediump float;","#endif","uniform sampler2D uT0;","uniform sampler2D uT1;","uniform sampler2D uT2;","uniform sampler2D uT3;","uniform ivec4 uR;","varying vec2 vT;","varying vec3 vC;","varying vec3 vColor;","varying vec4 vColor2;","void f(in vec3 a, out vec3 b) {","b = 2.0 * a;","}","#define LIN_SRGB(x) x < 0.0031308 ? x * 12.92 : 1.055 * pow(x, 1.0/2.4) - 0.055","#define SRGB_LIN(x) x < 0.04045 ? x * (1.0 / 12.92) : pow((x + 0.055) * (1.0 / 1.055), 2.4)","float linearTosRGB(const in float color) { return LIN_SRGB(color); }","vec3 linearTosRGB(const in vec3 color) { return vec3(LIN_SRGB(color.r), LIN_SRGB(color.g), LIN_SRGB(color.b)); }","vec4 linearTosRGB(const in vec4 color) { return vec4(LIN_SRGB(color.r), LIN_SRGB(color.g), LIN_SRGB(color.b), color.a); }","void main(void) {","vec4 col;","col.r = linearTosRGB(vColor2.r);","col.rgb = linearTosRGB(vColor);","f(vC, col.xyz);","if ( uR.x == 3 ) {","  col.rgb = texture2D( uT0, vT ).aaa;","  col.a = uR.y == 0 ? texture2D( uT1, vT ).r : texture2D( uT1, vT ).a;","} else if ( uR.x == 2 ) {","  col.rgb = texture2D( uT0, vT ).rgb;","  col.a = uR.y == 0 ? texture2D( uT1, vT ).r : texture2D( uT1, vT ).a;","} else {","  col.r = uR.x == 0 ? texture2D( uT0, vT ).r : texture2D( uT0, vT ).a;","  col.g = uR.y == 0 ? texture2D( uT1, vT ).r : texture2D( uT1, vT ).a;","  col.b = uR.z == 0 ? texture2D( uT2, vT ).r : texture2D( uT2, vT ).a;","  col.a = uR.w == 0 ? texture2D( uT3, vT ).r : texture2D( uT3, vT ).a;","}","gl_FragColor = gl_FrontFacing ? vec4(col.rgb, 1.0) : col;","}"].join("\n")}];function r(e){var t=e&&e.getExtension("WEBGL_lose_context");return t&&t.loseContext(),!0}function n(){if(void 0!==window.sketchfabWebGLSupport)return window.sketchfabWebGLSupport;if(o=!1,window.sketchfabWebGLSupport=o,!window.Set||!window.Map||!window.Uint8ClampedArray)return!1;var e=null;try{var t=["webgl","experimental-webgl"],a={antialias:!1},n=document.createElement("canvas");if(!n||!n.getContext)return!1;for(var l=0;l<t.length&&!(e=n.getContext(t[l],a));l++);if(!(e&&e.getParameter&&e.getExtension&&e.getShaderPrecisionFormat))return r(e)&&!1;var d=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS);if(!d||d<64)return r(e)&&!1;var c=e.getParameter(e.MAX_VARYING_VECTORS);if(!c||c<8)return r(e)&&!1;var p=e.getExtension("WEBGL_debug_renderer_info");if(p&&-1!==e.getParameter(p.UNMASKED_RENDERER_WEBGL).indexOf("SwiftShader")&&!(0,i.Z)().allowSwiftShader)return r(e)&&!1;o=s.every((function(t){return function(e,t,a){var o=t;"string"==typeof o&&(o=e[t]);var i=e.createShader(o);return e.shaderSource(i,a),e.compileShader(i),!(!e.getShaderParameter(i,e.COMPILE_STATUS)&&!e.isContextLost()&&(console.warn("Could't compile shader "+a),console.warn(e.getShaderInfoLog(i)),console.warn("You may want to consider a browser that fully supports WebGL."),1))}(e,t.type,t.text)})),r(e)}catch(t){return r(e)&&!1}return window.sketchfabWebGLSupport=o,o}},ZGp8:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var o=a("KDlt"),i=a("g6dK");a("cANE");const s=i.Z.extend({template:function(){return o.Z.get("front/popups/missing-webgl",{buttons:this.options.buttons})}})},XUjw:(e,t,a)=>{"use strict";a.d(t,{$:()=>s,f:()=>i});const o="https://www.fab.com",i="ff_fab_disconnected",s={search:`${o}/search`,modelSearch:`${o}/category/3d-model`,materialSearch:`${o}/category/material`,creatorSearch:`${o}/search/creators`,becomeAPublisher:`${o}/become-a-publisher`,listings:`${o}/listings`}},"8xE2":(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var o=a("sQwH"),i=a("NQ1V"),s=a("3Z9q"),r=a("g/7r"),n=a("X40V");class l extends s.Component{constructor(...e){super(...e),(0,i.Z)(this,"onClickIfSpacebar",(e=>{var t=e.keyCode||e.which;0!==t&&32!==t||this.onClick(e)})),(0,i.Z)(this,"onClick",(e=>{e.preventDefault(),this.props.disabled||this.props.onChange(!this.props.isChecked,e)}))}render(){const{isChecked:e,isIndeterminate:t,name:a,isTouched:i,error:l,disabled:d=!1,label:c="",className:p="",children:u,title:m}=this.props;return(0,o.Z)(s.Fragment,{},void 0,(0,o.Z)("div",{onKeyDown:this.onClickIfSpacebar,onClick:this.onClick,className:`c-checkbox ${p} ${d?"--disabled":""} ${t?"--indeterminate":""} ${e?"--active":""}`,title:m},void 0,(0,o.Z)("input",{id:a,className:"c-checkbox__input",type:"checkbox",name:a,checked:e,onChange:r.EI,disabled:d}),(0,o.Z)("div",{"data-selenium":`checkbox-${a}`,className:"c-checkbox__actor"}),(0,o.Z)("label",{tabIndex:0,className:(0,n.AK)("c-checkbox__label",{"--disabled":d}),htmlFor:a},void 0,u||c)),i&&l?(0,o.Z)("label",{className:"form-error"},void 0,l):null)}}},"Dc+D":(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});var o=a("D4hk"),i=a("sQwH"),s=a("3MRe"),r=a("3Z9q"),n=a("8xE2"),l=a("X40V");const d=["theme","values","options","onToggleOption","maxSelectedCount"];const c=function(e){let{theme:t,values:a,options:c,onToggleOption:p,maxSelectedCount:u=1/0}=e,m=(0,s.Z)(e,d);return(0,i.Z)("ul",{className:"c-dropdown-select "+(t?"--"+t+"-theme":"")},void 0,c.map((e=>{const t=a.includes(e.value),s=e.disabled||void 0!==u&&a.length>=u&&!t,d="function"==typeof e.title?e.title():e.title;return r.createElement("li",(0,o.Z)({key:e.value,className:(0,l.AK)("c-dropdown-select__option",{"--disabled":
1Boolean(e.disabled)})},m),(0,i.Z)(n.Z,{name:e.value,label:d,isChecked:t,onChange:()=>p(e.value),disabled:s},void 0,d))})))}},nxOG:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var o=a("sQwH"),i=a("3Z9q"),s=a("paaL");const r=({values:e,itemProps:t})=>(0,o.Z)("span",{className:s.Z.view},void 0,e.map(((e,a)=>(0,o.Z)(i.Fragment,{},a,a>0&&", ","function"==typeof e?e(t):e))))},h4jM:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});var o=a("sQwH"),i=a("NQ1V"),s=a("3Z9q"),r=a("RYQm"),n=a("UnUI"),l=a("Dc+D"),d=a("nxOG");class c extends s.Component{constructor(...e){super(...e),(0,i.Z)(this,"getSelectedOptions",(()=>{const e=this.props.value;return this.props.options.filter((t=>(0,r.Z)(e,t.value)))})),(0,i.Z)(this,"getLabelValue",(()=>{const e=this.getSelectedOptions().map((({title:e})=>e));return(0,o.Z)(d.Z,{values:e,itemProps:{isLabel:!0}})})),(0,i.Z)(this,"onToggleOption",(e=>{const t=this.props.value;this.props.onChange((0,r.Z)(t,e)?t.filter((t=>t!==e)):t.concat(e))}))}render(){const{title:e,labelValue:t,placeholder:a,className:i,disabled:s,theme:r,menuAlign:d,options:c,value:p,maxSelectedCount:u}=this.props;return(0,o.Z)(n.Z,{labelTitle:e,labelValue:t||this.getLabelValue(),placeholder:a,className:i,disabled:s,theme:r,menuAlign:d,"data-selenium":this.props["data-selenium"]},void 0,(()=>(0,o.Z)(l.Z,{maxSelectedCount:u,options:c,values:p,onToggleOption:this.onToggleOption})))}}(0,i.Z)(c,"defaultProps",{title:"",theme:"light",labelValue:"",maxSelectedCount:1/0})},Q0AI:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var o=a("sQwH"),i=(a("3Z9q"),a("X40V"));function s({error:e,isTouched:t,label:a,children:s,className:r,labelClassName:n,htmlFor:l="",direction:d="vertical","data-selenium":c}){return(0,o.Z)("div",{className:(0,i.AK)("c-form-field",r,{"--vertical":"vertical"===d}),"data-selenium":c},void 0,a?(0,o.Z)("label",{htmlFor:l,className:(0,i.AK)("form-label",n)},void 0,a):null,s,e&&t?(0,o.Z)("p",{className:"form-error"},void 0,e):null)}},rzLk:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var o=a("D4hk"),i=a("sQwH"),s=a("3MRe"),r=a("3Z9q"),n=a("X40V");const l=["message","className","direction"],d=e=>{let{message:t,className:a,direction:d="up"}=e,c=(0,s.Z)(e,l);return r.createElement("a",(0,o.Z)({target:"_blank",rel:"noopener noreferrer",className:(0,n.AK)("help","fa-regular","fa-question-circle",a)},c),(0,i.Z)("span",{className:`tooltip tooltip-${d}`},void 0,t))}},GKm7:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var o=a("D4hk"),i=a("3MRe"),s=a("3Z9q"),r=a("X40V");const n=["children","className","type","center"],l=e=>{let{children:t,className:a,type:l,center:d=!1}=e,c=(0,i.Z)(e,n);const p=`--${l}`;return s.createElement("div",(0,o.Z)({},c,{className:(0,r.AK)("c-message",a,p,{"--center":d})}),t)}},"ZZB/":(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var o,i=a("sQwH"),s=a("3Z9q"),r=a("XxrW");const n=({visibility:e,withDraftFlag:t=!1,isPublished:a})=>t&&!a?o||(o=(0,i.Z)("span",{className:"flag --draft"})):e&&["protected","private"].includes(e)?(0,i.Z)(s.Fragment,{},void 0,(0,i.Z)("i",{className:`model-name__icon fa-regular fa-${"protected"===e?"lock-keyhole":"eye-slash"} --${e}`})):null,l=({model:e,target:t="",clickable:a=!0,className:o="",iconsSide:s="left",withDraftFlag:l=!1})=>(0,i.Z)("div",{className:`model-name c-model-name ${o}`},void 0,"left"===s?(0,i.Z)(n,{visibility:e.visibility,withDraftFlag:l,isPublished:null==e?void 0:e.isPublished}):null,a?(0,i.Z)(r.Z,{className:"model-name__label",model:e,target:t,title:e.name},void 0,e.name):(0,i.Z)("span",{className:"model-name__label",itemProp:"name"},void 0,e.name),"right"===s?(0,i.Z)(n,{visibility:e.visibility,withDraftFlag:l,isPublished:e.isPublished}):null),d=s.memo(l)},XxrW:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m,r:()=>u});var o=a("sQwH"),i=a("D4hk"),s=a("3MRe"),r=a("3Z9q"),n=a("R2Pi"),l=a("5hHH");const d=["model","children","suffix"],{Consumer:c,Provider:p}=r.createContext([]),u=p,m=e=>{let{model:t,children:a,suffix:p=""}=e,u=(0,s.Z)(e,d);return(0,o.Z)(c,{},void 0,(e=>r.createElement("a",(0,i.Z)({},u,{href:t.viewerUrl+p,onClick:a=>{const o=a.ctrlKey||a.metaKey;!e||o||n.default.any||(a.preventDefault(),a.stopPropagation(),l.Z.push((t.viewerUrl+p).replace(window.location.origin,"").replace(/^\//,""),{playlist:e}))}}),a)))}},UhZI:(e,t,a)=>{"use strict";a.d(t,{F:()=>l});var o,i,s=a("sQwH"),r=a("3Z9q"),n=a("0qif");const l=e=>r.createElement("div",e,o||(o=(0,s.Z)("strong",{},void 0,"Note:"))," The NoAI meta tag will not be applied to Creative 
1Commons-licensed models because NoAI tagging"," ",i||(i=(0,s.Z)("a",{href:"https://creativecommons.org/faq/#what-if-i-have-received-cc-licensed-material-with-additional-restrictions",target:"_blank",rel:"nofollow noopener noreferrer",className:"skfb-link"},void 0,"may not be compatible with CC licenses."))," ","You can use the Free Standard license for your downloadable models."," ",(0,s.Z)("a",{className:"skfb-link",href:(0,n.F)("LICENSES"),target:"_blank",rel:"noopener noreferrer"},void 0,"Learn more"))},yd36:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});var o,i,s=a("sQwH"),r=(a("3Z9q"),a("X40V"));function n({className:e,type:t="viewer"}){return(0,s.Z)("div",{"data-selenium":"processing-placeholder",className:(0,r.AK)("c-processing-viewer-placeholder",e,`--${t}`)},void 0,o||(o=(0,s.Z)("svg",{className:"c-processing-viewer-placeholder__logo",viewBox:"0 0 36 42"},void 0,(0,s.Z)("g",{fill:"none",fillRule:"evenodd"},void 0,(0,s.Z)("path",{d:"M20 42V24.5L36 15v17.5L20 42zM0 15l15.5 9.5V42L0 32.5V15zm35-5L18 20.5 1 10 18 0l17 10z",fill:"#DBE3F4",fillRule:"nonzero"}),(0,s.Z)("path",{d:"M-12-9h60v60h-60z"})))),i||(i=(0,s.Z)("div",{className:"c-processing-viewer-placeholder__loader"})))}},UQ3Q:(e,t,a)=>{"use strict";a.d(t,{Z:()=>j,I:()=>F});var o=a("sQwH"),i=a("NQ1V"),s=a("Bpah"),r=a("3Z9q"),n=a("VDcQ"),l=a("MB/E"),d=a("LLYa"),c=a("7txH"),p=a("MjD7"),u=a("gyKT"),m=a("k3DV"),v=a("RyS8"),g=a("e1Pq");var h,f,Z,b,w,y,_,N=a("pLUK"),D=a("vkRz"),k=a("ZGp8"),C=a("fBod"),O=a("zIQK"),P=a("h9M4"),T=a("V29b"),E=a("pgZm"),A=a("0qif"),x=a("N+9a");function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function L(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?S(Object(a),!0).forEach((function(t){(0,i.Z)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):S(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}const F=(e,t=(()=>{}))=>{const{Popups:a}=(0,g.Z)(),o=(0,T.Z)().list.filter((e=>(0,E.oF)(e.role,"contributor"))).length>0&&!e.org;return{showTransferOption:o,canTransfer:o&&"store"!==e.downloadType,openModelTransferPopup:(0,N.Z)(r.useCallback((()=>a.loadModelTransferPopup().then((a=>new a({model:e,onTransferModelSuccess:t}).open()))),[e,t,a]))}};const j=function({model:e,direction:t,className:a,withProperties:i=!0,withPublish:T=!0,with3DSettings:E=!0,onTransferModelSuccess:S=(()=>{}),onDeleteModelSuccess:j=(()=>{}),onDeleteModelError:R=(e=>{throw e})}){const M=(0,n.v9)(l.wl.authUser.user),U=(0,n.I0)(),{Popups:I}=(0,g.Z)(),V=r.useCallback((()=>{U(P.Nw.update({models:[e]})),U(l.Nw.models.tryPublish(e.uid))}),[e.uid,U]),z=r.useCallback((e=>{(0,c.Z)()||(e.preventDefault(),(new k.Z).open())}),[]),K=r.useCallback((()=>I.openAddToCollectionPopup(new s.Z(e))),[e,I]),$=(0,D.Z)(e),B=(0,m.Z)(e),q=r.useCallback((()=>{(0,C.loadReportPopup)().then((t=>{new t({model:new s.Z(e)})}))}),[e]),Q=(0,N.Z)(r.useCallback((()=>I.openDownloadPopup(e)),[e,I])),{showTransferOption:G,canTransfer:H,openModelTransferPopup:Y}=F(e,S),W=(e=>{const{Api:t,Popups:a}=(0,g.Z)();return r.useCallback((async()=>{const o=await t.getModelManagement(e.uid);a.loadDownloadOwnModelPopup().then((t=>new t({model:new s.Z(e),archivesDetails:o.archivesDetails}).open())).catch((0,v.KQ)(v.ud))}),[t,a,e])})(e),X=(0,d.Ov)("pro",e)||M.isStaff,[J,ee]=(0,d.nR)(e);return(0,o.Z)(p.ZP,{className:a,direction:t},void 0,(0,d.ON)(e)?(0,o.Z)(r.Fragment,{},void 0,2===e.processingStatus&&!e.publishedAt&&T&&(0,d.qS)(e,L(L({},e),{},{isPublished:!0}),M)&&(0,o.Z)(r.Fragment,{},void 0,(0,o.Z)(p.Lz,{name:"Publish",onClick:V}),h||(h=(0,o.Z)(p.Z0,{}))),2===e.processingStatus&&(0,o.Z)(r.Fragment,{},void 0,i&&(0,o.Z)(p.Lz,{name:"Properties",navigate:{to:J,params:ee},iconClassName:"fa-gear"}),E&&(0,o.Z)(p.Lz,{name:"3D settings",href:e.editorUrl,onClick:z,className:"download-own-model",iconClassName:"fa-sliders"}),e.publishedAt&&(0,o.Z)(p.Lz,{name:"Add to collection",onClick:K,iconClassName:"fa-table"}),e.user.uid!==M.uid&&(0,d.Rn)(M,e)&&(0,o.Z)(p.Lz,{name:"Download",onClick:Q,iconClassName:"fa-arrow-down-to-bracket"}),f||(f=(0,o.Z)(p.Z0,{}))),e.user.uid===M.uid&&e.isPublished?(0,o.Z)(r.Fragment,{},void 0,(0,o.Z)(p.Lz,{name:"Download",onClick:W,disabled:!X,className:"download-own-model",iconClassName:"fa-arrow-down-to-bracket"},void 0,X?null:Z||(Z=(0,o.Z)(x.Z,{to:"pages:plans",className:"help fa-regular fa-question-circle"},void 0,(0,o.Z)(O.Z,{text:"Pro members and above can download all their own models, even when they are not allowed to be downloaded publicly"})))),b||(b=(0,o.Z)(p.Z0,{}))):null,e.processingStatus>1&&(0,o.Z)(r.Fragment,{},void 0,(0,o.Z)(p.Lz,{name:"Reupload",onClick:$,"data-selenium":"open-reupload-popup",iconClassName:"fa-arrow-up-from-bracket"}),(0,o.Z)(u.Z,{model:e}
1,void 0,(({canDuplicate:e,duplicate:t})=>(0,o.Z)(p.Lz,{name:e?"Duplicate":w||(w=(0,o.Z)("span",{},void 0,"Duplicate"," ",(0,o.Z)("span",{className:"flag --pro"},void 0,"pro"))),onClick:t,disabled:!e,"data-selenium":"open-reupload-popup",iconClassName:"fa-copy"}))),G?(0,o.Z)(p.Lz,{name:"Transfer",onClick:Y,iconClassName:"fa-exchange","data-selenium":"open-transfer-popup",disabled:!H},void 0,H?null:(0,o.Z)("a",{className:"help fa-regular fa-question-circle",href:(0,A.F)("TRANSFERRING_A_MODEL_TO_AN_ORG"),target:"_blank",rel:"noopener noreferrer"},void 0,y||(y=(0,o.Z)(O.Z,{text:(0,o.Z)("span",{},void 0,"Transfer is not possible ",(0,o.Z)("u",{},void 0,"Why ?"))})))):null,(0,o.Z)(p.Lz,{name:"Delete",className:"--red",onClick:()=>B().then(j,R),"data-selenium":"delete-model",iconClassName:"fa-trash-can"}),_||(_=(0,o.Z)(p.Z0,{})))):null,(0,o.Z)(p.Lz,{name:"Report an issue",onClick:q,iconClassName:"fa-flag"}))}},MjD7:(e,t,a)=>{"use strict";a.d(t,{Lz:()=>g,Z0:()=>h,ZP:()=>f});var o,i=a("D4hk"),s=a("NQ1V"),r=a("3MRe"),n=a("sQwH"),l=a("MndH"),d=a("3Z9q"),c=a("X40V"),p=a("N+9a");const u=["name","className","children","disabled","iconClassName"];function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}const v=({iconClassName:e,name:t})=>(0,n.Z)(d.Fragment,{},void 0,e?(0,n.Z)("i",{className:(0,c.AK)("quicksettings-icon fa-regular",e)}):null,t),g=e=>{let{name:t,className:a,children:o,disabled:g=!1,iconClassName:h=""}=e,f=(0,r.Z)(e,u);const Z=(0,n.Z)(v,{iconClassName:h,name:t}),b=(0,c.AK)("quicksettings-item",a,{disabled:g}),w=function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?m(Object(a),!0).forEach((function(t){(0,s.Z)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):m(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},(0,l.Z)(f,["to","params","queryParams","hash","onClick","href"]));return"href"in f?d.createElement("li",w,(0,n.Z)(p.Z,{className:b,href:f.href,disabled:g},void 0,Z),o):"navigate"in f?d.createElement("li",w,d.createElement(p.Z,(0,i.Z)({},f.navigate,{className:b,disabled:g}),Z),o):d.createElement("li",w,(0,n.Z)("div",{className:b,role:"button",onClick:g?void 0:f.onClick},void 0,Z),o)},h=()=>o||(o=(0,n.Z)("li",{className:"separator"})),f=({children:e,direction:t,className:a})=>(0,n.Z)("ul",{className:(0,c.AK)("hover-menu","quicksettings","corner",t?`--${t}`:"",a)},void 0,e)},KGKI:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var o=a("D4hk"),i=a("sQwH"),s=a("3MRe"),r=a("3Z9q"),n=a("X40V");const l=["onChange","value","name","disabled","className","data-selenium","checked","children"],d=e=>{let{onChange:t,value:a,name:d="",disabled:c=!1,className:p,"data-selenium":u,checked:m=a,children:v}=e,g=(0,s.Z)(e,l);return r.createElement("div",(0,o.Z)({onClick:e=>{c||(e.preventDefault(),t(!a))},className:(0,n.AK)(p,"form-onoff-wrapper",{"--checked":m}),"data-selenium":`switch-${u}`},g),(0,i.Z)("input",{className:"form-onoff",type:"checkbox","data-ref":"input",checked:m,onChange:e=>t(e.target.checked)}),(0,i.Z)("label",{className:(0,n.AK)({"form-onoff-actor":!0,disabled:c}),htmlFor:d}),(0,i.Z)("div",{className:(0,n.AK)("form-onoff__label",{"--disabled":c})},void 0,v))}},TlsM:(e,t,a)=>{"use strict";a.d(t,{ZP:()=>y,gb:()=>b,km:()=>w,mX:()=>Z});var o,i,s,r,n=a("sQwH"),l=a("3Z9q"),d=a("VDcQ"),c=a("MB/E"),p=a("iu9k"),u=a("TUor"),m=a("vAnt"),v=a("rzLk"),g=a("GKm7"),h=a("0qif");const f=({viewOnlyLimit:e})=>{const t=(0,h.F)("UPLOAD_LIMITS");return(0,n.Z)(v.Z,{className:"c-view-only-limit__understand-limits",direction:"up",message:"unlimited"===e.type?"Learn more about the credit system":(0,n.Z)(l.Fragment,{},void 0,"Your monthly limit will reset on"," ",(0,n.Z)("strong",{},void 0,(0,u.p6)(e.renews_at,"MMM Do")),".",o||(o=(0,n.Z)("br",{})),"Click to learn more about the credit system."),href:t})},Z=({children:e,urlRef:t,className:a})=>{const o={ref:t};return(0,n.Z)("a",{className:a,href:(0,p.HQ)("pages:plans",{},o)},void 0,e)},b=({text:e})=>
1(0,n.Z)("span",{className:"help c-view-only-limit__view-only-tooltip"},void 0,(0,n.Z)("span",{className:"c-view-only-limit__dotted"},void 0,e),(0,n.Z)("span",{className:"tooltip tooltip-up",style:{width:220}},void 0,"A model that is downloadable doesn't count against this limit.")),w=({viewOnlyLimit:e})=>(0,n.Z)("p",{className:"c-view-only-limit__left"},void 0,"unlimited"===e.type?i||(i=(0,n.Z)(l.Fragment,{},void 0,"You can upload an unlimited number of models.")):(0,n.Z)(l.Fragment,{},void 0,e.remaining," ",(0,n.Z)(b,{text:"upload credit"+(1===e.remaining?"":"s")})," ","left")," ",(0,n.Z)(f,{viewOnlyLimit:e})),y=({isPublished:e})=>{const t=(0,d.v9)((e=>c.wl.authUser.user(e)));if(!t.viewOnlyLimit||"unlimited"===t.viewOnlyLimit.type)return null;const{viewOnlyLimit:a}=t;return(0,n.Z)(g.Z,{center:!0,type:a.remaining?"warning":"error"},void 0,(0,n.Z)(l.Fragment,{},void 0,(0,n.Z)("strong",{},void 0,(0,n.Z)(w,{viewOnlyLimit:a})),a.remaining?s||(s=(0,n.Z)(l.Fragment,{},void 0,(0,n.Z)("p",{},void 0,"Models set to downloadable do not count towards your upload limit."),(0,n.Z)("p",{},void 0,(0,n.Z)(Z,{urlRef:"manage_model"},void 0,"Upgrade to increase your limit")))):(0,n.Z)(l.Fragment,{},void 0,(0,n.Z)("p",{},void 0,e?"To make this model not publicly downloadable":"To publish this model",", you must wait until"," ",(0,n.Z)("strong",{},void 0,(o=a.renews_at,Math.abs(Date.now()-new Date(o).getTime())<864e5?`today at ${(0,u.p6)(a.renews_at,"h:mm A")}`:(0,u.p6)(a.renews_at,"MMM Do"))),", set it to downloadable or upgrade your account."),r||(r=(0,n.Z)("p",{},void 0,(0,n.Z)(Z,{urlRef:"manage_model"},void 0,(0,n.Z)(m.Z,{size:"small",type:"important",text:"upgrade your account"})))))));var o}},gyKT:(e,t,a)=>{"use strict";a.d(t,{Z:()=>D});var o,i=a("NQ1V"),s=a("sQwH"),r=a("ULsr"),n=a("3Z9q"),l=a("jQKg"),d=a("fBod"),c=a("MB/E"),p=a("xovo"),u=a("LLYa"),m=a("RyS8"),v=a("lrhy"),g=a("iu9k"),h=a("1nxQ"),f=a("vAnt"),Z=a("l1Cg"),b=a("A2i4"),w=a("ZZB/"),y=a("Oyie");const _=(0,r.Z)(f.Z),N=({model:e})=>(0,s.Z)("div",{className:"c-duplicate-model-container__loading-popup"},void 0,o||(o=(0,s.Z)(Z.Z,{type:"small"})),(0,s.Z)(b.ZP,{alt:`Thumbnail for ${e.name} 3D model`,images:e.thumbnails,width:100,height:56.25}),(0,s.Z)(w.Z,{model:e}));class D extends n.Component{constructor(e){super(e),(0,i.Z)(this,"popup",void 0),(0,i.Z)(this,"canDuplicate",(()=>this.props.model.processingStatus===p.JD.SUCCEEDED&&(0,u.Ov)("pro",this.props.model))),(0,i.Z)(this,"duplicate",(()=>this.canDuplicate()?l.Z.duplicateModel(this.props.model.uid).then((({model:{uid:e}})=>((0,d.loadMessagePopup)().then((e=>(this.popup=new e({title:"Your model is being duplicated.",children:{viewClass:(0,r.Z)(N),options:{model:this.props.model}}}),this.popup.open(),this.popup))),this.pollDuplicatedModelStatus(e).then((()=>l.Z.getModel(e).then((async t=>{var a,o;await c.n2.store.dispatch(c.Nw.entities.update({models:[t]})),null===(a=(o=this.props).onDuplicate)||void 0===a||a.call(o,t),this.popup.close(),this.openDuplicationSucceededPopup(e)})))).catch((e=>{throw this.popup.close(),e}))))).catch((e=>(console.error(e),this.openDuplicationFailedPopup(),y.resolve()))):y.resolve())),(0,i.Z)(this,"pollDuplicatedModelStatus",(e=>l.Z.getModelStatus(e).then((t=>["FAILED","SUCCEEDED"].includes(t.processing)?"FAILED"===t.processing?y.reject(t.processing):y.resolve(t.processing):(0,v.gw)(2e3).then((()=>this.pollDuplicatedModelStatus(e))))))),(0,i.Z)(this,"openDuplicationFailedPopup",(()=>(0,d.loadMessagePopup)().then((e=>new e({title:"Duplication failed",html:"\n                <p>The duplication of your model <strong>failed</strong>.</p>\n            ",renderButtons:e=>[{viewClass:_,options:{text:"cancel",key:"cancel",type:"tertiary",onClick:()=>e.cancel()}},{viewClass:_,options:{text:"retry",key:"retry",type:"primary",onClick:()=>{e.continue(),this.duplicate()}}}]}).open().catch((0,m.KQ)(m.ud)))))),(0,i.Z)(this,"openDuplicationSucceededPopup",(e=>(0,d.loadMessagePopup)().then((t=>new t({title:"Model Duplicated",shouldRejectOnCancel:!0,html:(0,h.Nw)(`\n                <p>\n                    <span>Your model </span>\n                    <strong>“${this.props.model.name}”</strong>
1\n                    <span> has been succesfully duplicated!</span>\n                </p>\n            `),width:560,renderButtons:e=>[{viewClass:_,options:{type:"tertiary",text:"close",key:"cancel",onClick:()=>e.cancel()}},{viewClass:_,options:{type:"primary",text:"go to the duplicated model",key:"continue",onClick:()=>e.continue()}}]}).open().then((()=>{const t={uid:e,org:this.props.model.org,slug:""},[a,o]=t.org?(0,u.IL)(t):(0,u.U3)(t);window.location.assign((0,g.HQ)(a,o))})).catch((0,m.KQ)(m.ud)))))),this.duplicate=v.iB(this.duplicate.bind(this))}render(){return this.props.children({canDuplicate:this.canDuplicate(),duplicate:this.duplicate.bind(this)})}}},l9Gv:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var o=a("NQ1V"),i=a("3Z9q");class s extends i.Component{constructor(...e){super(...e),(0,o.Z)(this,"state",{isMounted:!1})}componentDidMount(){this.setState({isMounted:!0})}render(){return(this.state.isMounted?this.props.children():this.props.fallback)||null}}},"2bV5":(e,t,a)=>{"use strict";a.d(t,{Q:()=>s});var o=a("3Z9q"),i=a("e1Pq");const s=(e,t)=>{const{Popups:a}=(0,i.Z)();return o.useCallback((()=>a.loadCreateProjectPopup().then((a=>new a({orgUid:e,onProjectCreated:t}).open()))),[e,t,a])}},V29b:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});var o=a("3Z9q"),i=a("MB/E"),s=a("VDcQ"),r=a("ajs0");const n=()=>{const e=(0,s.v9)(i.wl.authUser.user),t=(0,r.Z)((({Api:e},t)=>e.getCurrentUserMemberships(t)),[e.uid]);return o.useEffect((()=>{t.onLoadFirst()}),[e.uid]),t}},hk5G:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var o=a("lrhy"),i=a("3Z9q"),s=a("HPk7"),r=a("Cgfs"),n=a("pLUK"),l=a("Oyie");const d=(e,t,a=[],d=window)=>{const c=i.useRef(1/0),p=(0,n.Z)(i.useCallback((()=>{return((e=d)===window?window.scrollY:e.scrollTop)>c.current?t().then((()=>(0,o.gw)(300))):l.resolve();var e}),[d,...a]));i.useEffect((()=>{if(d){const e=(0,s.Z)(p,200);return d.addEventListener("scroll",e,{passive:!0}),()=>{d.removeEventListener("scroll",e)}}}),[d,p]);const u=i.useMemo((()=>(0,r.Z)((()=>{if(!e.current)return;const t=d?(a=d)===window?document.documentElement.scrollHeight:a.scrollHeight:0;var a;const o=t-(e.current.offsetTop+e.current.offsetHeight);c.current=t-(o+2*window.innerHeight)}),100)),[d,e]);i.useEffect((()=>(u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u))))}},TC9H:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var o=a("3Z9q"),i=a("olZw");function s(e,t){o.useEffect((()=>{if(!e.current)return;const t=Array.prototype.slice.call(e.current.getElementsByClassName("lazyload"));for(const e of t){if(!(e instanceof HTMLElement))break;(0,i.S)(e)}}),t)}},vkRz:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});var o=a("3Z9q"),i=a("Bpah"),s=a("RyS8"),r=a("VDcQ"),n=a("MB/E"),l=a("LLYa"),d=a("e1Pq");function c(e){const t=(0,r.v9)(n.wl.authUser.canAccessFeature("ff_read_only_mode")),{Api:a,Popups:c}=(0,d.Z)();return o.useCallback((async()=>{if(t)c.openMaintenancePopup("Sketchfab is undergoing maintenance. Reuploading models is currently disabled.");else{const t=(0,l.aI)(e)?e:await a.getModel(e.uid);c.loadUploadPopup().then((a=>new a({org:e.org,project:e.orgProject,model:new i.Z(t)}).open())).catch((0,s.KQ)(s.ud))}}),[e,t,a,c])}},R276:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var o=a("NQ1V"),i=a("3Z9q"),s=a("HGbS"),r=a("BR/Y");function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function l(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?n(Object(a),!0).forEach((function(t){(0,o.Z)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}const d=(e,t,a,o)=>{const n=i.useMemo((()=>o?{value:o}:{value:{}}),[o]),[d,c]=(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},n);return i.useEffect((()=>{const t=(0,s.GZ)({type:"RUN",payload:{effect:e}});c(t)}),a),[d.value,d.loading]}},FbSi:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});var o=a("3Z9q"),i=a("VDcQ"),s=a("MB/E"),r=a("e1Pq");const n=e=>{const{Api:t}=(0,r.Z)(),a=(0,i.v9)(s.wl.authUser.getOrgRole(e)).caseOf({None:()=>{},Some:e=>e}),[n,l]=o.useState("spectator");return o.useEffect((()=>{e&&(a?l(a):t.getCurrentUserOrgMember(e).then((e=>l(e.role))))}),[t,a,e,n]),n}},LH8s:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var o,i=a("sQwH"),s=(a("3Z9q"),a("TUor")),r=a("343j"),n=a("X40V");const l=({model:e,className:t})=>(0,i.Z)("div",{className:(0,n.AK)(r.Z.view,t)},void 0,o||(o=(0,i.Z)("i",{className:"icon fa-regular fa-exclamation-triangle"})),(0,i.Z)("div",{},void 0,"This draft will be automatically"," ",(0,i.Z)("strong",{},void 0,`deleted on ${(0,s.ai)(e.createdAt)}`)," unless you publish it."))},aZj5:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var o,i,s,r,n=a("sQwH");a("3Z9q");function l({onBack:e,onClose:t}){return(0,n.Z)("header",{className:"c-model-properties__header"},void 0,e?(0,n.Z)("a",{className:"c-model-properties__header-back skfb-link","data-selenium":"properties-back",onClick:()=>e()},void 0,o||(o=(0,n.Z)("i",{className:"fa-regular fa-chevron-left"})),i||(i=(0,n.Z)("span",{className:"c-model-properties__header-back__text"}
1,void 0,"Back"))):null,s||(s=(0,n.Z)("h1",{className:"c-model-properties__header-title"},void 0,"Edit model")),t?(0,n.Z)("div",{className:"c-model-properties__close"},void 0,(0,n.Z)("a",{"aria-label":"Close popup","data-selenium":"close-popup",className:"c-model-properties__close-icon",onClick:t},void 0,r||(r=(0,n.Z)("i",{className:"fa-regular fa-times"})))):null)}},NDtu:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var o,i=a("sQwH"),s=a("Hjnd"),r=a.n(s),n=a("3Z9q"),l=a("R276"),d=a("e1Pq"),c=a("X40V"),p=a("Oyie");function u({value:e,orgUid:t,onChange:s,"data-selenium":u}){const m=n.useRef(null),[v,g]=n.useState(""),[h,f]=n.useState(!1),{Api:Z}=(0,d.Z)(),[b]=(0,l.Z)((({Api:e})=>t?p.resolve([]):e.getTagSuggestions().then((({results:e})=>e))),[],[]),w=n.useCallback((()=>s(e.slice(0,e.length-1))),[s,e]),y=n.useCallback((t=>s(e.filter((e=>e!==t)))),[s,e]),_=n.useCallback((t=>{s(!t.length||!t[0]||t[0]&&e.includes(t[0])?e:[...e,...t])}),[s,e]),N=n.useCallback((t=>{const a=t.target.value.split(/[\s,]+/),o=a.pop(),i=[...new Set(a)].filter((t=>!e.includes(t)&&t.length<48));_(i),g(o||"")}),[_,e]),D=n.useCallback((e=>{("Enter"===e.key||","===e.key||" "===e.key)&&m.current&&m.current.value&&m.current.value.length<48&&(e.preventDefault(),_([m.current.value]),g("")),"Backspace"===e.key&&m.current&&!m.current.value&&w()}),[_,w]),k=n.useRef(N);n.useEffect((()=>{k.current=N}),[N]),n.useEffect((()=>{m.current&&a.e(5271).then(a.t.bind(a,"KcXp",23)).then((()=>{r()(m.current).textcomplete([{match:/\b([\w-]{2,})$/,search:async(e,a)=>{const{results:o}=t?await Z.getTagOrgAutocomplete(t,e):await Z.getTagAutocomplete(e);a(o)},replace:e=>`${e} `,index:1}],{debounce:300}).on("change",(e=>{k.current(e)}))}))}),[]);const C=n.useMemo((()=>[...new Set(b)].filter((t=>!e.includes(t)))),[b,e]);return(0,i.Z)("div",{className:"c-tag-input"},void 0,(0,i.Z)("div",{className:(0,c.AK)("form-input","--border",{focused:h})},void 0,e.map((e=>(0,i.Z)("div",{className:"c-tag-input__tag",onClick:()=>y(e)},e,(0,i.Z)("div",{className:"c-tag-input__tag-text"},void 0,e),o||(o=(0,i.Z)("i",{className:"icon fa-regular fa-close"}))))),n.createElement("textarea",{className:"c-tag-input__textarea",ref:m,value:v,onChange:N,onKeyDown:D,onFocus:()=>f(!0),onBlur:()=>f(!1),placeholder:e.length?"Add another":"Add tags","data-selenium":u})),C.length?(0,i.Z)("p",{className:"c-tag-input__suggestions"},void 0,"Suggested tags:"," ",C.map(((e,t)=>(0,i.Z)(n.Fragment,{},e,t?", ":null,(0,i.Z)("span",{className:"skfb-link",onClick:()=>_([e])},void 0,e))))):null)}},"h6/O":(e,t,a)=>{"use strict";a.d(t,{Z:()=>ma});var o=a("D4hk"),i=a("NQ1V"),s=a("3MRe"),r=a("sQwH"),n=a("3Z9q"),l=a("VDcQ"),d=a("5hHH"),c=a("MB/E"),p=a("LLYa"),u=a("X40V"),m=a("RyS8"),v=a("pgZm"),g=a("1nxQ"),h=a("hDfq"),f=a("vAnt"),Z=a("MndH");function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function w(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?b(Object(a),!0).forEach((function(t){(0,i.Z)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):b(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}const y=e=>String(e?(e/100).toFixed(2):""),_=e=>Math.round(100*Number(e)||0),N=(e,t)=>Boolean(!e&&t||e&&!t||e&&t&&(e.name!==t.name||e.size!==t.size)),D=(e,t)=>w(w({},(0,Z.Z)(e,["license","price"])),{},{downloadType:t.downloadType}),k=(e,t,a)=>(0,p.wo)(t,a)&&e.viewOnlyLimit&&"limited"===e.viewOnlyLimit.type,C=(e,t)=>"no"!==e&&"should_reprocess"===t.downloadStatus||"store"===e&&!t.hasStats&&"archives_broken"!==t.downloadStatus,O=e=>t=>C(t,e)?"Your model needs to be reprocessed.":"",P=e=>t=>"store"===t&&[null,"skfb_revoked","not_a_seller"].includes(e.sellerStatus)?"You can not sell models on the Store anymore":"",T=(e,t)=>(a,o)=>{if(!k(e,t,D(t,o)))return"";const i=e.viewOnlyLimit&&"limited"===e.viewOnlyLimit.type&&!e.viewOnlyLimit.remaining;return"no"===a&&i?"non-downloadable uploads limit reached":""};var E=a("h4jM"),A=a("Q0AI"),x=a("V4X4"),S=a("e1Pq"),L=a("i2hM"),F=a("TC9H");function j(e){const t=n.useRef(e);return n.useEffect((()=>{t.current=e}),[e]),t}var R=a("Oyie");const M=function({className:e,value:t,label:i,onChange:s,selectedTab:l,onTabChange:d,textAreaProps:c,maxLength:p=1024,generateMarkdownPreview:m}){const v=n.useRef(null),g=n.useRef(null),[h,f]=n.useState(!0),Z=n.useRef(null),[b,w]=n.useState(null),[y,_]=n.useState("");n.useLayoutEffect((()=>{v.current&&(v.current.value=t)}),[t]),n.useLayoutEffect((()=>{Z.current&&b&&Z.current.appendChild(b)}),[b]);const N=j(s),D=j(p);n.useEffect((()=>{f(!0),R.all([a.e(5189).then(a.t.bind(a,"Fi04",23)),a.e(5189).then(a.t.bind(a,"ExF7",23)),a.e(5189).then(a.t.bind(a,"eNCp",23))]).then((([e])=>{const t=e.default.fromTextArea(v.current,{mode:"gfm",theme:"neo",highlightFormatting:!0,lineWrapping:!0,extraKeys:L.Z.getShortcuts(),screenReaderLabel:i});L.Z.setEditor(t),w(L.Z.initializeToolbar({})),f(!1),t.on("change",(e=>{e.getTextArea().value=e.getValue(),N.current(e.getValue())}))}))}),[]);const k=()=>{f(!0),_("<div>Loading preview...</div>");const e=L.Z.getMarkdownEditorValue()||(v.current?v.current.value:"");(e?m(e):R.resolve("")).then((e=>{f(!1),_(e)}))};return(0,F.Z)(g),(0,r.Z)("div",{className:(0,u.AK)("c-markdown-editor",e,{"--preview":"preview"===l,"--edit":"edit"===l})},void 0,(0,r.Z)("div",{className:"c-markdown-editor__header"},void 0,n.createElement("div",{className:"c-markdown-editor__toolbar",ref:Z}),(0,r.Z)("div",{className:"c-markdown-editor__right"},void 0,(0,r.Z)("div",{className:"c-markdown-editor__tab-buttons"},void 0,(0,r.Z)("button",{onClick:()=>d("edit"),className:(0,u.AK)("edit",{"--selected":"edit"===l})},void 0,"edit"),(0,r.Z)("button",{onClick:()=>{d("preview"),k()},className:(0,u.AK)("preview",{"--selected":"preview"===l})},void 0,"preview")))),(0,r.Z)("div",{className:"c-markdown-editor__textarea-container"},void 0,n.createElement("textarea",(0,o.Z)({},c,{ref:v,className:(0,u.AK)("c-markdown-editor__textarea",{"--loading-editor":h}),maxLength:1024,"aria-label":i,value:t,onChange:e=>s(e.target.value)}))),n.createElement("div",{className:(0,u.AK)("c-markdown-editor__rendered","markdown-rendered-content"),ref:g,dangerouslySetInnerHTML:{__html:y}}),(0,r.Z)("p",{className:"c-markdown-editor__chars-count"},void 0,(0,r.Z)("span",{className:(0,u.AK)("count",{"--error":t.length>1024})},void 0,D.current-t.length)))};function U(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function I(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};
1t%2?U(Object(a),!0).forEach((function(t){(0,i.Z)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):U(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function V({value:e,onChange:t,onBlur:a,error:o,isTouched:i,label:s,className:l,textAreaProps:d={}}){const[c,p]=n.useState("edit"),[m,v]=n.useState(!1),{Api:g}=(0,S.Z)(),h=Boolean(o&&i);return(0,r.Z)(M,{className:(0,u.AK)(l,{"--error":h,"--focus":m}),value:e,onChange:t,selectedTab:c,onTabChange:p,label:s,textAreaProps:I(I({},d),{},{onFocus:()=>{v(!0)},onBlur:e=>{v(!1),a(e)}}),generateMarkdownPreview:e=>g.getMarkdownPreview(e).then((({result:e})=>e)).catch((()=>"Failed to load preview"))})}var z=a("yd36"),K=a("e+fc"),$=a("xtQ3");var B,q=a("R276"),Q=a("c2Jd"),G=a("kN3w"),H=a("p5Lb"),Y=a("0qif");function W({form:e}){const t=(e=>10+(0,H.zy)([0,20],[0,20],e.description.length)+(0,H.zy)([20,100],[0,20],e.description.length)+(e.categories.length>=1?25:0)+(e.tags.length>=2?25:0))(e);return(0,r.Z)("div",{className:"c-discoverability"},void 0,(0,r.Z)("label",{className:"c-model-properties__label"},void 0,"Discoverability"," ",(0,r.Z)("span",{className:"c-model-properties__thumb-up"},void 0,100===t?"👍":"")),(0,r.Z)("div",{className:"progression small"},void 0,(0,r.Z)("div",{className:"progressbar"},void 0,(0,r.Z)("div",{className:(0,u.AK)("status",t<20?"status-danger":t>=30&&t<70?"status-warning":t>=70?"status-success":null),style:{width:`${t}%`}}))),B||(B=(0,r.Z)("p",{},void 0,"Write a good description, add categories and tags to help your model get discovered.")),(0,r.Z)("p",{},void 0,(0,r.Z)("a",{className:"skfb-link",href:(0,Y.F)("MAKING_YOUR_MODEL_DISCOVERABLE"),target:"_blank",rel:"noreferrer noopener"},void 0,"More tips to get exposure")))}var X,J,ee=a("RI22"),te=a("iu9k");function ae(){const{History:e}=(0,S.Z)();return(0,r.Z)("div",{className:"c-model-download__upgrade"},void 0,X||(X=(0,r.Z)("h2",{className:"c-model-download__title"},void 0,"Unlock conversion & import")),J||(J=(0,r.Z)("div",{className:"c-model-download__contents"},void 0,(0,r.Z)("div",{className:"c-model-download__label"},void 0,(0,r.Z)("i",{className:"icon fa-regular fa-check"}),(0,r.Z)("p",{className:"label_contents"},void 0,"Download your own model")),(0,r.Z)("div",{className:"c-model-download__label"},void 0,(0,r.Z)("i",{className:"icon fa-regular fa-check"}),(0,r.Z)("p",{className:"label_contents"},void 0,"Convert it to glTF & USDZ")),(0,r.Z)("div",{className:"c-model-download__label"},void 0,(0,r.Z)("i",{className:"icon fa-regular fa-check"}),(0,r.Z)("p",{className:"label_contents"},void 0,"Import it into your favorite 3D software")))),(0,r.Z)("div",{className:"c-model-download__action"},void 0,(0,r.Z)(f.Z,{type:"important",size:"large",text:"Upgrade your account",onClick:()=>{e.push((0,te.HQ)("pages:plans"))}})))}var oe=a("KUFO"),ie=a("KGKI"),se=a("GKm7");const re={gltf:"Android",usdz:"iOS"};var ne,le,de,ce,pe=a("Di7Z"),ue=a("rzLk"),me=a("EA64");const ve={gltf:{label:"glTF",description:"(Converted)"},usdz:{label:"USDZ",description:"(Converted AR format)"}},ge={not_published:{type:"inactive",label:"waiting for publish"},source_blocked:{type:"inactive",label:"model undownloable"},Succeeded:{type:"active",label:"converted"},Pending:{type:"pending",label:"converting..."},Processing:{type:"pending",label:"converting..."},Failed:{type:"error",label:"conversion failed"}},he=(e,t)=>e[t.type].label,fe=(e,t)=>e[t.type].description,Ze=({form:e,management:t,model:a})=>{var o;const{archivesDetails:i,downloadStatus:s}=t,l="Your model will be automatically converted to glTF and USDZ formats and made available for AR on Android and iOS.",d=(0,Y.F)("APP_FREE_AR"),c=(0,me.O)(i);return(0,r.Z)("div",{className:"c-enterprise-ar"},void 0,(0,r.Z)("div",{className:(0,u.AK)("c-enterprise-ar__title",{"--arEnabled":e.data.isArEnabled})},void 0,(0,r.Z)("div",{className:"c-enterprise-ar__title__label"},void 0,ne||(ne=(0,r.Z)("p",{className:"title"},void 0,"Allow AR")),(0,r.Z)(ue.Z,{href:d,message:l})),n.createElement(ie.Z,e.fields.isArEnabled)),e.data.isArEnabled?(0,r.Z)(n.Fragment,{},void 0,(0,r.Z)("div",{className:"c-enterprise-ar__contents"},void 0,"not_published"===s||"source_blocked"===s?c.map(((e,t)=>["source","uasset"].includes(e.type)?null:(0,r.Z)(n.Fragment,{},t,(0,r.Z)("div",{className:"c-enterprise-ar__option"},void 0,(0,r.Z)("div",{className:"c-enterprise-ar__type"},void 0,(0,r.Z)("span",{className:"label"},void 0,he(ve,e)," "),(0,r.Z)("span",{className:"description"},void 0,fe(ve,e))),(0,r.Z)("div",{className:"c-enterprise-ar__status"},void 0,(0,r.Z)(oe.Z,{type:ge[s].type,label:ge[s].label}))),le||(le=(0,r.Z)("div",{className:"c-side-settings__separator"}))))):(0,r.Z)("div",{},void 0,function(e){var t="",a="";return e.filter((e=>"source"!==e.type&&"Failed"===e.status)).map((e=>{""===t?(t=e.type,a=re[e.type]):(t=`${t} & ${e.type}`,a=`${a} or ${re[e.type]}`)})),t?(0,r.Z)(se.Z,{center:!0,type:"warning"},void 0,(0,r.Z)("p",{},void 0,(0,r.Z)("strong",{},void 0,"The ",t," conversion failed.")),(0,r.Z)("p",{},void 0,`Your model will not be AR-compatible on ${a}. Read our `,(0,r.Z)("span",{},void 0,(0,r.Z)("a",{href:(0,Y.F)("GLTF_GLB_AND_USDZ"),target:"_blank",rel:"noopener noreferrer"},void 0,"AR guidelines"))," to find out more, or report the issue below.")):null}(c),c.map(((e,t)=>["source","uasset"].includes(e.type)?null:(0,r.Z)(n.Fragment,{},t,(0,r.Z)("div",{className:"c-enterprise-ar__option"},void 0,(0,r.Z)("div",{className:"c-enterprise-ar__type"},void 0,(0,r.Z)("span",{className:"label"},void 0,he(ve,e)," "),(0,r.Z)("span",{className:"description"},void 0,fe(ve,e))),(0,r.Z)("div",{className:"c-enterprise-ar__status"},void 0,e.exists&&e.status?"Failed"===e.status?(0,r.Z)(n.Fragment,{},void 0,(0,r.Z)(oe.Z,{type:ge[e.status].type,label:ge[e.status].label}),o||(o=(0,r.Z)(pe.D,{className:"c-enterprise-ar__report-issues",model:a}))):(0,r.Z)(oe.Z,{type:ge[e.status].type,label:ge[e.status].label}):(0,r.Z)(oe.Z,{type:"informative",label:"unavailable",rightIcon:{classname:"fa-regular fa-question-circle",message:`Model is not compatible with ${ve[e.type].label} feature or conversion has not started yet`,messagePosition:"up"}}))),de||(de=(0,r.Z)("div",{className:"c-side-settings__separator"}))))))),(0,r.Z)("div",{className:"c-enterprise-ar__tips"},void 0,(0,r.Z)("p",{},void 0,l),ce||(ce=(0,r.Z)("p",{},void 0,"Changing 3D settings will re-run conversion.")),(0,r.Z)("p",{},void 0,(0,r.Z)("a",{href:d,target:"_blank",className:"skfb-link",rel:"noopener noreferrer"},void 0,"Learn more here"),"."))):null)};var be,we,ye,_e,Ne,De,ke,Ce,Oe=a("1bEe"),Pe=a("hrlB"),Te=a("XUjw");const Ee=({downloadType:e})=>(0,r.Z)(se.Z,{center:!0,type:"warning",className:"c-model-management-download__column"},void 0,(0,r.Z)("p",{},void 0,"The model needs to be reprocessed to"," ","store"===e?"appear in the Store":"be downloadable","."),be||(be=(0,r.Z)("p",{},void 0,(0,r.Z)("strong",{},void 0,"This can change how the model is rendered"),". Please check the model once it has been re-processed.")),(0,r.Z)("p",{},void 0,(0,r.Z)("a",{className:"skfb-link",target:"_blank",rel:"noopener noreferrer",href:(0,Y.F)("REPROCESSING_YOUR_MODELS_FOR_SALE")},void 0,"Learn more"))),Ae=()=>we||(we=(0,r.Z)(se.Z,{center:!0,type:"warning"},void 0,(0,r.Z)("p",{},void 0,"We are preparing your model so it can be downloaded."),(0,r.Z)("p",{},void 0,(0,r.Z)("strong",{},void 0,"This may take a few minutes.")),(0,r.Z)("p",{},void 0,(0,r.Z)("span",{className:"spinner-small --centered"})))),xe=()=>ye||(ye=(0,r.Z)(se.Z,{center:!0,type:"error",className:"c-model-management-download__column"},void 0,(0,r.Z)("p",{},void 0,(0,r.Z)("strong",{},void 0,"An error occured while preparing your download.")),(0,r.Z)("p",{},void 0,"Your model won't appear as downloadable."),(0,r.Z)("p",{},void 0,"We have been notified and will fix it as soon as possible."))),Se=()=>(0,r.Z)(se.Z,{center:!0,type:"error",className:"c-model-management-download__column"},void 0,_e||(_e=(0,r.Z)("p",{},void 0,(0,r.Z)("strong",{},void 0,"Downloading is disabled for this model."))),Ne||(Ne=(0,r.Z)("p",{},void 0,"This model has been uploaded with software that does not allow downloading.")),(0,r.Z)("p",{},void 0,(0,r.Z)("a",{className:"skfb-link",target:"_blank",rel:"noopener noreferrer",href:(0,Y.F)("MAKING_YOUR_MODELS_DOWNLOADABLE")},void 0,"Learn more"))),Le=()=>De||(De=(0,r.Z)(se.Z,{center:!0,type:"warning"},void 0,(0,r.Z)("p",{},void 0,"We are checking the integrity of your additional file."),(0,r.Z)("p",{},void 0,(0,r.Z)("strong",{},void 0,"This may take a few minutes.")),(0,r.Z)("p",{},void 0,(0,r.Z)("span",{className:"spinner-small --centered"})))),Fe=({downloadType:e})=>(0,r.Z)(se.Z,{center:!0,type:"warning"},void 0,(0,r.Z)("p",{},void 0,"Your model will not"," ","store"===e?"appear in the Store":"be downloadable"," until you publish it.")),je=()=>ke||(ke=(0,r.Z)(se.Z,{center:!0,type:"warning"},void 0,(0,r.Z)("p",{},void 0,(0,r.Z)("b",{},void 0,"Your model is reprocessing.")),(0,r.Z)("p",{}
1,void 0,"3D settings and some properties cannot be edited during reprocessing."),(0,r.Z)("p",{},void 0,"This page will refresh automatically when the reprocessing finishes."),(0,r.Z)("p",{},void 0,(0,r.Z)("span",{className:"spinner-small --centered"})))),Re=()=>(0,r.Z)(se.Z,{className:"c-model-management-download__column",center:!0,type:"warning"},void 0,Ce||(Ce=(0,r.Z)("p",{},void 0,(0,r.Z)("b",{},void 0,"You can join Fab to sell 3D models."))),(0,r.Z)("p",{},void 0,(0,r.Z)(f.Z,{size:"medium",type:"store",target:"_blank",rel:"noopener noreferrer",href:Te.$.becomeAPublisher,text:"Become a seller on Fab"})));var Me,Ue,Ie=a("TlsM");function Ve({freeLicenses:e,selectedLicense:t,licenseField:a}){const{Popups:o}=(0,S.Z)(),i=n.useCallback((()=>{o.loadChangeLicensePopup().then((o=>new o({selectedLicense:t,freeLicenses:e}).open().then((e=>{a.onChange(e.uid)})).catch((0,m.KQ)(m.FU))))}),[o,t,e,a]);return(0,r.Z)("div",{className:"c-model-management-download__row"},void 0,Me||(Me=(0,r.Z)("span",{className:"c-model-management-download__label"},void 0,"License")),(0,r.Z)("div",{className:"c-model-management-download__right",onClick:i},void 0,(0,r.Z)("p",{className:"c-model-management-download__text"},void 0,t?t.label:null),Ue||(Ue=(0,r.Z)("a",{className:"c-model-management-download__link"},void 0,"Change license"))))}let ze;!function(e){e.Initial="Initial",e.Reprocess="Reprocess",e.None="None"}(ze||(ze={}));const Ke=(e,t,a)=>{const o=(0,l.I0)(),[i,s]=n.useState(t.hasProcessingVersion?"SUCCEEDED"===e.status.processing?ze.Reprocess:ze.Initial:ze.None),r=n.useCallback((()=>o(c.Nw.models.pollVersions(e.uid)).then((()=>{s(ze.None)}))),[e.uid,o]),d=n.useCallback((()=>(s(ze.Reprocess),o(c.Nw.models.reprocess(e.uid,!0)).then((()=>{s(ze.None),a&&a()})))),[o,e.uid]);return n.useEffect((()=>{if(i===ze.None)return;const e=r();return e.catch((0,m.KQ)(m.FU)),()=>e.cancel()}),[]),{processingType:i,reprocess:d}};var $e,Be,qe,Qe,Ge,He;function Ye(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function We(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(a),!0).forEach((function(t){(0,i.Z)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Ye(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}const Xe=({model:e,management:t,form:a,freeLicenses:o,processingType:i,isExtraFileProcessing:s,reprocess:d})=>{const u=(0,l.v9)(c.wl.authUser.user),m=(0,l.v9)(c.wl.authUser.canAccessFeature(Te.f)),v=k(u,e,We(We({},D(e,a.data)),{},{isPublished:!0})),g=C(a.data.downloadType,t),h=(0,p.hv)(e.visibility)&&"store"===a.data.downloadType;return(0,r.Z)(n.Fragment,{},void 0,i===ze.Reprocess?$e||($e=(0,r.Z)(je,{})):null,"no"!==a.data.downloadType&&"archives_processing"===t.downloadStatus?Be||(Be=(0,r.Z)(Ae,{})):"free"===a.data.downloadType&&"not_published"===t.downloadStatus?(0,r.Z)(Fe,{downloadType:a.data.downloadType}):null,"free"===a.data.downloadType&&v?(0,r.Z)(Ie.ZP,{isPublished:e.isPublished}):null,"free"===a.data.downloadType&&"archives_broken"===t.downloadStatus?qe||(qe=(0,r.Z)(xe,{})):"free"===a.data.downloadType&&"source_blocked"===t.downloadStatus?Qe||(Qe=(0,r.Z)(Se,{})):"free"===a.data.downloadType?(0,r.Z)(Ve,{freeLicenses:o,licenseField:a.fields.freeLicense,selectedLicense:o.find((e=>e.uid===a.fields.freeLicense.value))}):"store"===a.data.downloadType?(0,r.Z)(n.Fragment,{},void 0,m?null:Ge||(Ge=(0,r.Z)(Re,{})),s?He||(He=(0,r.Z)(Le,{},"NotPublishedMessage")):null):null,"store"!==a.data.downloadType&&g?(0,r.Z)("div",{},void 0,i!==ze.Reprocess?(0,r.Z)(Ee,{downloadType:a.data.downloadType}):null,(0,r.Z)(f.Z,{text:i===ze.Reprocess?"reprocessing model...":"reprocess model",subtext:i===ze.Reprocess?"it may take a few minutes":"",onClick:d,disabled:h,size:"large",className:"c-model-management-download__main-button",loading:i===ze.Reprocess})):null)};function Je({model:e,management:t,form:a,freeLicenses:o,processingType:i,isExtraFileProcessing:s,onChangeDownloadType:n,reprocess:l}){const d=e.org?["no","free"]:["no","free","store"];return(0,r.Z)("div",{"data-selenium":"download-section",className:"c-model-management-download"},void 0,(0,r.Z)("header",{className:"c-model-management-download__header"},void 0,(0,r.Z)("div",{className:"c-model-management-download__tabs"},void 0,d.map((e=>(0,r.Z)("div",{className:(0,u.AK)("c-model-management-download__tab",{"--active":a.data.downloadType===e}),onClick:()=>n(e),"data-selenium":`download-tab-${e}`},e,e))))),(0,r.Z)("div",{className:"c-model-management-download__content"},void 0,(0,r.Z)(Xe,{model:e,freeLicenses:o,form:a,processingType:i,management:t,isExtraFileProcessing:s,reprocess:l})))}function et(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function tt(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};
1t%2?et(Object(a),!0).forEach((function(t){(0,i.Z)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):et(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}const at="******",ot=tt(tt(tt({},{downloadType:({model:e,management:t,authUser:a})=>({initialValue:t?t.selectedDownloadType:e?(0,p.Gq)(e):"no",validators:[(0,Oe.kw)(["no","free","store"]),...t?[P(t),O(t)]:[],...e?[T(a,e),(e,t)=>"store"===e&&"public"!==t.visibility?"Models on the store must be public":""]:[]]}),freeLicense:({model:e})=>({initialValue:null!=e&&e.license&&e.license.free?e.license.uid:"",validators:[(0,Oe.Ml)(((e,t)=>"free"===t.downloadType),[(0,Oe.C1)("License is required.")])]}),paidLicense:({model:e})=>({initialValue:null!=e&&e.license&&!e.license.free?e.license.uid:"",validators:[(0,Oe.Ml)(((e,t)=>"store"===t.downloadType),[(0,Oe.C1)("License is required.")])]}),price:({model:e})=>({initialValue:e&&e.price?y(e.price):"25",validators:[(0,Oe.Ml)(((e,t)=>"store"===t.downloadType),[(0,Oe.C1)("The price is required."),(0,Oe.Oi)(/^[^,]*$/,"Comma is an invalid character. Please use a dot to separate dollars from cents."),(0,Oe.Oi)(/^[0-9]+(\.[0-9][0-9]?)?$/,"Invalid price."),(0,Oe.VV)(Pe.Z.modelMinPrice/100,"Must be between "+(0,H.T4)(Pe.Z.modelMinPrice)+" and $10000."),(0,Oe.Fp)(1e4,"Must be between "+(0,H.T4)(Pe.Z.modelMinPrice)+" and $10000.")])]}),extraFile:({management:e})=>({initialValue:e?e.extraFile:null,validators:[(0,Oe.dg)(Pe.Z.maxExtraArchiveSize,"Additional file is too big")]}),visibility:({model:e})=>({validators:[(0,Oe.kw)(["public","private","protected","org"])],initialValue:e&&e.visibility||"public"})}),{isArEnabled:({model:e})=>({initialValue:!(!e||!e.isArEnabled)&&e.isArEnabled,validators:[]})}),{},{name:e=>({validators:[(0,Oe.C1)(),(0,Oe.BS)(48)],initialValue:e.model.name}),description:e=>({validators:[(0,Oe.BS)(1024)],initialValue:e.model.description}),orgProject:e=>({validators:e.model.org?[(0,Oe.C1)()]:[],initialValue:e.model.orgProject}),categories:e=>({validators:[],initialValue:e.model.categories?e.model.categories.map((e=>e.uid)):[]}),tags:({model:e})=>({validators:[],initialValue:e.org?e.orgTags:e.tags}),visibility:e=>({validators:[(0,Oe.kw)(["public","private","protected","org"]),function(t){return!(0,p.Ov)("pro",e.model)&&(0,p.hv)(t)?"You need to upgrade to Pro to have private and password protected models.":""}],initialValue:e.model.visibility}),password:e=>({validators:[function(e,t){return e||"protected"!==t.visibility?void 0:"This field is required"}],initialValue:e.model.isUploading||"protected"!==e.model.visibility?"":at}),isInspectable:e=>({validators:[function(e,t){return e||"no"===t.downloadType?void 0:"Downloadable and store models must be inspectable."}],initialValue:e.model.isInspectable}),isRestricted:e=>({validators:[],initialValue:e.model.isRestricted}),hasCommentsDisabled:e=>({validators:[],initialValue:e.model.hasCommentsDisabled}),hasPromotionalContent:e=>({validators:[],initialValue:e.model.hasPromotionalContent}),isAiGenerated:e=>({validators:[],initialValue:e.model.isAiGenerated})});var it,st=a("vkRz"),rt=a("gyKT"),nt=a("UQ3Q");function lt({model:e,hasChanged:t}){const a=(0,st.Z)(e),o=(0,p.$y)(e)&&"FAILED"!==e.status.processing,{canTransfer:i,openModelTransferPopup:s}=(0,nt.I)(e);return(0,r.Z)(n.Fragment,{},void 0,(0,r.Z)(f.Z,{disabled:o,size:"large",type:"primary",text:"Edit 3D settings",href:e.editorUrl}),(0,r.Z)("div",{className:"c-model-properties__buttons c-model-properties__edit-buttons"},void 0,(0,r.Z)(rt.Z,{model:e},void 0,(({canDuplicate:e,duplicate:t})=>(0,r.Z)(f.Z,{htmlType:"button",disabled:!e||o,onClick:t,size:"large",type:"primary-inverted-border",text:e?"Duplicate":"Duplicate (Pro)",iconClassName:"fa-regular fa-copy"}))),(0,r.Z)("div",{className:"help"},void 0,(0,r.Z)(f.Z,{htmlType:"button",disabled:o||t,size:"large",type:"primary-inverted-border",text:"Reupload",iconClassName:"fa-regular fa-arrow-up-from-bracket",onClick:a,"data-selenium":"open-reupload-popup"}),t?it||(it=(0,r.Z)("div",{className:"tooltip tooltip-down"},void 0,"You have unsaved changes, please save them before reuploading a model")):null),i?(0,r.Z)(f.Z,{htmlType:"button",disabled:o||t,size:"large",type:"primary-inverted-border",text:"Transfer",onClick:s,iconClassName:"fa-regular fa-exchange","data-selenium":"open-transfer-popup"}):null))}var dt=a("JGf+");const ct=(e,t)=>
1{const a=(0,l.I0)(),o=t.extraFile?t.extraFile.status:"",i=["processing","pending"].includes(o),s=n.useCallback((()=>a(c.Nw.models.pollExtraFileProcessingStatus(e.uid))),[a,e.uid]);return n.useEffect((()=>{if(!i)return;const e=s();return()=>e.cancel()}),[i,s]),[i,s]};var pt,ut,mt=a("d94b");const vt=({disableInfo:e,sellerStatus:t,modelIsPrivate:a})=>(0,r.Z)(n.Fragment,{},void 0,pt||(pt=(0,r.Z)("p",{},void 0,(0,r.Z)("strong",{},void 0,"This model has been disabled because it uses features not supported by your current plan:"))),(0,r.Z)("ul",{className:"--disc"},void 0,e.detail.map(((e,t)=>(0,r.Z)("li",{},t,e)))),(0,r.Z)("p",{},void 0," ","Upgrade to ",(0,r.Z)("strong",{},void 0,(0,mt.Z)((0,h.w8)(e.requiredPlan)))," to reactivate this model."),(0,r.Z)("a",{className:`button btn-medium btn-plan-${e.requiredPlan}`,target:"_blank",rel:"noreferrer noopener",href:"https://sketchfab.com/plans?ref=model-management"},void 0,"Upgrade to ",(0,mt.Z)((0,h.w8)(e.requiredPlan))),!a&&(0,r.Z)("p",{},void 0,"You can also reactivate your model by removing paid features","confirmed"===t?", adding it to the Store,":""," or making it downloadable.")),gt=()=>(0,r.Z)(n.Fragment,{},void 0,(0,r.Z)("p",{},void 0,(0,r.Z)("strong",{},void 0,"This model has been disabled by Sketchfab staff. Please check your email or visit ",(0,r.Z)("a",{className:"skfb-link",target:"_blank",rel:"noreferrer noopener",href:(0,Y.F)("DISABLED_MODELS")},void 0,"the help center")," for more details.")));function ht(e){return(0,r.Z)("div",{className:"disable-section"},void 0,(0,r.Z)("div",{className:"disable-section__content"},void 0,(0,r.Z)(se.Z,{center:!0,type:"error"},void 0,"disabled_by_staff"===e.disableInfo.type?ut||(ut=(0,r.Z)(gt,{})):"wrong_plan"===e.disableInfo.type?n.createElement(vt,(0,o.Z)({},e,{disableInfo:e.disableInfo})):null)))}var ft,Zt,bt,wt,yt,_t,Nt,Dt,kt=a("hK4n"),Ct=a("l9Gv"),Ot=a("LH8s"),Pt=a("WA+4");const Tt=({form:e,model:t,management:a,licenses:o})=>{const{processingType:i,reprocess:s}=Ke(t,a),[n]=ct(t,a),l=o.filter((e=>e.free)),d=o.filter((e=>!e.free));return a?(0,r.Z)(Je,{form:e,model:t,management:a,freeLicenses:l,paidLicenses:d,processingType:i,isExtraFileProcessing:n,reprocess:s,onChangeDownloadType:o=>{const i=(0,dt.Z)(l)||{uid:""},s=(0,dt.Z)(d)||{uid:""},r=d.find((e=>"ed"===e.slug))||{uid:""};e.onFieldsChange({downloadType:o,price:t.price?y(t.price):"25",freeLicense:t.license&&t.license.free?t.license.uid:i.uid,paidLicense:t.license&&!t.license.free?t.license.uid:t.isStoreLicenseLocked?r.uid:s.uid,extraFile:a.extraFile,isInspectable:"no"!==o||t.isInspectable})}}):null};function Et({form:e,model:t,management:a,licenses:i}){var s;const u=n.useRef(null),m=(0,l.v9)(c.wl.authUser.canAccessFeature("ff_promotional_content"));return(0,r.Z)("div",{className:"c-side-settings"},void 0,(0,Pt.w)(t,"org")?t.isUploading?null:"org"!==t.visibility?(0,r.Z)("div",{className:"c-side-settings__flex"},void 0,(0,r.Z)(f.Z,{size:"small",type:"primary-inverted-border",text:"view as team",onClick:()=>d.Z.pushRoute(...(0,p.IL)(t)),"data-selenium":"see-model"}),(0,r.Z)(f.Z,{size:"small",type:"primary",text:`view as ${t.visibility}`,href:t.viewerUrl,"data-selenium":"see-model"})):(0,r.Z)(f.Z,{size:"small",type:"primary",text:"view model",href:t.viewerUrl,"data-selenium":"see-model"}):(0,r.Z)(n.Fragment,{},void 0,(0,r.Z)("div",{className:"c-side-settings__flex"},void 0,(0,r.Z)("div",{className:"c-side-settings__status"},void 0,"Status:"," ",(0,r.Z)("strong",{},void 0,t.isUploading?"Uploading":t.isPublished?"Published":"Draft"," ")),t.isUploading?null:(0,r.Z)(f.Z,{size:"small",type:"primary",text:"view my model",href:t.viewerUrl,"data-selenium":"see-model"})),t.isUploading||t.isPublished?null:(0,r.Z)(Ct.Z,{},void 0,(()=>s||(s=(0,r.Z)(Ot.Z,{model:t}))))),ft||(ft=(0,r.Z)("div",{className:"c-side-settings__separator"})),n.createElement(A.Z,(0,o.Z)({},e.fields.visibility,{label:"Who can see?",labelClassName:"c-model-properties__label",isTouched:!0}),(0,r.Z)(kt.Z,{models:[t],form:e,onVisibilityPopupClose:()=>{var e;null===(e=u.current)||void 0===e||e.focus()}})),"protected"===e.fields.visibility.value?n.createElement(A.Z,(0,o.Z)({},e.fields.password,{label:"Password"}),n.createElement(x.Z,(0,o.Z)({},e.fields.password,{placeholder:"******",border:!0,type:"password",ref:u}))):null,(0,r.Z)("div",{className:"c-side-settings__visibility-info-link"},void 0,(0,r.Z)("a",{className:"skfb-link",href:(0,Y.F)("MODEL_VISIBILITY_PRIVACY"),target:"_blank",rel:"noopener noreferrer"},void 0,"Learn about visibility settings"," ",Zt||(Zt=(0,r.Z)("i",{className:"help fa-regular fa-question-circle"})))),"org"!==e.data.visibility?(0,r.Z)("div",{className:"c-side-settings__flex"},void 0,(0,r.Z)("div",{className:"c-model-properties__label"}
1,void 0,t.org?"Allow external comments":"Allow comments"," ",(0,r.Z)(ue.Z,{href:(0,Y.F)("HOW_TO_DISALLOW_MODEL_COMMENTS"),message:t.org?"Allow comments from people outside this organization on the external model page. Comments from organization members will always be allowed on the internal model page.":"Allow comments on this model"})),n.createElement(ie.Z,(0,o.Z)({},e.fields.hasCommentsDisabled,{checked:!e.fields.hasCommentsDisabled.value}))):null,(0,r.Z)("div",{className:"c-side-settings__flex"},void 0,(0,r.Z)("div",{className:"c-model-properties__label"},void 0,"Allow texture inspection"," ",(0,r.Z)(ue.Z,{href:(0,Y.F)("MODEL_INSPECTOR"),message:"Allow people to inspect unwrapped textures in Model Inspector"})),n.createElement(ie.Z,(0,o.Z)({"data-selenium":"inspectable-checkbox"},e.fields.isInspectable))),e.fields.isInspectable.hasError?(0,r.Z)("p",{className:"form-error"},void 0,e.fields.isInspectable.error):null,(0,r.Z)("div",{className:"c-side-settings__flex"},void 0,(0,r.Z)("div",{className:"c-model-properties__label"},void 0,"Age-restricted content"," ",(0,r.Z)(ue.Z,{href:(0,Y.F)("WHAT_IS_RESTRICTED_CONTENT"),message:bt||(bt=(0,r.Z)(n.Fragment,{},void 0,"Content that is not appropriate for all audiences, like nudity or suggestive content.",(0,r.Z)("br",{}),"Click for content guidelines"))})),n.createElement(ie.Z,(0,o.Z)({"data-selenium":"restricted-checkbox"},e.fields.isRestricted))),m&&(0,r.Z)("div",{className:"c-side-settings__flex"},void 0,wt||(wt=(0,r.Z)("div",{className:"c-model-properties__label"},void 0,"Promotional content"," ",(0,r.Z)(ue.Z,{message:"Enable this if your model contains promotional content. We will notify users that your model contains promotional content. Promotional content may include, for example, product placement, logos, slogans, or other content that promotes or advertises your own or someone else’s real-world brand."}))),n.createElement(ie.Z,(0,o.Z)({},e.fields.hasPromotionalContent,{checked:e.fields.hasPromotionalContent.value}))),(0,r.Z)("div",{className:"c-side-settings__flex"},void 0,yt||(yt=(0,r.Z)("div",{className:"c-model-properties__label"},void 0,"Created with generative AI tools",(0,r.Z)(ue.Z,{message:"Was this model partly or fully created with generative AI tools?"}))),n.createElement(ie.Z,(0,o.Z)({},e.fields.isAiGenerated,{checked:e.fields.isAiGenerated.value}))),_t||(_t=(0,r.Z)("div",{className:"c-side-settings__separator"})),a&&!t.isUploading&&t.isDisabled?(0,r.Z)(n.Fragment,{},void 0,(0,r.Z)(ht,{sellerStatus:a.sellerStatus,modelIsPrivate:(0,p.hv)(t.visibility),disableInfo:a.disableInfo}),Nt||(Nt=(0,r.Z)("div",{className:"c-side-settings__separator"}))):null,"org"===e.data.visibility||t.isUploading||t.isDisabled&&(0,p.hv)(t.visibility)||!a?null:(0,r.Z)(n.Fragment,{},void 0,Dt||(Dt=(0,r.Z)("div",{className:"c-model-properties__label"},void 0,"Download")),(0,r.Z)(Tt,{form:e,model:t,management:a,licenses:i})))}var At,xt,St,Lt,Ft,jt,Rt=a("ZqtO"),Mt=a("1xsz"),Ut=a("UnUI"),It=a("wExz");const Vt=({fileField:e,allowed:t,downloadTips:a,hasChanged:o,error:i,isUploading:s})=>{const n=["application/zip","application/x-7z-compressed","application/x-rar-compressed"].join(","),l=()=>{var e;null===(e=document.getElementById("upfile"))||void 0===e||e.click()};return(0,r.Z)("span",{},void 0,(0,r.Z)("div",{className:Rt.Z["c-extrafile"]},void 0,(0,r.Z)("span",{className:Rt.Z.title},void 0,"Attach additional file",(0,r.Z)(ue.Z,{message:'Additional File can only contain 3D files or other files that pertain to the 3D file itself, such as additional hi-res texture maps, additional file formats, model resolutions, "Read Me" documents, etc.',className:Rt.Z.help}),(0,r.Z)("span",{className:Rt.Z.subtitle},void 0,"Accepted formats: ",[".zip",".rar",".7z"].join(", ")),(0,r.Z)("span",{className:Rt.Z.subtitle},void 0,"Max size: ",(0,H.$B)(Pe.Z.maxExtraArchiveSize)),t?(0,r.Z)(f.Z,{className:Rt.Z.browse,onClick:l,text:"Upload file",size:"small",disabled:!t,icon:At||(At=(0,r.Z)("i",{title:"remove",className:"fa-regular fa-paperclip"}))}):(0,r.Z)("div",{className:Rt.Z.upgrade},void 0,xt||(xt=(0,r.Z)(Mt.Z,{tooltipText:"Upgrade your plan to Pro or Enterprise to attach an extra archive.",referer:"embed_popup"})))),(0,r.Z)("input",{className:Rt.Z["input-file"],accept:n,id:"upfile",type:"file",onChange:t=>{const a=t.target.files[0];e.onChange&&e.onChange(a)}}),e.value&&e.value.name?(0,r.Z)("div",{className:Rt.Z["file-box"]},void 0,(0,r.Z)("div",{className:Rt.Z.file},void 0,i?(0,r.Z)(ue.Z,{message:i,className:(0,u.AK)(Rt.Z.statusIcon,Rt.Z["--error"])}):(0,r.Z)("span",{className:Rt.Z.statusIcon},void 0,s?St||(St=(0,r.Z)(It.Z,{})):o?Lt||(Lt=(0,r.Z)("i",{className:"fa-regular fa-arrow-up-from-bracket"})):Ft||(Ft=(0,r.Z)("i",{className:"fa-regular fa-check"}))),(0,r.Z)("div",{className:Rt.Z["file-content"]},void 0,(0,r.Z)("div",{},void 0,e.value.name),(0,r.Z)("div",{className:Rt.Z["file-size"]},void 0,(0,H.$B)(e.value.size))),(0,r.Z)("span",{className:Rt.Z.actions},void 0,(0,r.Z)(Ut.Z,{hideArrow:!0,menuAlign:"right",labelTitle:(0,r.Z)("i",{className:(0,u.AK)("fa-regular fa-ellipsis-v",Rt.Z.ellipsis)})},void 0,(()=>(0,r.Z)("ul",{},void 0,t?(0,r.Z)("li",{onClick:l},void 0,(0,r.Z)("i",{className:(0,u.AK)("fa-regular fa-arrow-up-from-bracket",Rt.Z["action-icon"])})," ","Change file"):null,(0,r.Z)("li",{onClick:()=>e.onChange(null)},void 0,(0,r.Z)("i",{className:(0,u.AK)("fa-regular fa-trash-can",Rt.Z["action-icon"])}
1)," ","Delete"))))))):null,a?(0,r.Z)("div",{className:Rt.Z.tips},void 0,jt||(jt=(0,r.Z)("p",{},void 0,"Change the model download setting to ",(0,r.Z)("u",{},void 0,"Free")," or ",(0,r.Z)("u",{},void 0,"Store")," to view the additional file."))):null))};var zt=a("NDtu");const Kt=["uploading","pending","processing","ready"],$t=(e,t)=>Kt.indexOf(t)>Kt.indexOf(e);function Bt({step:e,isPublished:t}){return(0,r.Z)("div",{className:"c-upload-status"},void 0,(0,r.Z)("div",{className:(0,u.AK)("c-upload-status__row",{"--green":$t("uploading",e)})},void 0,(0,r.Z)("div",{className:"c-upload-status__dot"},void 0,$t("uploading",e)?"✓":"1"),(0,r.Z)("span",{className:"c-upload-status__step-title"},void 0,"uploading"===e?"uploading":"upload"),(0,r.Z)("span",{className:"c-upload-status__step-status"},void 0,$t("uploading",e)?"Finished":"")),(0,r.Z)("div",{className:(0,u.AK)("c-upload-status__row",{"--green":$t("processing",e),"--grey":!$t("uploading",e)})},void 0,(0,r.Z)("div",{className:"c-upload-status__dot"},void 0,$t("processing",e)?"✓":"2"),(0,r.Z)("span",{className:"c-upload-status__step-title"},void 0,$t("uploading",e)&&$t("pending",e)?$t("processing",e)?"processed":"processing":"Waiting to start"),(0,r.Z)("span",{className:"c-upload-status__step-status"},void 0,$t("processing",e)?"Finished":"processing"===e?"Our 3d elves are working hard…":"")),(0,r.Z)("div",{className:(0,u.AK)("c-upload-status__row",{"--green":"ready"===e,"--grey":"ready"!==e})},void 0,(0,r.Z)("div",{className:"c-upload-status__dot"},void 0,"ready"===e?"✓":"3"),(0,r.Z)("span",{className:"c-upload-status__step-title"},void 0,t?"Published":"Ready to publish")))}var qt=a("ULsr"),Qt=a("Oyie");var Gt,Ht=a("m2W1");const Yt=({isSaveOnly:e})=>(0,r.Z)("div",{className:(0,u.AK)("c-side-settings",Ht.Z.container)},void 0,(0,r.Z)("div",{className:"c-side-settings__flex"},void 0,(0,r.Z)("div",{className:Ht.Z.dataHandlerWarning},void 0,(0,r.Z)("p",{},void 0,Gt||(Gt=(0,r.Z)("i",{className:"fa-regular fa-info-circle"})),(0,r.Z)("b",{},void 0,e?"Save":"Save & Publish")," will update this model’s properties and make it visible to anyone with access to this page."),(0,r.Z)("p",{className:Ht.Z.details},void 0,"The model title, description, and tags can be read by anyone who visits this page. Do not include sensitive data like IDs, credentials, or non-public information."))));var Wt=a("UhZI");const Xt=["name","downloadType","price","visibility","password","paidLicense","freeLicense","orgProject"];var Jt,ea,ta,aa,oa,ia,sa,ra;function na(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function la(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?na(Object(a),!0).forEach((function(t){(0,i.Z)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):na(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}const da=(0,$.Z)(ot),ca={autostart:"0",ui_inspector:"0"};function pa(e){const t=!e.isUploading&&(0,p.Eu)(e),a=!e.isUploading&&(0,p.pe)(e);return e.isUploading?"uploading":a?"pending":t?"processing":"ready"}const ua=()=>Jt||(Jt=(0,r.Z)(n.Fragment,{},void 0,"NoAI tagging"," ",(0,r.Z)("a",{href:"https://creativecommons.org/faq/#what-if-i-have-received-cc-licensed-material-with-additional-restrictions",target:"_blank",rel:"nofollow noopener noreferrer",className:"skfb-link"},void 0,"may not be compatible with CC licenses.")," ","In order to save changes, you must either remove the NoAI tag or change this model's license type."));const ma=da((function({model:e,authUser:t,management:i,form:Z,onCancelUpload:b}){var w;const[y]=(0,q.Z)((({Api:e})=>e.getLicenses().then((e=>e.results))),[],[]);!function(e){const{History:t}=(0,S.Z)();n.useEffect((()=>{if(e)return t.enableConfirmNavigation(),()=>{t.disableConfirmNavigation()}}),[e,t])}(Z.hasChanged);const D=(0,l.v9)(c.wl.authUser.canAccessFeature("ff_data_handling")),k=n.useRef(null),C=n.useRef(null),O=(0,l.I0)(),[P,T]=n.useState("save"),[L]=(0,q.Z)((({Api:e})=>e.getCategories().then((({results:e})=>e.map((e=>({value:e.uid,title:e.name})))))),[],[]),[F,j]=n.useState(e.isUploading);n.useEffect((()=>{F||j(e.isUploading)}),[e,F]);const{extraFileUpload:R,onUpdateArchive:M,onUpdateModel:U,onSaveError:I}=((e,t,o)=>{const i=(0,l.I0)(),{Popups:s}=(0,S.Z)(),r=n.useCallback((a=>N(o?o.extraFile:null,e.fields.extraFile.value)?e.fields.extraFile.value instanceof File?i(c.Nw.models.updateExtraFile(t,e.fields.extraFile.value)).then((()=>i(c.Nw.models.pollExtraFileProcessingStatus(t)))):i(c.Nw.models.removeExtraFile(t)):Qt.resolve(void 0)),[i,e.fields.extraFile.value,o,t]),d=n.useCallback((e=>i(c.Nw.models.update(t,e)).then((()=>{e.license&&i(c.Nw.models.pollVersions(t))}))),[i,t]),p=n.useCallback((t=>{if(console.error("submit error:",t),t instanceof m.p9);
1else if(o&&(i=t)&&i.detail&&i.detail.extraFile&&i.detail.extraFile.some((e=>e.match("file size is too big"))))Qt.all([a.e(2852),a.e(4923)]).then(a.bind(a,"6Bjy")).then((({default:t})=>{new t({fileSize:e.fields.extraFile.value?e.fields.extraFile.value.size:0}).open(),e.fields.extraFile.onChange(o.extraFile)}));else{if((0,m.Oe)(t))return Qt.reject(t);s.loadMessagePopup().then((e=>new e({title:"Error while saving settings",html:`\n                    An unexpected error occured while saving settings.\n                    <br>\n                    If the error persists, please contact our <a class="skfb-link" target="_blank" href="${(0,Y.X)()}">Support Team</a>.\n                `,renderButtons:e=>[{viewClass:(0,qt.Z)(f.Z),options:{key:"ok",type:"tertiary",text:"Ok",onClick:()=>e.continue()}}]}).open()))}var i;return Qt.reject({})}),[e.fields.extraFile,o]);return{extraFileUpload:(0,l.v9)((e=>c.wl.models.extraFileUpload(t,e))),onUpdateArchive:r,onUpdateModel:d,onSaveError:p}})(Z,e.isUploading?"nouid":e.uid,i),$=(0,u.aj)("breakpointXSmall");n.useLayoutEffect((()=>{const e=k.current,t=C.current;if(!$&&e&&C){const a=t=>{if(e&&e.classList){var a;const o=null==t||null===(a=t[0])||void 0===a?void 0:a.isIntersecting;e.classList.toggle("--sticky",!o)}},o=new window.IntersectionObserver(a);return t&&setTimeout((()=>o.observe(t))),()=>o.disconnect()}e&&e.classList.add("--sticky")}),[k,C,$]);const B=n.useCallback((({shouldPublish:t=!1}={})=>{if(e.isUploading)return;const a=e=>{let{name:t,downloadType:a,price:o,visibility:i,password:r,paidLicense:n,freeLicense:l,orgProject:d}=e;return la(la({},(0,s.Z)(e,Xt)),{},{orgProject:null==d?void 0:d.uid,name:(0,g.Nw)(t),downloadType:a,price:"store"===a?_(o):null,password:"protected"===i&&r!==at?r:void 0,visibility:i,license:"store"===a?n:"free"===a?l:null})};Z.onSubmit((async o=>{try{if(t)await O(c.Nw.models.tryPublish(e.uid,a(o))).then((e=>{e.caseOf({Left:e=>{throw e},Right:()=>{}})}));else{const t=a(o);if(await U(t),t.name!==e.name){const a=(0,p.nR)({slug:(0,g.lV)(t.name),uid:e.uid,org:e.org},{silent:!0});d.Z.replaceRoute(...a)}}await M(o)}catch(e){I(e);const t=(0,m.Oe)(e)?(0,m.wp)(e,!1):e.response.data.detail&&"string"==typeof e.response.data.detail?e.response.data.detail:"Your request failed. Please try again later.";throw O(c.Nw.messages.add({level:"error",message:t})),e}}))}),[e,O,Z,M,U,I]),H=e.org?e.org.uid:"",X=(0,l.v9)(c.wl.authUser.getOrgRole(H)),J=t.account&&(0,h.Di)(t.account,"pro")||"store"===Z.data.downloadType||!!e.org||t.isStaff,te=t.isStaff||X.caseOf({Some:e=>(0,v.oF)(e,"project_lead"),None:()=>!1});if(t.isAnonymous)return null;const oe=y.filter((e=>e.isCc)),ie="no"!==Z.data.downloadType&&("archives_broken"===(null==i?void 0:i.downloadStatus)||"source_blocked"===(null==i?void 0:i.downloadStatus)),se=oe.some((e=>e.uid===Z.fields.freeLicense.value))&&"free"===Z.fields.downloadType.value,re=Z.fields.tags.value.includes("noai")&&se,ne=e.isUploading||Z.hasErrors||!Z.hasChanged||ie||re,le=(0,p.qS)(e,la(la({},e),{},{visibility:Z.data.visibility,price:void 0,license:void 0,downloadType:Z.data.downloadType,isPublished:!0}),t),de=!e.isUploading&&le,ce=!e.isUploading&&(0,p.$y)(e),ve=e.isUploading||ie||!de||"wrong_plan"===(null==i?void 0:i.disableInfo.type)&&!(0,p.Ov)(i.disableInfo.requiredPlan,e)||(0,p.hv)(Z.data.visibility)&&!(0,p.Ov)("pro",e),ge="publish"===P&&(Z.isSubmitting||Z.hasSucceeded),he="save"===P&&(Z.isSubmitting||Z.hasSucceeded),fe="org"===Z.data.visibility||e.isUploading||e.isPublished&&!ge,be=!e.isUploading&&"FAILED"===e.status.processing,we=(0,p.Ov)("pro",e);return(0,r.Z)("form",{className:"c-model-properties","data-selenium":"properties-form"},void 0,(0,r.Z)("div",{className:"c-model-properties__container g-container"},void 0,(0,r.Z)("div",{className:"c-model-properties__side --left"},void 0,(0,r.Z)("div",{className:"c-model-properties__viewer-container"},void 0,be&&!e.isUploading?(0,r.Z)(Q.Z,{model:e,type:"small"}):(0,r.Z)(n.Fragment,{},void 0,e.isUploading||ce?ea||(ea=(0,r.Z)(z.Z,{})):(0,r.Z)(K.Z,{model:e,embedOptions:ca}),F?(0,r.Z)(Bt,{isPublished:!e.isUploading&&e.isPublished,step:pa(e)}):null),e.isUploading?null:(0,r.Z)(lt,{hasChanged:Z.hasChanged,model:e}))),(0,r.Z)("div",{className:"c-model-properties__center"},void 0,n.createElement(A.Z,(0,o.Z)({label:"Title",labelClassName:"c-model-properties__label"},Z.fields.name),n.createElement(x.Z,(0,o.Z)({border:!0},Z.fields.name,{tabIndex:0,"aria-label":"Title","data-selenium":"model-name-input"}))),n.createElement(A.Z,(0,o.Z)({label:"Description",htmlFor:"description",labelClassName:"c-model-properties__label","data-selenium":"model-description-input"},Z.fields.description),n.createElement(V,(0,o.Z)({},Z.fields.description,{textAreaProps:{id:"description"},label:"Markdown Description"}))),e.org&&e.orgProject?n.createElement(A.Z,(0,o.Z)({label:"Location",labelClassName:"c-model-properties__label","data-selenium":"model-project-dropdown"},Z.fields.orgProject),n.createElement(G.Z,(0,o.Z)({},Z.fields.orgProject,{disabled:!te,className:"c-model-properties__folder-dropdown",orgUid:e.org.uid,onChange:e=>Z.fields.orgProject.onChange(e)}
1))):null,"org"!==Z.data.visibility?n.createElement(A.Z,(0,o.Z)({label:"Categories",labelClassName:"c-model-properties__label"},Z.fields.categories),n.createElement(E.Z,(0,o.Z)({},Z.fields.categories,{theme:"white-background",className:"c-model-properties__categories-dropdown",placeholder:"Select up to 2 categories",options:L,maxSelectedCount:2,"data-selenium":"model-categories-select"}))):null,n.createElement(A.Z,(0,o.Z)({labelClassName:"c-model-properties__label",label:(0,r.Z)(n.Fragment,{},void 0,ta||(ta=(0,r.Z)("span",{},void 0,"Tags")),!e.org||"public"!==e.visibility&&"public"!==Z.fields.visibility.value?void 0:aa||(aa=(0,r.Z)(ue.Z,{message:"Tags on organization models are only visible to members of your organization with permission to view the model. They are not visible outside your organization."})))},Z.fields.tags,{isTouched:re||Z.fields.tags.isTouched,error:Z.fields.tags.error?Z.fields.tags.error:re?oa||(oa=(0,r.Z)(ua,{})):""}),n.createElement(zt.Z,(0,o.Z)({},Z.fields.tags,{orgUid:null==e||null===(w=e.org)||void 0===w?void 0:w.uid,"data-selenium":"model-tags-input"})),!re&&e.user.isAiRestricted&&se?ia||(ia=(0,r.Z)(Wt.F,{className:"c-model-properties__no-ai-tip"})):null),"public"===Z.data.visibility?(0,r.Z)(W,{form:Z.data}):null),(0,r.Z)("div",{className:"c-model-properties__side"},void 0,(0,r.Z)(Et,{management:i,model:e,form:Z,licenses:y}),!e.isUploading&&i&&(0,p.Ov)("prem",e)?(0,r.Z)(Ze,{form:Z,management:i,model:e}):null,(0,r.Z)(Vt,{fileField:Z.fields.extraFile,allowed:J,downloadTips:"no"===Z.data.downloadType&&!e.org,error:Z.errors.extraFile,hasChanged:N(i?i.extraFile:null,Z.fields.extraFile.value),isUploading:"uploading"===R.type}),(0,r.Z)("div",{className:"c-model-properties__own-download"},void 0,e.isUploading||!i||"source_blocked"===i.downloadStatus?null:we?(0,r.Z)(ee.U,{archives:i.archivesDetails,model:e}):sa||(sa=(0,r.Z)(ae,{}))),D&&(0,r.Z)(Yt,{isSaveOnly:fe}))),n.createElement("div",{className:"c-model-properties__footer",ref:k},(0,r.Z)("div",{className:"g-container"},void 0,e.isUploading?null:(0,r.Z)(pe.m,{className:"c-model-properties__links",authUser:t,model:e}),(0,r.Z)("div",{className:"c-model-properties__buttons c-model-properties__footer-right"},void 0,e.isUploading&&b?(0,r.Z)(f.Z,{size:"large",type:"tertiary",text:"Cancel",onClick:b}):null,(()=>{const e=he?(0,me.F)("Save","saved","saving...",Z,R):{text:"Save",disabled:!1};return(0,r.Z)("div",{className:"c-model-properties__actions"},void 0,(0,r.Z)("span",{className:"help"},void 0,n.createElement(f.Z,(0,o.Z)({},e,{type:fe?"important":"primary",size:"large","data-selenium":"save-button",onClick:()=>{T("save"),B()},disabled:e.disabled||ne,htmlType:"submit"})),Z.hasSucceeded?null:(0,r.Z)("div",{className:"tooltip tooltip-up"},void 0,Z.hasChanged?Z.hasErrors?Object.values(Z.errors).filter(Boolean).join(".\n"):re?ra||(ra=(0,r.Z)(ua,{})):ne?"You can not save these changes to your model":"Save changes to your model":"There were no changes to the model")))})(),fe?null:(()=>{const t=(0,p.hv)(Z.data.visibility)?(Z.hasChanged?"Save & ":"")+"Publish privately":(Z.hasChanged?"Save & ":"")+"Publish",a=ge?(0,me.F)(t,"Published","Publishing...",Z,R):{disabled:!1,text:t};return(0,r.Z)("span",{className:"help"},void 0,n.createElement(f.Z,(0,o.Z)({},a,{"data-selenium":"publish",type:"important",size:"large",disabled:a.disabled||ce||Z.hasChanged&&ne||ve,onClick:()=>{T("publish"),B({shouldPublish:!0})}})),(0,r.Z)("div",{className:"tooltip tooltip-up"},void 0,e.isPublished?"Your model was successfully published":ce?"You won't be able to publish this model until the processing has finished":e.isUploading?"Please wait until the model has finished uploading.":Z.hasErrors?Object.values(Z.errors).filter(Boolean).join(".\n"):ie?"There was an issue processing your model. Please reprocess your model.":le?"wrong_plan"===(null==i?void 0:i.disableInfo.type)?"This model is disabled because it uses features not supported by your current plan.":(0,p.hv)(Z.data.visibility)&&!(0,p.Ov)("pro",e)?"You need at least a pro account to publish private models.":"protected"===Z.data.visibility?"Only people with password and link will have access. No notifications will be sent.":"private"===Z.data.visibility?"Only people with link will have access. No notifications will be sent.":e.org&&"org"===Z.data.visibility?"Everyone in this project will have access.":"Everyone will have access. Followers will be notified.":"You need a credit to publish this model."))})()))),n.createElement("div",{className:"c-model-properties__sentinel",ref:C}))}))},kN3w:(e,t,a)=>{"use strict";a.d(t,{Z:()=>_});var o,i,s,r=a("sQwH"),n=a("3Z9q"),l=a("VDcQ"),d=a("MB/E"),c=a("X40V"),p=a("pgZm"),u=a("6tbf"),m=a("UnUI"),v=a("2bV5"),g=a("hk5G"),h=a("ajs0"),f=a("FbSi"),Z=a("ZzQX"),b=a("Oyie");const w=({project:e})=>(0,p._f)(e)?(0,r.Z)(u.Z,{alt:`Thumbnail of a model in the project ${e.name}
1`,thumbnails:e.thumbnails[0],deferImages:!0,width:24,height:24,className:Z.Z["project-icon"]}):(0,r.Z)("div",{className:Z.Z.icon},void 0,o||(o=(0,r.Z)("i",{className:"fa-regular fa-folder-open"}))),y=({orgUid:e,onChange:t,value:a,onNavigate:o})=>{const u=n.useRef(null),[m,y]=n.useState([]),_=m[m.length-1],N=(0,h.Z)((({Api:t},a)=>{const o=_?_.uid:void 0;return t.searchOrgProjects(e,{cursor:a,parent:o})}),[null==_?void 0:_.uid]);n.useEffect((()=>{N.onLoadFirst()}),[null==_?void 0:_.uid]);const D=n.useCallback((()=>N.hasNextPage?N.onLoadNext():b.resolve()),[N]);(0,g.Z)(u,D,[D],u.current);const k=e=>{t(e)},C=(0,l.v9)(d.wl.authUser.user),O=(0,f.Z)(e),P=C.isStaff||"admin"===O,T=(0,v.Q)(e,(()=>N.onLoadFirst()));return(0,r.Z)("div",{className:Z.Z.view},void 0,n.createElement("div",{className:(0,c.AK)(Z.Z.main,{[(0,c.c6)(Z.Z,"loading")]:N.isLoading}),ref:u},N.list.length>0?(0,r.Z)(n.Fragment,{},void 0,(0,r.Z)("div",{className:(0,c.AK)(Z.Z["back-header"],{[(0,c.c6)(Z.Z,"hidden")]:0===m.length}),onClick:()=>{y(m.slice(0,m.length-1))}},void 0,i||(i=(0,r.Z)("span",{className:"fa-regular fa-chevron-left"})),"Choose a folder"),_?(0,r.Z)("div",{className:(0,c.AK)(Z.Z["project-item"],Z.Z["project-header"],{[(0,c.c6)(Z.Z,"selected")]:_.uid===(null==a?void 0:a.uid)}),onClick:()=>k(_)},void 0,(0,r.Z)(w,{project:_}),(0,r.Z)("div",{className:Z.Z["project-name"]},void 0,_.name)):null,N.list.map((e=>(0,r.Z)("div",{className:(0,c.AK)(Z.Z["project-item"],{[(0,c.c6)(Z.Z,"selected")]:e.uid===(null==a?void 0:a.uid),[(0,c.c6)(Z.Z,"folder")]:!(0,p._f)(e)})},e.uid,(0,r.Z)("div",{className:Z.Z["project-info"],onClick:()=>k(e)},void 0,(0,p._f)(e)?(0,r.Z)(w,{project:e}):null,(0,r.Z)("div",{className:Z.Z["project-name"]},void 0,e.name)),e.folderCount>0?(0,r.Z)("div",{className:(0,c.AK)(Z.Z.chevron,"fa-regular fa-chevron-right"),onClick:()=>(e=>{y([...m,e]),o&&o()})(e)}):null)))):(0,r.Z)("div",{className:Z.Z.emptyState},void 0,"There is no project available.",s||(s=(0,r.Z)("br",{})),P?(0,r.Z)("span",{className:Z.Z.newProject,onClick:T},void 0,"Create a new project."):"Ask your organization admin to create a project.")),(0,r.Z)("div",{className:Z.Z.footer}))},_=({orgUid:e,onChange:t,value:a,className:o="",disabled:i})=>
1{const[s,l]=(0,n.useState)(!1);return(0,r.Z)(m.Z,{labelValue:a?a.name:"Select a project or folder",className:(0,c.AK)(Z.Z["folder-dropdown"],o),disabled:i,onClose:()=>{if(s)return l(!1),!1}},void 0,(o=>(0,r.Z)(y,{orgUid:e,value:a,onNavigate:()=>l(!0),onChange:e=>{l(!1),t(e),o.onToggle()}})))}},c2Jd:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});var o,i=a("sQwH"),s=a("3Z9q"),r=a("0qif");const n=function({model:e,type:t="regular"}){const a={10:"We do not support this file format",11:"We do not recognize this file format",13:"We could not read the model file, or there is no data to display",20:"Something went wrong while reading the file",21:"Something went wrong while processing textures",31:"Something went wrong while processing materials",33:"Something went wrong while processing materials",50:"This model file is too complex (too many polygons, meshes, or textures)"},n=(0,r.F)("UNDERSTANDING_ERROR_CODES"),l=(0,r.X)();return(0,i.Z)("div",{className:"c-model-error"},void 0,(0,i.Z)("div",{className:"c-model-error__content"},void 0,(0,i.Z)("div",{className:"c-model-error__info"},void 0,"small"===t?(0,i.Z)("div",{className:"c-model-error__info-type"},void 0,`Error${e.status.code?" "+e.status.code:""}: `,e.status.code&&a[e.status.code]?a[e.status.code]:"Something went wrong"):(0,i.Z)(s.Fragment,{},void 0,o||(o=(0,i.Z)("h2",{className:"c-model-error__info-title"},void 0,"Processing Failed")),(0,i.Z)("div",{className:"c-model-error__info-type"},void 0,`Error${e.status.code?" "+e.status.code:""}: `,e.status.code&&a[e.status.code]?a[e.status.code]:"Something went wrong"),(0,i.Z)("div",{className:"c-model-error__info-help"},void 0,(0,i.Z)("a",{className:"button btn-primary btn-small",href:`${n}`,target:"_blank",rel:"noopener noreferrer"},void 0,"learn more"),(0,i.Z)("a",{className:"button btn-contact btn-small",href:`${l}`,target:"_blank",rel:"noopener noreferrer"},void 0,"contact us"))))))}},cANE:(e,t,a)=>{a("nclc"),(window.nunjucksPrecompiled=window.nunjucksPrecompiled||{})["front/popups/missing-webgl.jinja"]={b_popup_content:function(e,t,a,o,i){var s=null,r=null,n="";try{a=a.push(!0),n+='\n\n    Sorry, your browser is not compatible with the 3D settings editor. <br>\n    Please use a WebGL-enabled browser to edit your 3D settings. <br>\n    See the <a href="',n+=o.suppressValue((s=9,r=38,o.callWrap(o.contextOrFrameLookup(t,a,"help_article_url"),"help_article_url",t,["COMPATIBILITY"])),e.opts.autoescape),i(null,n+='" target="_blank" rel="noopener noreferrer">Help Center</a> for more information.\n\n')}catch(e){i(o.handleError(e,s,r))}},b_popup_footer:function(e,t,a,o,i){var s="";try{a=a.push(!0),s+='\n    <div class="actions">\n\n    <button class="button btn-medium btn-primary submit" type="submit">',s+=o.suppressValue(e.getFilter("default").call(t,o.memberLookup(o.contextOrFrameLookup(t,a,"buttons"),"okLabel"),"OK"),e.opts.autoescape),i(null,s+="</button>\n\n    </div>\n")}catch(e){i(o.handleError(e,null,null))}},root:function(e,t,a,o,i){var s="";try{var r=null;e.getTemplate("front/layouts/popup.jinja",!0,"front/popups/missing-webgl.jinja",!1,(function(n,l){if(n)i(n);else{for(var d in(r=l).blocks)t.addBlock(d,r.blocks[d]);var c,p;s+="\n\n",c="Compatibility error",a.set("popupTitle",c,!0),a.topLevel&&t.setVariable("popupTitle",c),a.topLevel&&t.addExport("popupTitle",c),s+="\n",p="popup-message",a.set("popupClass",p,!0),a.topLevel&&t.setVariable("popupClass",p),a.topLevel&&t.addExport("popupClass",p),s+="\n\n",(r?function(e,t,a,o,i){i("")}:t.getBlock("popup_content"))(e,t,a,o,(function(n,l){n?i(n):(s+=l,s+="\n\n",(r?function(e,t,a,o,i){i("")}:t.getBlock("popup_footer"))(e,t,a,o,(function(n,l){n?i(n):(s+=l,s+="\n",r?r.rootRenderFunc(e,t,a,o,i):i(null,s))})))}))}}))}catch(e){i(o.handleError(e,null,null))}}}}}]);
2//# sourceMappingURL=23470f212898de0b3af0f095e72145c5-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.