Files
old-kitabcitab-frontend/kitabcitab/.next/cache/webpack/client-development/7.pack

539 lines
38 KiB
Plaintext
Raw Normal View History

2023-03-08 12:08:29 +01:00
wpc<00><><10>webpack/lib/cache/PackFileCacheStrategy<67>PackContentItems <10><1E>Compilation/modules|/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/node_modules/next/dist/compiled/@next/react-refresh-utils/dist/loader.js!/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[3].oneOf[2].use[1]!/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/components/Result.js<1E>Compilation/codeGeneration|/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/node_modules/next/dist/compiled/@next/react-refresh-utils/dist/loader.js!/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[3].oneOf[2].use[1]!/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/components/Result.js|webpack<10>webpack/lib/NormalModule<11>webpack/lib/util/registerExternalSerializer<65>webpack-sources/SourceMapSource<10>dimport { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
var _s = $RefreshSig$();
2023-03-08 12:08:29 +01:00
import { React, useEffect, useState } from "react";
import { useRouter } from "next/router";
2023-03-08 12:08:29 +01:00
const Result = (param)=>{
let { result , term } = param;
_s();
const router = useRouter();
2023-03-08 12:08:29 +01:00
const { book , writer , text } = result._source;
const [title, setTitle] = useState();
let sentences;
const checkForMatches = (props)=>{
if (props.length === 1) return setTitle(props);
if (props.length > 1) {
return sentences.map((sentence)=>{
if (sentence.toLowerCase().includes(term.toLowerCase())) setTitle(sentence);
else setTitle(props[0]);
});
}
};
const splitText = ()=>{
try {
return text.match(/[^\.!\?]+[\.!\?]+/g);
} catch (e) {
(err)=>console.log(err);
}
};
useEffect(()=>{
sentences = splitText();
checkForMatches(sentences);
}, []);
// ako term nije pronadjen u textu onda
// treba provjeriti duzinu niza, ako niz ima jednu recenicu, recenica treba biti title, ako ne, naci medju recenicama onu koja ima term u sebi
return /*#__PURE__*/ _jsxDEV("div", {
onClick: ()=>router.push({
pathname: "/".concat(result._type, "/").concat(result._id)
}),
className: " self-end bg-[#202124] w-[100%] laptop:max-w-[50vw] p-3 m-auto border-4 border-[#303134] font-serif text-base text-lg tablet:text-2xl text-white laptop:text-lg ",
children: [
/*#__PURE__*/ _jsxDEV("p", {
className: "m-3",
children: title
}, void 0, false, {
fileName: "/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/components/Result.js",
lineNumber: 52,
columnNumber: 9
}, this),
/*#__PURE__*/ _jsxDEV("p", {
className: "m-3",
children: [
'"',
book,
'" - ',
writer,
" - str. ",
result._id,
"."
]
}, void 0, true, {
fileName: "/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/components/Result.js",
lineNumber: 53,
columnNumber: 9
}, this)
]
}, void 0, true, {
fileName: "/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/components/Result.js",
lineNumber: 38,
columnNumber: 5
}, this);
};
_s(Result, "vYfvUCqlcBSzWJ0UrpRdPzL9KNI=", false, function() {
return [
useRouter
];
});
_c = Result;
export default Result;
var _c;
$RefreshReg$(_c, "Result");
;
// Wrapped in an IIFE to avoid polluting the global scope
;
(function () {
var _a, _b;
// Legacy CSS implementations will `eval` browser code in a Node.js context
// to extract CSS. For backwards compatibility, we need to check we're in a
// browser context before continuing.
if (typeof self !== 'undefined' &&
// AMP / No-JS mode does not inject these helpers:
'$RefreshHelpers$' in self) {
// @ts-ignore __webpack_module__ is global
var currentExports = __webpack_module__.exports;
// @ts-ignore __webpack_module__ is global
var prevExports = (_b = (_a = __webpack_module__.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;
// This cannot happen in MainTemplate because the exports mismatch between
// templating and execution.
self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, __webpack_module__.id);
// A module can be accepted automatically based on its exports, e.g. when
// it is a Refresh Boundary.
if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {
// Save the previous exports on update so we can compare the boundary
// signatures.
__webpack_module__.hot.dispose(function (data) {
data.prevExports = currentExports;
});
// Unconditionally accept an update to this module, we'll check if it's
// still a Refresh Boundary later.
// @ts-ignore importMeta is replaced in the loader
import.meta.webpackHot.accept();
// This field is set when the previous version of this module was a
// Refresh Boundary, letting us know we need to check for invalidation or
// enqueue an update.
if (prevExports !== null) {
// A boundary can become ineligible if its exports are incompatible
// with the previous exports.
//
// For example, if you add/remove/change exports, we'll want to
// re-execute the importing modules, and force those components to
// re-render. Similarly, if you convert a class component to a
// function, we want to invalidate the boundary.
if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {
__webpack_module__.hot.invalidate();
}
else {
self.$RefreshHelpers$.scheduleUpdate();
}
}
}
else {
// Since we just executed the code for the module, it's possible that the
// new exports made it ineligible for being a boundary.
// We only care about the case when we were _previously_ a boundary,
// because we already accepted this update (accidental side effect).
var isNoLongerABoundary = prevExports !== null;
if (isNoLongerABoundary) {
__webpack_module__.hot.invalidate();
}
}
}
})();
<1E>webpack://./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/loader.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[3].oneOf[2].use[1]!./components/Result.js<1F> {"version":3,"sources":["webpack://./components/Result.js"],"sourcesContent":["import { React, useEffect, useState} from 'react'\nimport { useRouter } from 'next/router'\n\nconst Result = ({result, term}) => {\n\n const router = useRouter()\n const {book, writer, text} = result._source\n const [title, setTitle] = useState()\n let sentences\n\n const checkForMatches = (props) => {\n\n if(props.length === 1) return setTitle(props)\n if(props.length > 1 ){\n return sentences.map((sentence) => {\n if(sentence.toLowerCase().includes(term.toLowerCase())) setTitle(sentence)\n else setTitle(props[0])\n })\n }\n \n }\n\n const splitText = () => {\n try{\n return text.match( /[^\\.!\\?]+[\\.!\\?]+/g)\n }catch{err => console.log(err)}\n }\n\n useEffect(() => {\n sentences = splitText()\n checkForMatches(sentences)\n }, [])\n // ako term nije pronadjen u textu onda \n // treba provjeriti duzinu niza, ako niz ima jednu recenicu, recenica treba biti title, ako ne, naci medju recenicama onu koja ima term u sebi\n\n\n return (\n <div onClick={() => (router.push({pathname: `/${result._type}/${result._id}`}))} className='\n self-end\n bg-[#202124] \n w-[100%]\n laptop:max-w-[50vw]\n p-3 m-auto\n border-4\n border-[#303134]\n font-serif text-base \n text-lg\n tablet:text-2xl text-white\n laptop:text-lg\n '\n >\n <p className='m-3'>{title}</p>\n <p className='m-3'>\"{book}\" - {writer} - str. {result._id}.</p>\n </div>\n )\n}\n\nexport default Result"],"names":["React","useEffect","useState","useRouter","Result","result","term","router","book","writer","text","_source","title","setTitle","sentences","checkForMatches","props","length","map","sentence","toLowerCase","includes","splitText","match","err","console","log","div","onClick","push","pathname","_type","_id","className","p"],"mappings":"AAAA;;AAAA,SAASA,KAAK,EAAEC,SAAS,EAAEC,QAAQ,QAAO,QAAO;AACjD,SAASC,SAAS,QAAQ,cAAa;AAEvC,MAAMC,SAAS,SAAoB;QAAnB,EAACC,OAAM,EAAEC,KAAI,EAAC;;IAE1B,MAAMC,SAASJ;IACf,MAAM,EAACK,KAAI,EAAEC,OAAM,EAAEC,KAAI,EAAC,GAAGL,OAAOM,OAAO;IAC3C,MAAM,CAACC,OAAOC,SAAS,GAAGX;IAC1B,IAAIY;IAEJ,MAAMC,kBAAkB,CAACC,QAAU;QAEjC,IAAGA,MAAMC,MAAM,KAAK,GAAG,OAAOJ,SAASG;QACvC,IAAGA,MAAMC,MAAM,GAAG,GAAG;YACrB,OAAOH,UAAUI,GAAG,CAAC,CAACC,WAAa;gBACjC,IAAGA,SAASC,WAAW,GAAGC,QAAQ,CAACf,KAAKc,WAAW,KAAKP,SAASM;qBAC5DN,SAASG,KAAK,CAAC,EAAE;YACxB;QACA,CAAC;IAEH;IAEA,MAAMM,YAAY,IAAM;QACtB,IAAG;YACD,OAAOZ,KAAKa,KAAK,CAAE;QACrB,EAAC,UAAK;YAACC,CAAAA,MAAOC,QAAQC,GAAG,CAACF;QAAI;IAChC;IAEAvB,UAAU,IAAM;QACda,YAAYQ;QACZP,gBAAgBD;IAClB,GAAG,EAAE;IACL,wCAAwC;IACxC,8IAA8I;IAGhJ,qBACE,QAACa;QAAIC,SAAS,IAAOrB,OAAOsB,IAAI,CAAC;gBAACC,UAAU,AAAC,IAAmBzB,OAAhBA,OAAO0B,KAAK,EAAC,KAAc,OAAX1B,OAAO2B,GAAG;YAAE;QAAKC,WAAU;;0BAcvF,QAACC;gBAAED,WAAU;0BAAOrB;;;;;;0BACpB,QAACsB;gBAAED,WAAU;;oBAAM;oBAAEzB;oBAAK;oBAAKC;oBAAO;oBAASJ,OAAO2B,GAAG;oBAAC;;;;;;;;;;;;;AAGlE;GApDM5B;;QAEaD;;;KAFbC;AAsDN,eAAeA,OAAM","file":"x"}<12><01>exportsType<70>namespace <0A>javascript/auto<11>/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/components<02>fullySpecified<65>fallback `<16>assert<72>buffer<65>constants<74>crypto<74>domain<69>http<74>https<70>os<6F>path<74>punycode<64>process<73>querystring<6E>stream<61>string_decoder<65>sys<79>timers<72>tty<74>util<69>vm<76>zlib<69>events<74>setImmediate<17>/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/node_modules/next/dist/compiled/assert/assert.js<6A>/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/node_modules/next/dist/compiled/buffer/index.js<1E>/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/node_modules/next/dist/compiled/constants-browserify/constants.json<6F>/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/node_modules/next/dist/compiled/crypto-browserify/index.js<6A>/home/ismail/Desktop/KitabCitab/kitabc
\
 cEE <10>webpack/lib/dependencies/HarmonyExportHeaderDependencyA<>
<00>
A<>
<00>
 cMM<02>moduleAD V <15> c^!^3<15>A<> <00> <15> c`*`<<02>module.idA  <15> ccQcf<15>Aw<00><15> cii"<02>module.hot.acceptA<><00><15> coo/<15>Aas<15> c||*<15>A <15> @<40>`@<40>`&` <10>webpack/lib/dependencies/HarmonyImportSideEffectDependency<18>react/jsx-dev-runtime<15> `:<18>react<15> `3<18>next/router<15> `(<10>webpack/lib/dependencies/HarmonyImportSpecifierDependency
<01>useRouter<15>
A  <15><15><15> b
<01>useState<15>
Amu <15><15><15>
b
&
<01>useEffect<15>
A<><00> <15><15><15> c 
<01>jsxDEV<17>_jsxDEV
A<><00> <15><15><15> c"" 
<15><15>
A>E <15><15><15> c((!
<15><15>
A<><00> <15><15><15> c00!
<15><15>
A<>
<00>
  <15><15><15> cII<10>webpack/lib/dependencies/HarmonyExportExpressionDependency`<60>ŀ cMM 
 <04>sources<65>runtimeRequirements<74>data<15><01>javascript<10>webpack/lib/util/registerExternalSerializer<65>webpack-sources/CachedSource |,<10>webpack/lib/util/registerExternalSerializer<65>webpack-sources/ConcatSource<10><10>webpack/lib/util/registerExternalSerializer<65>webpack-sources/RawSource<1F>__webpack_require__.r(__webpack_exports__);
/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ "./node_modules/react/jsx-dev-runtime.js");
/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! next/router */ "./node_modules/next/router.js");
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_2__);
<10>webpack/lib/util/registerExternalSerializer<65>webpack-sources/ReplaceSource<10>webpack/lib/util/registerExternalSerializer<65>webpack-sources/SourceMapSourcedimport { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
var _s = $RefreshSig$();
import { React, useEffect, useState } from "react";
import { useRouter } from "next/router";
const Result = (param)=>{
let { result , term } = param;
_s();
const router = useRouter();
const { book , writer , text } = result._source;
const [title, setTitle] = useState();
let sentences;
const checkForMatches = (props)=>{
if (props.length === 1) return setTitle(props);
if (props.length > 1) {
return sentences.map((sentence)=>{
if (sentence.toLowerCase().includes(term.toLowerCase())) setTitle(sentence);
else setTitle(props[0]);
});
}
2023-02-16 00:05:13 +01:00
};
2023-03-08 12:08:29 +01:00
const splitText = ()=>{
try {
return text.match(/[^\.!\?]+[\.!\?]+/g);
} catch (e) {
(err)=>console.log(err);
}
2023-02-16 00:05:13 +01:00
};
2023-03-08 12:08:29 +01:00
useEffect(()=>{
sentences = splitText();
checkForMatches(sentences);
}, []);
// ako term nije pronadjen u textu onda
// treba provjeriti duzinu niza, ako niz ima jednu recenicu, recenica treba biti title, ako ne, naci medju recenicama onu koja ima term u sebi
return /*#__PURE__*/ _jsxDEV("div", {
onClick: ()=>router.push({
pathname: "/".concat(result._type, "/").concat(result._id)
}),
className: " self-end bg-[#202124] w-[100%] laptop:max-w-[50vw] p-3 m-auto border-4 border-[#303134] font-serif text-base text-lg tablet:text-2xl text-white laptop:text-lg ",
children: [
/*#__PURE__*/ _jsxDEV("p", {
className: "m-3",
children: title
}, void 0, false, {
fileName: "/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/components/Result.js",
lineNumber: 52,
columnNumber: 9
}, this),
/*#__PURE__*/ _jsxDEV("p", {
className: "m-3",
children: [
'"',
book,
'" - ',
writer,
" - str. ",
result._id,
"."
]
}, void 0, true, {
fileName: "/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/components/Result.js",
lineNumber: 53,
columnNumber: 9
}, this)
]
}, void 0, true, {
fileName: "/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/components/Result.js",
lineNumber: 38,
columnNumber: 5
}, this);
2023-01-04 02:30:44 +01:00
};
2023-03-08 12:08:29 +01:00
_s(Result, "vYfvUCqlcBSzWJ0UrpRdPzL9KNI=", false, function() {
return [
useRouter
];
});
2023-03-08 12:08:29 +01:00
_c = Result;
export default Result;
var _c;
$RefreshReg$(_c, "Result");
2023-01-04 02:30:44 +01:00
;
// Wrapped in an IIFE to avoid polluting the global scope
;
(function () {
var _a, _b;
// Legacy CSS implementations will `eval` browser code in a Node.js context
// to extract CSS. For backwards compatibility, we need to check we're in a
// browser context before continuing.
if (typeof self !== 'undefined' &&
// AMP / No-JS mode does not inject these helpers:
'$RefreshHelpers$' in self) {
// @ts-ignore __webpack_module__ is global
var currentExports = __webpack_module__.exports;
// @ts-ignore __webpack_module__ is global
var prevExports = (_b = (_a = __webpack_module__.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;
// This cannot happen in MainTemplate because the exports mismatch between
// templating and execution.
self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, __webpack_module__.id);
// A module can be accepted automatically based on its exports, e.g. when
// it is a Refresh Boundary.
if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {
// Save the previous exports on update so we can compare the boundary
// signatures.
__webpack_module__.hot.dispose(function (data) {
data.prevExports = currentExports;
});
// Unconditionally accept an update to this module, we'll check if it's
// still a Refresh Boundary later.
// @ts-ignore importMeta is replaced in the loader
import.meta.webpackHot.accept();
// This field is set when the previous version of this module was a
// Refresh Boundary, letting us know we need to check for invalidation or
// enqueue an update.
if (prevExports !== null) {
// A boundary can become ineligible if its exports are incompatible
// with the previous exports.
//
// For example, if you add/remove/change exports, we'll want to
// re-execute the importing modules, and force those components to
// re-render. Similarly, if you convert a class component to a
// function, we want to invalidate the boundary.
if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {
__webpack_module__.hot.invalidate();
}
else {
self.$RefreshHelpers$.scheduleUpdate();
}
}
}
else {
// Since we just executed the code for the module, it's possible that the
// new exports made it ineligible for being a boundary.
// We only care about the case when we were _previously_ a boundary,
// because we already accepted this update (accidental side effect).
var isNoLongerABoundary = prevExports !== null;
if (isNoLongerABoundary) {
__webpack_module__.hot.invalidate();
}
}
}
})();
2023-03-08 12:08:29 +01:00
<1E>webpack://./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/loader.js!./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[3].oneOf[2].use[1]!./components/Result.js<1F> {"version":3,"sources":["webpack://./components/Result.js"],"sourcesContent":["import { React, useEffect, useState} from 'react'\nimport { useRouter } from 'next/router'\n\nconst Result = ({result, term}) => {\n\n const router = useRouter()\n const {book, writer, text} = result._source\n const [title, setTitle] = useState()\n let sentences\n\n const checkForMatches = (props) => {\n\n if(props.length === 1) return setTitle(props)\n if(props.length > 1 ){\n return sentences.map((sentence) => {\n if(sentence.toLowerCase().includes(term.toLowerCase())) setTitle(sentence)\n else setTitle(props[0])\n })\n }\n \n }\n\n const splitText = () => {\n try{\n return text.match( /[^\\.!\\?]+[\\.!\\?]+/g)\n }catch{err => console.log(err)}\n }\n\n useEffect(() => {\n sentences = splitText()\n checkForMatches(sentences)\n }, [])\n // ako term nije pronadjen u textu onda \n // treba provjeriti duzinu niza, ako niz ima jednu recenicu, recenica treba biti title, ako ne, naci medju recenicama onu koja ima term u sebi\n\n\n return (\n <div onClick={() => (router.push({pathname: `/${result._type}/${result._id}`}))} className='\n self-end\n bg-[#202124] \n w-[100%]\n laptop:max-w-[50vw]\n p-3 m-auto\n border-4\n border-[#303134]\n font-serif text-base \n text-lg\n tablet:text-2xl text-white\n laptop:text-lg\n '\n >\n <p className='m-3'>{title}</p>\n <p className='m-3'>\"{book}\" - {writer} - str. {result._id}.</p>\n </div>\n )\n}\n\nexport default Result"],"names":["React","useEffect","useState","useRouter","Result","result","term","router","book","writer","text","_source","title","setTitle","sentences","checkForMatches","props","length","map","sentence","toLowerCase","includes","splitText","match","err","console","log","div","onClick","push","pathname","_type","_id","className","p"],"mappings":"AAAA;;AAAA,SAASA,KAAK,EAAEC,SAAS,EAAEC,QAAQ,QAAO,QAAO;AACjD,SAASC,SAAS,QAAQ,cAAa;AAEvC,MAAMC,SAAS,SAAoB;QAAnB,EAACC,OAAM,EAAEC,KAAI,EAAC;;IAE1B,MAAMC,SAASJ;IACf,MAAM,EAACK,KAAI,EAAEC,OAAM,EAAEC,KAAI,EAAC,GAAGL,OAAOM,OAAO;IAC3C,MAAM,CAACC,OAAOC,SAAS,GAAGX;IAC1B,IAAIY;IAEJ,MAAMC,kBAAkB,CAACC,QAAU;QAEjC,IAAGA,MAAMC,MAAM,KAAK,GAAG,OAAOJ,SAASG;QACvC,IAAGA,MAAMC,MAAM,GAAG,GAAG;YACrB,OAAOH,UAAUI,GAAG,CAAC,CAACC,WAAa;gBACjC,IAAGA,SAASC,WAAW,GAAGC,QAAQ,CAACf,KAAKc,WAAW,KAAKP,SAASM;qBAC5DN,SAASG,KAAK,CAAC,EAAE;YACxB;QACA,CAAC;IAEH;IAEA,MAAMM,YAAY,IAAM;QACtB,IAAG;YACD,OAAOZ,KAAKa,KAAK,CAAE;QACrB,EAAC,UAAK;YAACC,CAAAA,MAAOC,QAAQC,GAAG,CAACF;QAAI;IAChC;IAEAvB,UAAU,IAAM;QACda,YAAYQ;QACZP,gBAAgBD;IAClB,GAAG,EAAE;IACL,wCAAwC;IACxC,8IAA8I;IAGhJ,qBACE,QAACa;QAAIC,SAAS,IAAOrB,OAAOsB,IAAI,CAAC;gBAACC,UAAU,AAAC,IAAmBzB,OAAhBA,OAAO0B,KAAK,EAAC,KAAc,OAAX1B,OAAO2B,GAAG;YAAE;QAAKC,WAAU;;0BAcvF,QAACC;gBAAED,WAAU;0BAAOrB;;;;;;0BACpB,QAACsB;gBAAED,WAAU;;oBAAM;oBAAEzB;oBAAK;oBAAKC;oBAAO;oBAASJ,OAAO2B,GAAG;oBAAC;;;;;;;;;;;;;AAGlE;GApDM5B;;QAEaD;;;KAFbC;AAsDN,eAAeA,OAAM","file":"x"}c9T[<5B><00><00> mt<00><00><00><00>>Dor<00><00><00> <00> X
[
<00>
<00>
<00>
<00>
<00>
<00>
<00>
ۥ@MD U <00> <00> w<00><00><00>ar <00><18><18><18>(0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)<18>(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)<18>(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)<18>(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)<15><18>undefined<15><15><15><18>next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter<18>/* harmony default export */ __webpack_exports__["default"] = (<18><18>);<18>module<15><18>module.id<15><18>module.hot.accept<15><15>  Z<><5A><EFBFBD><EFBFBD>source<63>size<7A>maps<15><1F>__webpack_require__.r(__webpack_exports__);
/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ "./node_modules/react/jsx-dev-runtime.js");
/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! next/router */ "./node_modules/next/router.js");
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_2__);
var _s = $RefreshSig$();
const Result = (param)=>{
let { result , term } = param;
_s();
const router = (0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)();
const { book , writer , text } = result._source;
const [title, setTitle] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)();
let sentences;
const checkForMatches = (props)=>{
if (props.length === 1) return setTitle(props);
if (props.length > 1) {
return sentences.map((sentence)=>{
if (sentence.toLowerCase().includes(term.toLowerCase())) setTitle(sentence);
else setTitle(props[0]);
});
}
};
const splitText = ()=>{
try {
return text.match(/[^\.!\?]+[\.!\?]+/g);
} catch (e) {
(err)=>console.log(err);
}
};
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{
sentences = splitText();
checkForMatches(sentences);
}, []);
// ako term nije pronadjen u textu onda
// treba provjeriti duzinu niza, ako niz ima jednu recenicu, recenica treba biti title, ako ne, naci medju recenicama onu koja ima term u sebi
return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)("div", {
onClick: ()=>router.push({
pathname: "/".concat(result._type, "/").concat(result._id)
}),
className: " self-end bg-[#202124] w-[100%] laptop:max-w-[50vw] p-3 m-auto border-4 border-[#303134] font-serif text-base text-lg tablet:text-2xl text-white laptop:text-lg ",
children: [
/*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)("p", {
className: "m-3",
children: title
}, void 0, false, {
fileName: "/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/components/Result.js",
lineNumber: 52,
columnNumber: 9
}, undefined),
/*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)("p", {
className: "m-3",
children: [
'"',
book,
'" - ',
writer,
" - str. ",
result._id,
"."
]
}, void 0, true, {
fileName: "/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/components/Result.js",
lineNumber: 53,
columnNumber: 9
}, undefined)
]
}, void 0, true, {
fileName: "/home/ismail/Desktop/KitabCitab/kitabcitab-frontend/kitabcitab/components/Result.js",
lineNumber: 38,
columnNumber: 5
}, undefined);
};
_s(Result, "vYfvUCqlcBSzWJ0UrpRdPzL9KNI=", false, function() {
return [
next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter
];
});
_c = Result;
/* harmony default export */ __webpack_exports__["default"] = (Result);
var _c;
$RefreshReg$(_c, "Result");
;
// Wrapped in an IIFE to avoid polluting the global scope
;
(function () {
var _a, _b;
// Legacy CSS implementations will `eval` browser code in a Node.js context
// to extract CSS. For backwards compatibility, we need to check we're in a
// browser context before continuing.
if (typeof self !== 'undefined' &&
// AMP / No-JS mode does not inject these helpers:
'$RefreshHelpers$' in self) {
// @ts-ignore __webpack_module__ is global
var currentExports = module.exports;
// @ts-ignore __webpack_module__ is global
var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;
// This cannot happen in MainTemplate because the exports mismatch between
// templating and execution.
self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);
// A module can be accepted automatically based on its exports, e.g. when
// it is a Refresh Boundary.
if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {
// Save the previous exports on update so we can compare the boundary
// signatures.
module.hot.dispose(function (data) {
data.prevExports = currentExports;
});
// Unconditionally accept an update to this module, we'll check if it's
// still a Refresh Boundary later.
// @ts-ignore importMeta is replaced in the loader
module.hot.accept();
// This field is set when the previous version of this module was a
// Refresh Boundary, letting us know we need to check for invalidation or
// enqueue an update.
if (prevExports !== null) {
// A boundary can become ineligible if its exports are incompatible
// with the previous exports.
//
// For example, if you add/remove/change exports, we'll want to
// re-execute the importing modules, and force those components to
// re-render. Similarly, if you convert a class component to a
// function, we want to invalidate the boundary.
if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {
module.hot.invalidate();
}
else {
self.$RefreshHelpers$.scheduleUpdate();
}
}
}
else {
// Since we just executed the code for the module, it's possible that the
// new exports made it ineligible for being a boundary.
// We only care about the case when we were _previously_ a boundary,
// because we already accepted this update (accidental side effect).
var isNoLongerABoundary = prevExports !== null;
if (isNoLongerABoundary) {
module.hot.invalidate();
}
}
}
})();
<01>{"filename":"[file].map[query]","module":true,"columns":true,"noSources":false,"namespace":"_N_E"}  <02>map<61>bufferedMap  <06>version<6F>file<6C>mappings<15><>sourcesContent<6E>names<03>x ;;;;;;;AAAA;;AAAiD;AACV;AAEvC,MAAMI,SAAS,SAAoB;QAAnB,EAACC,OAAM,EAAEC,KAAI,EAAC;;IAE1B,MAAMC,SAASJ,sDAASA;IACxB,MAAM,EAACK,KAAI,EAAEC,OAAM,EAAEC,KAAI,EAAC,GAAGL,OAAOM,OAAO;IAC3C,MAAM,CAACC,OAAOC,SAAS,GAAGX,+CAAQA;IAClC,IAAIY;IAEJ,MAAMC,kBAAkB,CAACC,QAAU;QAEjC,IAAGA,MAAMC,MAAM,KAAK,GAAG,OAAOJ,SAASG;QACvC,IAAGA,MAAMC,MAAM,GAAG,GAAG;YACrB,OAAOH,UAAUI,GAAG,CAAC,CAACC,WAAa;gBACjC,IAAGA,SAASC,WAAW,GAAGC,QAAQ,CAACf,KAAKc,WAAW,KAAKP,SAASM;qBAC5DN,SAASG,KAAK,CAAC,EAAE;YACxB;QACA,CAAC;IAEH;IAEA,MAAMM,YAAY,IAAM;QACtB,IAAG;YACD,OAAOZ,KAAKa,KAAK,CAAE;QACrB,EAAC,UAAK;YAACC,CAAAA,MAAOC,QAAQC,GAAG,CAACF;QAAI;IAChC;IAEAvB,gDAASA,CAAC,IAAM;QACda,YAAYQ;QACZP,gBAAgBD;IAClB,GAAG,EAAE;IACL,wCAAwC;IACxC,8IAA8I;IAGhJ,qBACE,8DAACa;QAAIC,SAAS,IAAOrB,OAAOsB,IAAI,CAAC;gBAACC,UAAU,IAAoBzB,OAAhBA,OAAO0B,KAAK,EAAC,KAAc,OAAX1B,OAAO2B,GAAG;YAAE;QAAKC,WAAU;;0BAcvF,8DAACC;gBAAED,WAAU;0BAAOrB;;;;;;0BACpB,8DAACsB;gBAAED,WAAU;;oBAAM;oBAAEzB;oBAAK;oBAAKC;oBAAO;oBAASJ,OAAO2B,GAAG;oBAAC;;;;;;;;;;;;;AAGlE;GApDM5B;;QAEaD,kDAASA;;;KAFtBC;AAsDN,+DAAeA,MAAMA,EAAA <01>webpack://./components/Result.js <1F>import { React, useEffect, useState} from 'react'
import { useRouter } from 'next/router'
const Result = ({result, term}) => {
const router = useRouter()
const {book, writer, text} = result._source
const [title, setTitle] = useState()
let sentences
const checkForMatches = (props) => {
if(props.length === 1) return setTitle(props)
if(props.length > 1 ){
return sentences.map((sentence) => {
if(sentence.toLowerCase().includes(term.toLowerCase())) setTitle(sentence)
else setTitle(props[0])
})
}
}
const splitText = () => {
try{
return text.match( /[^\.!\?]+[\.!\?]+/g)
}catch{err => console.log(err)}
}
useEffect(() => {
sentences = splitText()
checkForMatches(sentences)
}, [])
// ako term nije pronadjen u textu onda
// treba provjeriti duzinu niza, ako niz ima jednu recenicu, recenica treba biti title, ako ne, naci medju recenicama onu koja ima term u sebi
return (
<div onClick={() => (router.push({pathname: `/${result._type}/${result._id}`}))} className='
self-end
bg-[#202124]
w-[100%]
laptop:max-w-[50vw]
p-3 m-auto
border-4
border-[#303134]
font-serif text-base
text-lg
tablet:text-2xl text-white
laptop:text-lg
'
>
<p className='m-3'>{title}</p>
<p className='m-3'>"{book}" - {writer} - str. {result._id}.</p>
</div>
)
}
export default Result `#<23>React<15><15><15><15><>result<6C>term<72>router<65>book<6F>writer<65>text<78>_source<63>title<6C>setTitle<6C>sentences<65>checkForMatches<65>props<70>length<15><>sentence<63>toLowerCase<73>includes<65>splitText<78>match<63>err<72>console<6C>log<6F>div<69>onClick<63>push<73>pathname<6D>_type<70>_id<69>className<6D>p ConcatSourceRawSource<1F>__webpack_require__.r(__webpack_exports__);
/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ "./node_modules/react/jsx-dev-runtime.js");
/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! next/router */ "./node_modules/next/router.js");
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_2__);
ReplaceSourceSourceMapSource<14><><EFBFBD><16><><EFBFBD><1F>false057undefined84134undefined136175undefined268276(0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)undefined365372(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined912920(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined12261232(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)undefined15981604(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)undefined19031906undefinedundefined19361942(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)undefined24492452undefinedundefined26482651undefinedundefined27422750next_router__WEBPACK_IMPORTED_MODULE_2__.useRouterundefined27762790/* harmony default export */ __webpack_exports__["default"] = (undefined27762790undefined27972797.5);undefined33963413moduleundefined35213538moduleundefined38513871module.idundefined42154232moduleundefined45614589module.hot.acceptundefined54735490moduleundefined61556172moduleundefined <06>__webpack_require__<5F>__webpack_require__.n_<><5F><EFBFBD><EFBFBD>__webpack_require__.r~<7E><><EFBFBD><15><18>6b7976485d5f4aae