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CAChB,EAAI,SAAUA,GACZ,OAAOA,GAAO,mBAAqBa,QAAUb,EAAIuC,cAAgB1B,QAAUb,IAAQa,OAAOhB,UAAY,gBAAkBG,CAC1H,EAAGpJ,EAAOC,QAAQmI,YAAa,EAAMpI,EAAOC,QAAiB,QAAID,EAAOC,QAAUgL,EAAQ7B,EAC5F,CACApJ,EAAOC,QAAUgL,EAASjL,EAAOC,QAAQmI,YAAa,EAAMpI,EAAOC,QAAiB,QAAID,EAAOC,O,wBCT/F,IAAIoI,EAAmB,EAAQ,OAS/BrI,EAAOC,QARP,SAAqC2L,EAAGC,GACtC,GAAKD,EAAL,CACA,GAAiB,iBAANA,EAAgB,OAAOvD,EAAiBuD,EAAGC,GACtD,IAAIC,EAAI7K,OAAOgI,UAAU8C,SAASjC,KAAK8B,GAAGI,MAAM,GAAI,GAEpD,MADU,WAANF,GAAkBF,EAAED,cAAaG,EAAIF,EAAED,YAAYM,MAC7C,QAANH,GAAqB,QAANA,EAAoB3D,MAAMgC,KAAKyB,GACxC,cAANE,GAAqB,2CAA2CI,KAAKJ,GAAWzD,EAAiBuD,EAAGC,QAAxG,CALc,CAMhB,EAC8C7L,EAAOC,QAAQmI,YAAa,EAAMpI,EAAOC,QAAiB,QAAID,EAAOC,O","sources":["webpack://benahmed-education/./node_modules/gatsby-plugin-mdx/index.js","webpack://benahmed-education/./node_modules/gatsby-plugin-mdx/mdx-renderer.js","webpack://benahmed-education/./src/components/ExerciseTitle.js","webpack://benahmed-education/./src/components/LazyExerciseSolution.js","webpack://benahmed-education/./src/components/PrintButton.js","webpack://benahmed-education/./src/components/NextPrevButtons.js","webpack://benahmed-education/./src/components/loader/index.js","webpack://benahmed-education/./src/templates/lesson.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/construct.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/objectWithoutProperties.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/toPrimitive.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/toPropertyKey.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/typeof.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"],"sourcesContent":["/**\n * Welcome to gatsby-plugin-mdx!\n *\n * Start reading in gatsby-node.js\n */\n\nconst MDXRenderer = require(`./mdx-renderer`)\n\nmodule.exports = {\n MDXRenderer: MDXRenderer,\n}\n","const React = require(`react`)\nconst { mdx } = require(`@mdx-js/react`)\nconst { useMDXScope } = require(`./context`)\n\nmodule.exports = function MDXRenderer({\n scope,\n children,\n ...props\n}) {\n const mdxScope = useMDXScope(scope)\n\n // Memoize the compiled component\n const End = React.useMemo(() => {\n if (!children) {\n return null\n }\n\n const fullScope = {\n // React is here just in case the user doesn't pass them in\n // in a manual usage of the renderer\n React,\n mdx,\n ...mdxScope,\n }\n\n const keys = Object.keys(fullScope)\n const values = keys.map(key => fullScope[key])\n const fn = new Function(`_fn`, ...keys, `${children}`)\n\n return fn({}, ...values)\n }, [children, scope])\n\n return React.createElement(End, {...props })\n}\n","import React from \"react\";\n\nconst ExerciseTitle = ({ title, rank, difficulty }) => {\n const addStars = number => {\n const stars = [];\n for (let index = 1; index <= 5; index++) {\n if (index <= number) {\n stars.push();\n } else {\n stars.push();\n }\n }\n return stars;\n };\n return (\n

\n {`${title} ${rank} `}\n {addStars(difficulty)}\n

