1import{u as L,r as n,e as O,_ as s,j as o,a as e,M as P,L as R,F as z}from"./index.7613290f.js";import{L as U}from"./Loader.2a36551f.js";import{B as i}from"./Button.5e3edbef.js";import{B as E}from"./ButtonBox.f5ca8933.js";import{I as V}from"./Input.f61068b8.js";import{S as q}from"./SearchInput.ed3c2546.js";import{S as G}from"./SectionTitle.851f4667.js";import{u as Y}from"./[email protected]";import{A as Z}from"./APIApplication.845cbbc1.js";import"./appInsights.79eb1af4.js";/* empty css */import"./Button.module.5bbc35fb.js";import"./ButtonBox.module.888fa962.js";import"./Input.module.1ba51252.js";import"./[email protected]";const X="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAApCAIAAAAwIAdoAAAACXBIWXMAABYlAAAWJQFJUiTwAAACv0lEQVRYhbWY32raUBzHf02aDDPlhEUFpeMIk4I31WJvdlPdE9TtBax7AbcnEJ/A9QVm+wTr2HWp2812MUGvhOFGwkBBKyTYKjUTd3EkxiTG1hy/V+Fwzvnkd/L7d7Izm83As1R9WusPRY7NhgKr5jAeGfJoUqgrz7403/z48/Xm1mXmrhfMuTJ4W1ceOHlzm8qtrgWDOJY+qdYflltdy2AuKtInFWyHdhJBMYGnTDpXBspoYh5BHFtJPndftQnJ7mOVgz13gzYkyXf3xjPi2I9pfIqltavWeHmtPwSAlCiITn6Vx1IpETGscZ+8Y88Rqj697Khn7V5TGxuDWOBzUTGPpRTyNbSxOvlHdmxo4wtlcNlRzV8OC/wplorxsBlpJdX6w0JdsXxws7DAZ0OBmMCTF3KZiTi2lIi8i4cdSI+K+Qcqj6VqGoPZI7aBAYALZUCCb05qaONtYAAAcexJBIHhe++bf7eBSSLf9fE+8QsGAGr9oXvC30yIYz+9fGG4HwMAn7sadQwAmEMNDJuoYxDHGv69IJkjlJayQb9lhFH1KXUMAKREwUpqqKNtkOzy2rE8gmQ3k4rsR8U4Znjvqt3cWjyAAQC8rlxuIE2fnrV7VlIK+aiTAOBDuyebagoDAJnVLa4Xafr09fffxhkysK5P86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WebToken:p,PostSyncGoolePlayStoreApp:A}=Z({tokenParam:c}),y=L(),a=sessionStorage.getItem("account"),[r,h]=n.exports.useState(null),[m,g]=n.exports.useState(""),[f,S]=n.exports.useState(!1),[w,l]=n.exports.useState(!1),[k,H]=n.exports.useState(null),N=O(t=>t.menu.menu),{choose:x,chooseUserLevel:v,chooseGroupID:b,chooseGroupName:I}=N,M=sessionStorage.getItem("groupName"),B=N.schoolOption||M,[J,j]=n.exports.useState(!1),Q=t=>{if(!t.url){console.error("Google Store Web Token URL is empty.");return}if(window.gapi&&window.gapi.iframes){const C={url:t.url,where:document.getElementById("container"),attributes:{style:"width: 100%; height: 1000px",scrolling:"yes"}};try{window.gapi.iframes.getContext().openChild(C),console.log("Iframe opened successfully")}catch(u){console.error("Error opening iframe:",u)}
1}else console.error("gapi or gapi.iframes is not loaded")},D=async()=>{j(!0);try{const t=await p({unitName:B});H(t),window.gapi?window.gapi.load("gapi.iframes",()=>{setTimeout(()=>{console.log("Attempting to initialize client after delay"),Q(t)},1e3)}):console.error("Google API (gapi) is not available")}catch(t){console.log("Error loading Google Store Web Token",t)}};n.exports.useEffect(()=>{if(x==="Android"){const t=document.createElement("script");return t.src="https://apis.google.com/js/api.js",t.async=!0,t.defer=!0,t.onload=()=>{console.log("Google API script loaded"),D()},document.body.appendChild(t),()=>{document.body.removeChild(t)}}},[x]);const K=n.exports.useRef(null),T=t=>{h(t)};return{selectedFile:r,fileInputRef:K,searchText:m,searchResult:f,isWindowsLoading:w,googleStoreWebToken:k,choose:x,showAndroidContainer:J,HandleSetSelectedFile:T,HandleSetSearchText:t=>{g(t)},HandlePostUploadMSI:async()=>{if(!r){s.error("\u8ACB\u9078\u64C7\u6A94\u6848");return}const t=200*1024*1024;if(r.size>t){s.error("\u6A94\u6848\u5927\u5C0F\u8D85\u904E200MB");return}const C=JSON.stringify({Account:a,GroupName:v==="\u8CC7\u8A0A\u8A2D\u5099\u7D44\u9577"?b:I,AppName:r.name,VersionCheck:!1}),u=new FormData;u.append("file",r,r.name),u.append("uploadinfo",C);try{await d({UnitName:v==="\u8CC7\u8A0A\u8A2D\u5099\u7D44\u9577"?b:I,Data:u})?(s.success("\u4E0A\u50B3\u6210\u529F"),T(null)):s.error("\u4E0A\u50B3\u5931\u6557")}catch(W){console.log(W)}},HandleSearchWin11StoreApp:async()=>{l(!0);try{const t=await F(m);S(t)}catch(t){console.log(t)}finally{l(!1)}},HandleClientLoad:D,HandleNavigate:t=>{y(`/softwareManager/MDMMSIUpload/MDMWin11StoreAppInfo?appID=${t.AppStoreID}`)},HandleSyncGooglePlayStoreApp:async()=>{try{await A({unitName:B})?s.success("GooglePlay\u5546\u5E97App\u540C\u6B65\u6210\u529F"):s.error("GooglePlay\u5546\u5E97App\u540C\u6B65\u5931\u6557")}catch(t){console.log(t),s.error("GooglePlay\u5546\u5E97App\u540C\u6B65\u5931\u6557")}}}}const Ce=()=>{const{selectedFile:c,fileInputRef:d,searchText:F,searchResult:p,isWindowsLoading:A,googleStoreWebToken:y,choose:a,showAndroidContainer:r,HandleSetSelectedFile:h,HandleSetSearchText:m,HandlePostUploadMSI:g,HandleSearchWin11StoreApp:f,HandleNavigate:S,HandleSyncGooglePlayStoreApp:w}=ee();return o("div",{className:"MDMMSIUpload",children:[a?e(G,{children:a==="iOS"?"\u90E8\u7F72iOS\u8EDF\u9AD4":a==="Android"?"\u90E8\u7F72Android\u8EDF\u9AD4":a==="ChromeOS"?"\u90E8\u7F72Chrome\u8EDF\u9AD4":a==="Windows"&&"\u4E0A\u50B3Windows\u8EDF\u9AD4"}):e("div",{className:"w-full flex justify-center items-center color-blue2 text-xl font-medium mt-15",children:"\u8ACB\u5148\u9078\u64C7\u7CFB\u7D71"}),a==="Windows"&&o("div",{className:"w-full flex flex-wrap gap-y-15",children:[A?e("div",{className:"w-full justify-center items-center",children:e(U,{})}):o("div",{className:"w-full flex flex-wrap gap-y-5 mt-5",children:[o("div",{className:"w-full flex justify-center items-center gap-x-5",children:[e(i,{type:"button",format:"btn-file",onClick:()=>d.current.click(),children:"\u9078\u64C7\u6A94\u6848"}),e("input",{type:"file",accept:".msi",onChange:l=>h(l.target.files[0]),style:{display:"none"},ref:d}),e("span",{children:c?c.name:"\u672A\u9078\u64C7\u4EFB\u4F55\u6A94\u6848"}),o(i,{type:"button",onClick:g,children:[e("img",{src:Y}),"\u4E0A\u50B3"]})]}),e("div",{className:"w-full text-center",children:"\u50C5\u53EF\u4E0A\u50B3MSI\u6A94\u6848(\u6A94\u6848\u5927\u5C0F\u9700\u5C0F\u65BC200MB)"}),o("div",{className:"w-full flex justify-center items-center gap-x-2.5",children:[e(V,{type:"checkbox",name:"class"}),e("span",{className:"font-medium bg-[#edfafd]",children:"\u7121\u9808\u6AA2\u67E5\u8EDF\u9AD4\u7248\u672C"})]}),e("div",{className:"w-full text-center text-lg text-[#FF0000]",children:"\u672C\u5E73\u81FA\u6703\u5075\u6E2C\u662F\u5426\u5DF2\u4E0A\u67B6\u8F03\u65B0\u7248\u8EDF\u9AD4\uFF0C\u60A8\u53EF\u4EE5\u512A\u5148\u53C3\u8003\u65B0\u7248\u8EDF\u9AD4\u3002\u82E5\u60A8\u6709\u4E0A\u67B6\u820A\u7248\u9700\u6C42\uFF0C\u8ACB\u52FE\u9078\u7121\u8996\u7248\u672C\u6AA2\u67E5"})]}),o("div",{className:"w-full",children:[e(G,{children:"Windows Store App"}),o("div",{className:"w-full flex flex-wrap gap-y-5",children:[o("div",{className:"w-full flex sm:justify-center justify-between items-center gap-x-3 mt-5",children:[o("span",{className:"relative select-none",children:[e("img",{src:$,alt:"winStoreIcon",className:"size-[45px] min-w-[45px]",draggable:"false"}),e("div",{className:"absolute top-1/3 left-1/3 translate-x-[-13%] translate-y-[-7%] text-white text-xl",children:"\u5341"})]}),e(q,{placeholder:"\u8ACB\u8F38\u5165\u8EDF\u9AD4\u540D\u7A31",onChange:l=>m(l.target.value),handleSearch:f,containerClassName:"sm:w-1/3 w-full"}),o(i,{type:"button",onClick:f,children:[e("img",{src:P}),"\u641C\u5C0B"]})]}),A?e("div",{className:"w-full justify-center items-center",children:e(U,{})}):e("div",{className:"w-full grid lg:grid-cols-5 md:grid-cols-4 sm:grid-cols-3 gap-x-3 gap-y-6 sm:auto-rows-[minmax(250px,_1fr)] py-10",children:p.length>0&&p.map(l=>o("div",{className:"w-full flex sm:flex-col rounded border-1 border-[#5dcbe5] cursor-pointer items-center hover:shadow-md hover:-translate-y-3 transition-all ease-in-out",onClick:()=>S(l),children:[e("div",{className:"sm:h-4/5 p-3",children:e("img",{src:l.iconURL,alt:l.AppName,className:"h-20 sm:h-full w-full object-contain",draggable:"false"})}),e("div",{className:"text-center",children:l.AppName})]},l.AppStoreID))})]})]})]}),a==="iOS"&&o("div",{className:"w-full flex flex-wrap gap-y-5 mt-5",children:[e("div",{className:"w-full flex flex-wrap justify-center items-center text-xl",children:"\u524D\u5F80Apple School Manager\u9032\u884CiOS\u8F09\u5177\u8EDF\u9AD4\u90E8\u7F72"}),e("div",{className:"w-full flex justify-center items-center",children:e("img",{src:X})}),e(E,{children:e(i,{type:"button",children:e(R,{to:"https://school.apple.com/",target:"_blank",children:"\u524D\u5F80"})})})]}),a==="Android"&&r&&o(z,{children:[e(E,{className:"mt-5 justify-start",children:e(i,{type:"button",onClick:w,children:"\u540C\u6B65\u6838\u51C6App"})}),e("div",{id:"container",className:"w-full mt-5"})]}),a==="ChromeOS"&&o("div",{className:"w-full flex flex-wrap gap-y-5 mt-5",children:[e("div",{className:"w-full flex justify-center items-center text-xl",children:"\u524D\u5F80Google WorkSpace\u9032\u884CChromeOS\u8F09\u5177\u8EDF\u9AD4\u90E8\u7F72"}),e(E,{children:o(R,{to:"https://accounts.google.com/signin/v2/identifier?passive=1209600&osid=1&continue=https%3A%2F%2Fadmin.google.com%2F&followup=https%3A%2F%2Fadmin.google.com%2F&flowName=GlifWebSignIn&flowEntry=ServiceLogin",target:"_blank",className:"flex flex-wrap border-1 border-moe-blue-border h-[45px] items-center px-4 roun
1ded hover:bg-moe-blue3 hover:text-white gap-x-2",children:[e("img",{className:"h-[25px]",src:_}),e("span",{children:"\u524D\u5F80"})]})})]})]})};export{Ce as default};
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.