PageSourceSearch

https://amlacademy.kz/assets/index-ByWQ_hzL.js

js amlacademy.kz collected 2026-10-03 00:02:39 UTC 17,626 bytes, 1 lines download raw bytes

1import{b as e,j as s,p as t,A as r,aq as a}from"./index-DB0xq1D7.js";import{a as l}from"./utils-vendor-FQm2gtxD.js";import{r as o,b as i,u as n}from"./router-vendor-DH0V_8-b.js";import{F as d}from"./index-HNKu9wJ5.js";import{H as c}from"./index-2fwahYDk.js";import{d as m}from"./courseRatings-CqfGykd9.js";import{r as x}from"./mediaUrl-DcWddKSO.js";import{F as u,a as p,b as g,c as h,d as j}from"./Squares2X2Icon-Bo0BFMc_.js";import{F as b}from"./StarIcon-BPQUsoVO.js";import"./index-BfKP8MRL.js";import"./StyleContext-3fqeZMRK.js";import"./Menu-Cb-V7ILV.js";import"./createSvgIcon-DtnuThZv.js";import"./createSvgIcon-DWiJjwMO.js";import"./isMuiElement-DT2EIS9h.js";import"./ownerWindow-QRgVUXjd.js";import"./useIsFocusVisible-IsRIWIos.js";import"./useId-BqeexSNn.js";import"./useControlled-D22dYNM7.js";import"./Visibility-Ba7z_YL9.js";import"./logo-CJkTMS6v.js";import"./index.esm-W9NXRo-P.js";import"./iconBase-1XrcVFDM.js";import"./ButtonBase-CjNjRgwv.js";import"./assertThisInitialized-C6yzK3Dj.js";import"./Fade-CsJuP-_n.js";import"./utils-DmVbtTvG.js";import"./getReactElementRef-W9bGaOYQ.js";import"./Paper-CC9aL5pV.js";import"./Toolbar-C8bV3Jen.js";import"./Container-CvE7vUGT.js";import"./styled-1e8Ozeih.js";import"./useThemeProps-DvGCFBxs.js";import"./getThemeProps-Cax5YegO.js";import"./IconButton-DFgaxqn6.js";import"./Button-CvRgN6xi.js";import"./Menu-BJxesI1H.js";import"./index-uUw5inVx.js";import"./useSlotProps-Bm0B6GxY.js";import"./resolveComponentProps-Czg6VUHE.js";import"./Grow-BZSu5OBP.js";import"./Modal-Blrpc4ZK.js";import"./Portal-CgvRbaMW.js";import"./List-vyxple7h.js";import"./MenuItem-BFbHzJ90.js";import"./listItemIconClasses-fWNpvxKA.js";import"./listItemTextClasses-cTsuh3G4.js";import"./dividerClasses-CCZvOQva.js";import"./Stack-DvilGQ8e.js";import"./ListItemButton-HmI6iN39.js";import"./Slide-CBSY1hfk.js";import"./listItemButtonClasses-CRcpiZYI.js";import"./ListItem-6_CRDAVi.js";import"./ListItemText-bvq_KbqB.js";function f({title:e,titleId:s,...t},r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":s},t),e?o.createElement("title",{id:s},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"}))}const y=o.forwardRef(f);function v({title:e,titleId:s,...t},r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":s},t),e?o.createElement("title",{id:s},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m-3-2.818.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const w=o.forwardRef(v);function N({title:e,titleId:s,...t},r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":s},t),e?o.createElement("title",{id:s},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const C=o.forwardRef(N);function k({title:e,titleId:s,...t},r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":s},t),e?o.createElement("title",{id:s},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z"}))}const _=o.forwardRef(k);function O({title:e,titleId:s,...t},r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":s},t),e?o.createElement("title",{id:s},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z"}))}const S=o.forwardRef(O);function T({title:e,titleId:s,...t},r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":s},t),e?o.createElement("title",{id:s},e):null,o.createElement("path",{fillRule:"evenodd",d:"M12.963 2.286a.75.75 0 0 0-1.071-.136 9.742 9.742 0 0 0-3.539 6.176 7.547 7.547 0 0 1-1.705-1.715.75.75 0 0 0-1.152-.082A9 9 0 1 0 15.68 4.534a7.46 7.46 0 0 1-2.717-2.248ZM15.75 14.25a3.75 3.75 0 1 1-7.313-1.172c.628.465 1.35.81 2.133 1a5.99 5.99 0 0 1 1.925-3.546 3.75 3.75 0 0 1 3.255 3.718Z",clipRule:"evenodd"}))}const E=o.forwardRef(T),I={hidden:{opacity:0,y:20},visible:{opacity:1,y:0}},L={visible:{transition:{staggerChildren:.1}}},M=({course:e,onClick:r,featured:l=!1})=>{const{courseDTO:o}=e,{course_id:i,course_name:n,course_price:d,course_image:c,duration:u,course_for_member_of_the_system:p,rating:g,type_of_study:h,typeOfStudy:f,courseCategory:v}=o,N=m(g),k=0===d||1===d,O=f||h,T="онлайн"===O,L="дистанционное"===O;return s.jsxs(t.div,{variants:I,whileHover:{y:-5,scale:1.02},whileTap:{scale:.98},className:"bg-white rounded-xl shadow-md hover:shadow-xl transition-all duration-300 overflow-hidden border border-gray-100 cursor-pointer group relative "+(l?"ring-2 ring-blue-500 ring-offset-2":""),onClick:r,children:[l&&s.jsx("div",{className:"absolute top-3 left-3 z-10",children:s.jsxs("div",{className:"bg-gradient-to-r from-orange-400 to-red-500 text-white px-3 py-1 rounded-full text-xs font-bold flex items-center space-x-1",children:[s.jsx(E,{className:"w-3 h-3"}),s.jsx("span",{children:"Популярный"})]})}),L&&s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:x(c),alt:n,className:"w-full h-48 object-cover group-hover:scale-105 transition-transform duration-300"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),s.jsx("div",{className:"absolute top-3 right-3",children:s.jsxs("div",{className:"inline-flex items-center space-x-1 px-2 py-1 rounded-full text-xs font-medium backdrop-blur-sm "+(T?"bg-green-100/90 text-green-800 border border-green-200":L?"bg-blue-100/90 text-blue-800 border border-blue-200":"bg-purple-100/90 text-purple-800 border border-purple-200"),children:[T?s.jsx(S,{className:"w-3 h-3"}):L?s.jsx(y,{className:"w-3 h-3"}):s.jsx(C,{className:"w-3 h-3"}),s.jsx("span",{children:O})]})})]}),T&&s.jsxs("div",{className:"relative h-32 bg-gradient-to-br from-green-500 to-blue-600 flex items-center justify-center",children:[s.jsxs("div",{className:"text-center text-white",children:[s.jsx(S,{className:"w-12 h-12 mx-auto mb-2 opacity-80"}),s.jsx("span",{className:"text-sm font-medium",children:"Онлайн курс"})]}),s.jsx("div",{className:"absolute top-3 right-3",children:s.jsxs("div",{className:"inline-flex items-center space-x-1 px-2 py-1 rounded-full text-xs font-medium bg-green-100/90 text-green-800 border border-green-200 backdrop-blur-sm",children:[s.jsx(S,{className:"w-3 h-3"}),s.jsx("span",{children:O})]})})]}),s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex items-start justify-between mb-3",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900 line-clamp-2 group-hover:text-blue-600 transition-colors flex-1 mr-2",children:n}),N>0&&s.jsxs("div",{className:"flex items-center space-x-1 text-sm text-yellow-500 flex-shrink-0",children:[s.jsx(b,{className:"w-4 h-4"}),s.jsx("span",{className:"font-medium",children:N.toFixed(1)})]})]}),s.jsxs("div",{className:"flex items-center text-sm text-gray-600 mb-3 space-x-4",children:[s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx(j,{className:"w-4 h-4"}),s.jsx("span",{children:u||"1 час"})]}),s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx(_,{className:"w-4 h-4"}),s.jsx("span",{children:"Все уровни"})]})]}),s.jsx("p",{className:"text-sm text-gray-500 mb-4 line-clamp-2",children:p||"Для всех субъектов финансового мониторинга"}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center space-x-2",children:k?s.jsx("span",{className:"text-lg font-bold text-green-600",children:"Бесплатно"}):s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx(w,{className:"w-4 h-4 text-gray-400"}),s.jsxs("span",{className:"text-lg font-bold text-gray-900",children:[null==d?void 0:d.toLocaleStr
1ing()," ₸"]})]})}),s.jsx(a,{className:"w-5 h-5 text-gray-400 group-hover:text-blue-500 group-hover:translate-x-1 transition-all duration-200"})]}),v&&s.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100",children:s.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-700",children:v.category_name})})]})]})},D=({searchQuery:e,onSearchChange:t,selectedCategory:r,onCategoryChange:a,selectedFormat:l,onFormatChange:o,categories:i,viewMode:n,onViewModeChange:d})=>{const c=[{id:"all",label:"Все форматы",icon:s.jsx(u,{className:"w-4 h-4"})},{id:"дистанционное",label:"Дистанционно",icon:s.jsx(y,{className:"w-4 h-4"})},{id:"онлайн",label:"Онлайн",icon:s.jsx(S,{className:"w-4 h-4"})}];return s.jsxs("div",{className:"bg-white rounded-xl shadow-md p-4 sm:p-6 mb-8",children:[s.jsxs("div",{className:"flex flex-col space-y-4 lg:flex-row lg:space-y-0 lg:space-x-6",children:[s.jsx("div",{className:"flex-1",children:s.jsxs("div",{className:"relative",children:[s.jsx(p,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-5 h-5"}),s.jsx("input",{type:"text",placeholder:"Поиск курсов...",value:e,onChange:e=>t(e.target.value),className:"w-full pl-10 pr-4 py-3 border border-gray-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent text-gray-900 placeholder-gray-500"})]})}),s.jsx("div",{className:"flex flex-col space-y-2 sm:flex-row sm:space-y-0 sm:space-x-2",children:c.map(e=>s.jsxs("button",{onClick:()=>o(e.id),className:"flex items-center justify-center space-x-2 px-4 py-3 rounded-lg text-sm font-medium transition-all duration-200 "+(l===e.id?"bg-blue-500 text-white shadow-lg":"bg-gray-100 text-gray-600 hover:bg-gray-200"),children:[e.icon,s.jsx("span",{children:e.label})]},e.id))}),s.jsxs("div",{className:"flex bg-gray-100 rounded-lg p-1 self-start",children:[s.jsx("button",{onClick:()=>d("grid"),className:"p-2 rounded-md transition-all duration-200 "+("grid"===n?"bg-white shadow-sm text-blue-600":"text-gray-400 hover:text-gray-600"),children:s.jsx(g,{className:"w-5 h-5"})}),s.jsx("button",{onClick:()=>d("list"),className:"p-2 rounded-md transition-all duration-200 "+("list"===n?"bg-white shadow-sm text-blue-600":"text-gray-400 hover:text-gray-600"),children:s.jsx(h,{className:"w-5 h-5"})})]})]}),i.length>0&&s.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100",children:s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx("button",{onClick:()=>a("all"),className:"px-3 py-1.5 rounded-full text-sm font-medium transition-all duration-200 "+("all"===r?"bg-blue-100 text-blue-800 border border-blue-200":"bg-gray-100 text-gray-600 hover:bg-gray-200"),children:"Все категории"}),i.map(e=>s.jsx("button",{onClick:()=>a(e),className:"px-3 py-1.5 rounded-full text-sm font-medium transition-all duration-200 "+(r===e?"bg-blue-100 text-blue-800 border border-blue-200":"bg-gray-100 text-gray-600 hover:bg-gray-200"),children:e},e))]})})]})},A=()=>s.jsx(t.div,{initial:"hidden",animate:"visible",variants:I,className:""});
1function B(){const a=i(),m=n(),[x,p]=o.useState([]),[g,h]=o.useState([]),[j,b]=o.useState({}),[f,y]=o.useState(null),[v,w]=o.useState(!0),[N,C]=o.useState(""),[k,_]=o.useState("all"),[O,S]=o.useState("all"),[T,E]=o.useState("grid"),I=localStorage.getItem("jwtToken"),B=o.useCallback(async()=>{try{const s=I?"/api/aml/course/getUserCourses":"/api/aml/course/getUserCoursesNoPr",t=I?{headers:{Authorization:`Bearer ${I}`}}:{},r=await l.get(`${e}${s}`,t);if(200===r.status){const e=r.data;p(e);const s={};e.forEach(e=>{var t;e.courseDTO.typeOfStudy||e.courseDTO.type_of_study;const r=(null==(t=e.courseDTO.courseCategory)?void 0:t.category_name)||"Общие";s[r]||(s[r]=[]),s[r].push(e)}),b(s)}else y(r.statusText)}catch(s){y(s.message)}w(!1)},[I]);o.useEffect(()=>{B()},[B]),o.useEffect(()=>{"#top"===m.hash&&window.scrollTo(0,0)},[m]),o.useEffect(()=>{let e=x;"all"!==O&&(e=e.filter(e=>(e.courseDTO.typeOfStudy||e.courseDTO.type_of_study)===O)),"all"!==k&&(e=e.filter(e=>{var s;return(null==(s=e.courseDTO.courseCategory)?void 0:s.category_name)===k})),N&&(e=e.filter(e=>{var s;return e.courseDTO.course_name.toLowerCase().includes(N.toLowerCase())||(null==(s=e.courseDTO.course_for_member_of_the_system)?void 0:s.toLowerCase().includes(N.toLowerCase()))})),"all"===O&&(e=e.sort((e,s)=>{const t=e.courseDTO.typeOfStudy||e.courseDTO.type_of_study,r=s.courseDTO.typeOfStudy||s.courseDTO.type_of_study;return"дистанционное"===t&&"онлайн"===r?-1:"онлайн"===t&&"дистанционное"===r?1:0})),h(e)},[x,O,k,N]);const R=o.useCallback(e=>{a(`/courses/${e.courseDTO.course_id}`)},[a]),F=Object.keys(j);return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(c,{dark:!0}),s.jsx("div",{className:"pt-20 md:pt-24 pb-8",children:s.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-7xl",children:[s.jsx(A,{}),s.jsx(D,{searchQuery:N,onSearchChange:C,selectedCategory:k,onCategoryChange:_,selectedFormat:O,onFormatChange:S,categories:F,viewMode:T,onViewModeChange:E}),s.jsxs(t.div,{initial:"hidden",animate:"visible",variants:L,children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:N?`Результаты поиска "${N}"`:"Все курсы"}),s.jsxs("div",{className:"text-sm text-gray-600",children:["Найдено: ",g.length," курсов"]})]}),v?s.jsx("div",{className:"grid gap-6 "+("grid"===T?"grid-cols-1 md:grid-cols-2 lg:grid-cols-3":"grid-cols-1 max-w-4xl"),children:Array.from({length:6}).map((e,t)=>s.jsxs("div",{className:"bg-white rounded-xl shadow-md animate-pulse",children:[s.jsx("div",{className:"w-full h-48 bg-gray-200 rounded-t-xl"}),s.jsxs("div",{className:"p-6",children:[s.jsx("div",{className:"h-6 bg-gray-200 rounded mb-3"}),s.jsx("div",{className:"h-4 bg-gray-200 rounded mb-2"}),s.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"})]})]},t))}):f?s.jsx("div",{className:"text-center py-12",children:s.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-xl p-8 max-w-md mx-auto",children:[s.jsx("h3",{className:"text-lg font-semibold text-red-800 mb-2",children:"Ошибка загрузки"}),s.jsx("p",{className:"text-red-600 mb-4",children:f}),s.jsx("button",{onClick:B,className:"px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors",children:"Попробовать снова"})]})}):0===g.length?s.jsx("div",{className:"text-center py-12",children:s.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-8 max-w-md mx-auto",children:[s.jsx(u,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),s.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:N?"Курсы не найдены":"Нет доступных курсов"}),s.jsx("p",{className:"text-gray-600 mb-4",children:N?"Попробуйте изменить критерии поиска":"К сожалению, в данный момент нет доступных курсов"}),N&&s.jsx("button",{onClick:()=>{C(""),_("all"),S("all")},className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Сбросить фильтры"})]})}):s.jsx("div",{className:"grid gap-6 "+("grid"===T?"grid-cols-1 md:grid-cols-2 lg:grid-cols-3":"grid-cols-1 max-w-4xl"),children:s.jsx(r,{mode:"wait",children:g.map(e=>s.jsx(M,{course:e,onClick:()=>R(e)},e.courseDTO.course_id))})})]})]})}),s.jsx(d,{})]})}
1export{B 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.