\n );\n};\n\nexport default ExerciseTitle;\n","import React, { lazy, Suspense } from \"react\";\n\nimport Loader from \"components/loader\";\n\nconst ExerciseSolution = lazy(() => import(\"components/exerciseSolution\"));\nconst UserProvider = lazy(() => import(\"context/userContext\"));\n\nconst isSSR = typeof window === \"undefined\";\n\nconst LazyExerciseSolution = ({ printInfo, location, autoShow }) => {\n return (\n !isSSR && (\n }>\n \n \n )\n );\n};\n\nexport default LazyExerciseSolution;\n","import React from \"react\";\n\nconst PrintButton = () => {\n const printHandler = () => {\n window.print();\n };\n return (\n \n );\n};\n\nexport default PrintButton;\n","import React from \"react\";\nimport { Link } from \"gatsby\";\nimport PrintButton from \"./PrintButton\";\n\nconst NextPrevButtons = ({ next, prev, MiddleButton = PrintButton }) => {\n return (\n
\n {prev === null ? (\n
\n ) : (\n \n \n {prev.title}\n \n )}\n \n {next === null ? (\n
\n ) : (\n \n {next.title}\n \n \n )}\n
\n );\n};\n\nexport default NextPrevButtons;\n","import Loader from \"./Loader\";\n\nexport default Loader;\n","import React, { useEffect, useContext } from \"react\";\nimport { graphql, Link } from \"gatsby\";\nimport { MDXRenderer } from \"gatsby-plugin-mdx\";\nimport \"katex/dist/katex.min.css\";\n\nimport Layout from \"../components/layout\";\nimport NextPrevButtons from \"../components/NextPrevButtons\";\nimport { lessonDispatchContext } from \"../context/lessonsContext\";\nimport ArticlesAds from \"components/ArticlesAds\";\nimport LazyExerciseSolution from \"components/LazyExerciseSolution\";\nimport ExerciseTitle from \"components/ExerciseTitle\";\nimport Loader from \"components/loader\";\nimport PrintingHeader from \"components/PrintingHeader\";\nimport { useUser } from \"context/userContext\";\n\nexport const createSlug = (\n title,\n level,\n division,\n type,\n unite,\n postType,\n replacement = \"-\"\n) => {\n const getUrlFriendlyStr = str => {\n return str.trim().replace(/\\s/g, replacement);\n };\n if (type === \"مستوى\") {\n return `/${getUrlFriendlyStr(title)}`;\n }\n if (type === \"وحدة\") {\n return `/${getUrlFriendlyStr(title)}/${getUrlFriendlyStr(\n division\n )}-${getUrlFriendlyStr(level)}`;\n }\n if (type === \"post\") {\n return `/${getUrlFriendlyStr(title)}/${getUrlFriendlyStr(postType)}`;\n }\n\n return `/${getUrlFriendlyStr(title)}/${getUrlFriendlyStr(\n unite\n )}/${getUrlFriendlyStr(division)}-${getUrlFriendlyStr(level)}`;\n};\n\nconst LessonTemplate = ({\n banner,\n next,\n previous,\n content,\n printInfo,\n exos,\n location,\n}) => {\n const {\n userDetail: { profile },\n } = useUser();\n\n return (\n <>\n
\n
\n

دروس خصوصية مع الأستاذ بن أحمد

\n

\n لكل مستويات الطور الثانوي في مادة العلوم الفيزيائية\n

\n \n إقرأ المزيد\n \n
\n
\n \n\n {content}\n {exos.map(exo => (\n <>\n \n \n {exo.content}\n \n
\n \n
\n \n ))}\n {profile?.id === exos[0]?.authorId ? (\n <>\n \n
\n {exos.map(exo => (\n <>\n \n \n \n ))}\n
\n \n ) : null}\n \n \n \n );\n};\n\nconst Courses = ({ data, pageContext, location }) => {\n if (data.allFile && typeof window === \"object\") {\n window.location.reload();\n return ;\n }\n const { title } = pageContext;\n const setLessonDetails = useContext(lessonDispatchContext);\n const getLessonInfo = (data, title) => {\n const {\n node: {\n id,\n childMdx: { frontmatter, body },\n },\n next,\n previous,\n } = data.edges.filter(\n ({ node }) => node.childMdx.frontmatter.title === title\n )[0];\n return {\n next: next && {\n title: next.childMdx.frontmatter.title,\n slug: next.childMdx.fields.slug,\n },\n previous: previous && {\n title: previous.childMdx.frontmatter.title,\n slug: previous.childMdx.fields.slug,\n },\n printInfo: {\n id,\n title: frontmatter.title,\n lessonType: frontmatter.lessonType,\n level: frontmatter.level,\n unite: frontmatter.unite,\n domain: frontmatter.domain,\n division: frontmatter.division,\n },\n course: {\n banner: frontmatter.banner,\n thumbnail: frontmatter.thumbnail.childImageSharp.fluid,\n body,\n description: frontmatter.description,\n },\n };\n };\n const getExercisesInfo = data => {\n return data.edges.map(d => {\n const {\n node: {\n childMdx: { frontmatter, body },\n },\n } = d;\n return {\n title: frontmatter.title,\n unite: frontmatter.unite,\n exoId: frontmatter.exoId,\n level: frontmatter.level,\n division: frontmatter.division,\n difficulty: frontmatter.difficulty,\n authorId: frontmatter.author,\n rank: frontmatter.lessonRank,\n ads: false,\n content: body,\n };\n });\n };\n const { course, next, previous, printInfo } = getLessonInfo(\n data.lesson,\n title\n );\n const exercises = getExercisesInfo(data.exos);\n\n const { banner, thumbnail, body, description } = course;\n useEffect(() => {\n setLessonDetails(state => ({ ...state, lessonInfo: printInfo }));\n }, [printInfo]);\n return (\n \n \n \n );\n};\n\nexport default Courses;\n\nexport const query = graphql`\n query($level: String!, $division: String!, $lessonId: String!) {\n lesson: allFile(\n filter: {\n sourceInstanceName: { eq: \"courses\" }\n childMdx: {\n frontmatter: {\n level: { eq: $level }\n division: { eq: $division }\n lessonType: { ne: null }\n }\n }\n }\n sort: { fields: childMdx___frontmatter___rank }\n ) {\n edges {\n node {\n id\n childMdx {\n fields {\n slug\n }\n frontmatter {\n title\n domain\n lessonType\n unite\n division\n level\n description\n banner\n thumbnail {\n childImageSharp {\n fluid(maxWidth: 75, quality: 70) {\n ...GatsbyImageSharpFluid_withWebp\n originalName\n }\n }\n }\n }\n body\n excerpt\n }\n }\n next {\n childMdx {\n fields {\n slug\n }\n frontmatter {\n title\n }\n }\n }\n previous {\n childMdx {\n fields {\n slug\n }\n frontmatter {\n title\n }\n }\n }\n }\n }\n exos: allFile(\n filter: {\n sourceInstanceName: { eq: \"exercises\" }\n childMdx: {\n frontmatter: {\n level: { eq: $level }\n division: { eq: $division }\n lessonId: { eq: $lessonId }\n }\n }\n }\n sort: { fields: childMdx___frontmatter___lessonRank }\n ) {\n edges {\n node {\n childMdx {\n frontmatter {\n author\n exoId\n lessonRank\n division\n level\n difficulty\n }\n body\n }\n }\n }\n }\n }\n`;\n","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nvar isNativeReflectConstruct = require(\"./isNativeReflectConstruct.js\");\nfunction _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n } else {\n module.exports = _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n }\n return _construct.apply(null, arguments);\n}\nmodule.exports = _construct, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\nmodule.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\nvar iterableToArray = require(\"./iterableToArray.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;"],"names":["MDXRenderer","require","module","exports","React","mdx","useMDXScope","_ref","scope","children","props","_objectWithoutProperties","_excluded","mdxScope","End","useMemo","fullScope","_objectSpread","keys","Object","values","map","key","_construct","Function","concat","apply","_toConsumableArray","createElement","title","rank","difficulty","style","marginBottom","color","number","stars","index","push","addStars","ExerciseSolution","lazy","isSSR","window","printInfo","location","autoShow","Suspense","fallback","Loader","PrintButton","className","onClick","printHandler","print","next","prev","MiddleButton","Link","to","slug","createSlug","level","division","type","unite","postType","replacement","getUrlFriendlyStr","str","trim","replace","LessonTemplate","_exos$","banner","previous","content","exos","userDetail","profile","useUser","NextPrevButtons","exo","ExerciseTitle","lessonType","LazyExerciseSolution","id","authorId","PrintingHeader","ArticlesAds","_ref2","data","pageContext","allFile","reload","setLessonDetails","useContext","lessonDispatchContext","course","getLessonInfo","node","childMdx","frontmatter","body","edges","filter","_ref3","fields","domain","thumbnail","childImageSharp","fluid","description","lesson","exercises","d","exoId","author","lessonRank","ads","getExercisesInfo","useEffect","state","lessonInfo","Layout","classTitle","classSection","image","arr","len","length","i","arr2","Array","__esModule","arrayLikeToArray","isArray","setPrototypeOf","isNativeReflectConstruct","Parent","args","Class","Reflect","construct","bind","a","instance","prototype","arguments","toPropertyKey","obj","value","defineProperty","enumerable","configurable","writable","sham","Proxy","Boolean","valueOf","call","e","iter","Symbol","iterator","from","TypeError","objectWithoutPropertiesLoose","source","excluded","target","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","_typeof","input","hint","prim","toPrimitive","undefined","res","String","Number","arg","constructor","o","minLen","n","toString","slice","name","test"],"sourceRoot":""}