-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-templates-language-jsx-f389d597a65adf0f2110.js.map
1 lines (1 loc) · 32.2 KB
/
component---src-templates-language-jsx-f389d597a65adf0f2110.js.map
1
{"version":3,"file":"component---src-templates-language-jsx-f389d597a65adf0f2110.js","mappings":"+IAUIA,EAEAC,E,qGAEJ,SAAWA,GACTA,EAAYA,EAA8B,iBAAI,GAAK,mBACnDA,EAAYA,EAA4B,eAAI,GAAK,iBACjDA,EAAYA,EAA2B,cAAI,GAAK,gBAChDA,EAAYA,EAAyB,YAAI,GAAK,cAC9CA,EAAYA,EAA2B,cAAI,GAAK,gBAChDA,EAAYA,EAA2B,cAAI,GAAK,gBAChDA,EAAYA,EAA6B,gBAAI,GAAK,kBAClDA,EAAYA,EAA2B,cAAI,GAAK,gBARlD,CASGA,IAAgBA,EAAc,KAEjC,IAAIC,IAAYF,EAAY,IAAcC,EAAYE,kBAAoB,SAAUC,EAAOC,GACzF,OAAID,EAAME,gBAAkBD,EAAOE,MAAcH,GAC1C,QAAS,GAAIA,EAAO,CACzBE,cAAeD,EAAOE,SAEvBP,EAAUC,EAAYO,gBAAkB,SAAUJ,EAAOC,GAC1D,OAAID,EAAMK,cAAgBJ,EAAOI,YAAoBL,GAC9C,QAAS,GAAIA,EAAO,CACzBK,YAAaJ,EAAOI,eAErBT,EAAUC,EAAYS,eAAiB,SAAUN,EAAOC,GACzD,OAAID,EAAMO,aAAeN,EAAOM,WAAmBP,GAC5C,QAAS,GAAIA,EAAO,CACzBO,WAAYN,EAAOM,cAEpBX,EAAUC,EAAYW,aAAe,SAAUR,EAAOC,GACvD,OAAID,EAAMS,KAAKC,SAAST,EAAOU,KAAaX,GACrC,QAAS,GAAIA,EAAO,CACzBS,KAAM,GAAGG,OAAOZ,EAAMS,KAAM,CAACR,EAAOU,SAErCf,EAAUC,EAAYgB,eAAiB,SAAUb,EAAOC,GACzD,OAAO,QAAS,GAAID,EAAO,CACzBS,KAAMT,EAAMS,KAAKK,Q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AAU,QAASC,OAAQlB,EAAE,gBAC1BmB,KAAM,gBAAGC,EAAH,EAAGA,IAAH,OACF,qBAAGd,UAAS,QAAUC,EAAAA,cAAV,OAA+BL,KAAMkB,EAAIC,OAAOC,KACxD,uBAAKhB,UAAS,QAAUC,EAAAA,cAAV,+CAAuEa,EAAIC,OAAOZ,UAG5G,CAACQ,SAAU,MAAOC,OAAQ,MAAOK,QAAO,GACxC,CAACN,SAAU,OAAQC,OAAQlB,EAAE,gBAC7B,CAACiB,SAAU,SAAUC,OAAQlB,EAAE,sBAK3C,gBAAC3F,EAAI6E,MAAL,KAEI,gBAAC4B,EAAA,EAAD,CACIC,KAAMhB,EACNiB,QAAS,CACL,CAACC,SAAU,QAASC,OAAQlB,EAAE,gBAC1BmB,KAAM,gBAAGC,EAAH,EAAGA,IAAH,OACF,qBAAGd,UAAS,QAAUC,EAAAA,cAAV,OAA+BL,KAAMkB,EAAIC,OAAOC,KACxD,uBAAKhB,UAAS,QAAUC,EAAAA,cAAV,+CAAuEa,EAAIC,OAAOZ,UAG5G,CAACQ,SAAU,MAAOC,OAAQ,MAAOK,QAAO,GACxC,CAACN,SAAU,SAAUC,OAAQlB,EAAE","sources":["webpack://tav/./node_modules/@headlessui/react/dist/components/tabs/tabs.esm.js","webpack://tav/./src/templates/language.jsx"],"sourcesContent":["import { extends as _extends, objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';\nimport React, { useRef, useCallback, useMemo, createContext, useContext, useReducer, useEffect, Fragment } from 'react';\nimport { match } from '../../utils/match.esm.js';\nimport { render, Features } from '../../utils/render.esm.js';\nimport { useSyncRefs } from '../../hooks/use-sync-refs.esm.js';\nimport { Keys } from '../keyboard.esm.js';\nimport { useIsoMorphicEffect } from '../../hooks/use-iso-morphic-effect.esm.js';\nimport { useId } from '../../hooks/use-id.esm.js';\nimport { focusIn, Focus } from '../../utils/focus-management.esm.js';\n\nvar _reducers;\n\nvar ActionTypes;\n\n(function (ActionTypes) {\n ActionTypes[ActionTypes[\"SetSelectedIndex\"] = 0] = \"SetSelectedIndex\";\n ActionTypes[ActionTypes[\"SetOrientation\"] = 1] = \"SetOrientation\";\n ActionTypes[ActionTypes[\"SetActivation\"] = 2] = \"SetActivation\";\n ActionTypes[ActionTypes[\"RegisterTab\"] = 3] = \"RegisterTab\";\n ActionTypes[ActionTypes[\"UnregisterTab\"] = 4] = \"UnregisterTab\";\n ActionTypes[ActionTypes[\"RegisterPanel\"] = 5] = \"RegisterPanel\";\n ActionTypes[ActionTypes[\"UnregisterPanel\"] = 6] = \"UnregisterPanel\";\n ActionTypes[ActionTypes[\"ForceRerender\"] = 7] = \"ForceRerender\";\n})(ActionTypes || (ActionTypes = {}));\n\nvar reducers = (_reducers = {}, _reducers[ActionTypes.SetSelectedIndex] = function (state, action) {\n if (state.selectedIndex === action.index) return state;\n return _extends({}, state, {\n selectedIndex: action.index\n });\n}, _reducers[ActionTypes.SetOrientation] = function (state, action) {\n if (state.orientation === action.orientation) return state;\n return _extends({}, state, {\n orientation: action.orientation\n });\n}, _reducers[ActionTypes.SetActivation] = function (state, action) {\n if (state.activation === action.activation) return state;\n return _extends({}, state, {\n activation: action.activation\n });\n}, _reducers[ActionTypes.RegisterTab] = function (state, action) {\n if (state.tabs.includes(action.tab)) return state;\n return _extends({}, state, {\n tabs: [].concat(state.tabs, [action.tab])\n });\n}, _reducers[ActionTypes.UnregisterTab] = function (state, action) {\n return _extends({}, state, {\n tabs: state.tabs.filter(function (tab) {\n return tab !== action.tab;\n })\n });\n}, _reducers[ActionTypes.RegisterPanel] = function (state, action) {\n if (state.panels.includes(action.panel)) return state;\n return _extends({}, state, {\n panels: [].concat(state.panels, [action.panel])\n });\n}, _reducers[ActionTypes.UnregisterPanel] = function (state, action) {\n return _extends({}, state, {\n panels: state.panels.filter(function (panel) {\n return panel !== action.panel;\n })\n });\n}, _reducers[ActionTypes.ForceRerender] = function (state) {\n return _extends({}, state);\n}, _reducers);\nvar TabsContext = /*#__PURE__*/createContext(null);\nTabsContext.displayName = 'TabsContext';\n\nfunction useTabsContext(component) {\n var context = useContext(TabsContext);\n\n if (context === null) {\n var err = new Error(\"<\" + component + \" /> is missing a parent <Tab.Group /> component.\");\n if (Error.captureStackTrace) Error.captureStackTrace(err, useTabsContext);\n throw err;\n }\n\n return context;\n}\n\nfunction stateReducer(state, action) {\n return match(action.type, reducers, state, action);\n} // ---\n\n\nvar DEFAULT_TABS_TAG = Fragment;\n\nfunction Tabs(props) {\n var _props$defaultIndex = props.defaultIndex,\n defaultIndex = _props$defaultIndex === void 0 ? 0 : _props$defaultIndex,\n _props$vertical = props.vertical,\n vertical = _props$vertical === void 0 ? false : _props$vertical,\n _props$manual = props.manual,\n manual = _props$manual === void 0 ? false : _props$manual,\n onChange = props.onChange,\n passThroughProps = _objectWithoutPropertiesLoose(props, [\"defaultIndex\", \"vertical\", \"manual\", \"onChange\"]);\n\n var orientation = vertical ? 'vertical' : 'horizontal';\n var activation = manual ? 'manual' : 'auto';\n\n var _useReducer = useReducer(stateReducer, {\n selectedIndex: null,\n tabs: [],\n panels: [],\n orientation: orientation,\n activation: activation\n }),\n state = _useReducer[0],\n dispatch = _useReducer[1];\n\n var slot = useMemo(function () {\n return {\n selectedIndex: state.selectedIndex\n };\n }, [state.selectedIndex]);\n var onChangeRef = useRef(function () {});\n useEffect(function () {\n dispatch({\n type: ActionTypes.SetOrientation,\n orientation: orientation\n });\n }, [orientation]);\n useEffect(function () {\n dispatch({\n type: ActionTypes.SetActivation,\n activation: activation\n });\n }, [activation]);\n useEffect(function () {\n if (typeof onChange === 'function') {\n onChangeRef.current = onChange;\n }\n }, [onChange]);\n useEffect(function () {\n if (state.tabs.length <= 0) return;\n if (state.selectedIndex !== null) return;\n var tabs = state.tabs.map(function (tab) {\n return tab.current;\n }).filter(Boolean);\n var focusableTabs = tabs.filter(function (tab) {\n return !tab.hasAttribute('disabled');\n }); // Underflow\n\n if (defaultIndex < 0) {\n dispatch({\n type: ActionTypes.SetSelectedIndex,\n index: tabs.indexOf(focusableTabs[0])\n });\n } // Overflow\n else if (defaultIndex > state.tabs.length) {\n dispatch({\n type: ActionTypes.SetSelectedIndex,\n index: tabs.indexOf(focusableTabs[focusableTabs.length - 1])\n });\n } // Middle\n else {\n var before = tabs.slice(0, defaultIndex);\n var after = tabs.slice(defaultIndex);\n var next = [].concat(after, before).find(function (tab) {\n return focusableTabs.includes(tab);\n });\n if (!next) return;\n dispatch({\n type: ActionTypes.SetSelectedIndex,\n index: tabs.indexOf(next)\n });\n }\n }, [defaultIndex, state.tabs, state.selectedIndex]);\n var lastChangedIndex = useRef(state.selectedIndex);\n var providerBag = useMemo(function () {\n return [state, {\n dispatch: dispatch,\n change: function change(index) {\n if (lastChangedIndex.current !== index) onChangeRef.current(index);\n lastChangedIndex.current = index;\n dispatch({\n type: ActionTypes.SetSelectedIndex,\n index: index\n });\n }\n }];\n }, [state, dispatch]);\n return React.createElement(TabsContext.Provider, {\n value: providerBag\n }, render({\n props: _extends({}, passThroughProps),\n slot: slot,\n defaultTag: DEFAULT_TABS_TAG,\n name: 'Tabs'\n }));\n} // ---\n\n\nvar DEFAULT_LIST_TAG = 'div';\n\nfunction List(props) {\n var _useTabsContext = useTabsContext([Tab.name, List.name].join('.')),\n _useTabsContext$ = _useTabsContext[0],\n selectedIndex = _useTabsContext$.selectedIndex,\n orientation = _useTabsContext$.orientation;\n\n var slot = {\n selectedIndex: selectedIndex\n };\n var propsWeControl = {\n role: 'tablist',\n 'aria-orientation': orientation\n };\n var passThroughProps = props;\n return render({\n props: _extends({}, passThroughProps, propsWeControl),\n slot: slot,\n defaultTag: DEFAULT_LIST_TAG,\n name: 'Tabs.List'\n });\n} // ---\n\n\nvar DEFAULT_TAB_TAG = 'button';\n\nfunction Tab(props) {\n var _props$type, _panels$myIndex, _panels$myIndex$curre;\n\n var id = \"headlessui-tabs-tab-\" + useId();\n\n var _useTabsContext2 = useTabsContext(Tab.name),\n _useTabsContext2$ = _useTabsContext2[0],\n selectedIndex = _useTabsContext2$.selectedIndex,\n tabs = _useTabsContext2$.tabs,\n panels = _useTabsContext2$.panels,\n orientation = _useTabsContext2$.orientation,\n activation = _useTabsContext2$.activation,\n _useTabsContext2$2 = _useTabsContext2[1],\n dispatch = _useTabsContext2$2.dispatch,\n change = _useTabsContext2$2.change;\n\n var internalTabRef = useRef(null);\n var tabRef = useSyncRefs(internalTabRef, function (element) {\n if (!element) return;\n dispatch({\n type: ActionTypes.ForceRerender\n });\n });\n useIsoMorphicEffect(function () {\n dispatch({\n type: ActionTypes.RegisterTab,\n tab: internalTabRef\n });\n return function () {\n return dispatch({\n type: ActionTypes.UnregisterTab,\n tab: internalTabRef\n });\n };\n }, [dispatch, internalTabRef]);\n var myIndex = tabs.indexOf(internalTabRef);\n var selected = myIndex === selectedIndex;\n var handleKeyDown = useCallback(function (event) {\n var list = tabs.map(function (tab) {\n return tab.current;\n }).filter(Boolean);\n\n if (event.key === Keys.Space || event.key === Keys.Enter) {\n event.preventDefault();\n event.stopPropagation();\n change(myIndex);\n return;\n }\n\n switch (event.key) {\n case Keys.Home:\n case Keys.PageUp:\n event.preventDefault();\n event.stopPropagation();\n return focusIn(list, Focus.First);\n\n case Keys.End:\n case Keys.PageDown:\n event.preventDefault();\n event.stopPropagation();\n return focusIn(list, Focus.Last);\n }\n\n return match(orientation, {\n vertical: function vertical() {\n if (event.key === Keys.ArrowUp) return focusIn(list, Focus.Previous | Focus.WrapAround);\n if (event.key === Keys.ArrowDown) return focusIn(list, Focus.Next | Focus.WrapAround);\n return;\n },\n horizontal: function horizontal() {\n if (event.key === Keys.ArrowLeft) return focusIn(list, Focus.Previous | Focus.WrapAround);\n if (event.key === Keys.ArrowRight) return focusIn(list, Focus.Next | Focus.WrapAround);\n return;\n }\n });\n }, [tabs, orientation, myIndex, change]);\n var handleFocus = useCallback(function () {\n var _internalTabRef$curre;\n\n (_internalTabRef$curre = internalTabRef.current) == null ? void 0 : _internalTabRef$curre.focus();\n }, [internalTabRef]);\n var handleSelection = useCallback(function () {\n var _internalTabRef$curre2;\n\n (_internalTabRef$curre2 = internalTabRef.current) == null ? void 0 : _internalTabRef$curre2.focus();\n change(myIndex);\n }, [change, myIndex, internalTabRef]);\n var type = ((_props$type = props == null ? void 0 : props.type) != null ? _props$type : (props.as || DEFAULT_TAB_TAG) === 'button') ? 'button' : undefined;\n var slot = useMemo(function () {\n return {\n selected: selected\n };\n }, [selected]);\n var propsWeControl = {\n ref: tabRef,\n onKeyDown: handleKeyDown,\n onFocus: activation === 'manual' ? handleFocus : handleSelection,\n onClick: handleSelection,\n id: id,\n role: 'tab',\n type: type,\n 'aria-controls': (_panels$myIndex = panels[myIndex]) == null ? void 0 : (_panels$myIndex$curre = _panels$myIndex.current) == null ? void 0 : _panels$myIndex$curre.id,\n 'aria-selected': selected,\n tabIndex: selected ? 0 : -1\n };\n var passThroughProps = props;\n\n if (process.env.NODE_ENV === 'test') {\n var _Object$assign;\n\n Object.assign(propsWeControl, (_Object$assign = {}, _Object$assign['data-headlessui-index'] = myIndex, _Object$assign));\n }\n\n return render({\n props: _extends({}, passThroughProps, propsWeControl),\n slot: slot,\n defaultTag: DEFAULT_TAB_TAG,\n name: 'Tabs.Tab'\n });\n} // ---\n\n\nvar DEFAULT_PANELS_TAG = 'div';\n\nfunction Panels(props) {\n var _useTabsContext3 = useTabsContext([Tab.name, Panels.name].join('.')),\n selectedIndex = _useTabsContext3[0].selectedIndex;\n\n var slot = useMemo(function () {\n return {\n selectedIndex: selectedIndex\n };\n }, [selectedIndex]);\n return render({\n props: props,\n slot: slot,\n defaultTag: DEFAULT_PANELS_TAG,\n name: 'Tabs.Panels'\n });\n} // ---\n\n\nvar DEFAULT_PANEL_TAG = 'div';\nvar PanelRenderFeatures = Features.RenderStrategy | Features.Static;\n\nfunction Panel(props) {\n var _tabs$myIndex, _tabs$myIndex$current;\n\n var _useTabsContext4 = useTabsContext([Tab.name, Panel.name].join('.')),\n _useTabsContext4$ = _useTabsContext4[0],\n selectedIndex = _useTabsContext4$.selectedIndex,\n tabs = _useTabsContext4$.tabs,\n panels = _useTabsContext4$.panels,\n dispatch = _useTabsContext4[1].dispatch;\n\n var id = \"headlessui-tabs-panel-\" + useId();\n var internalPanelRef = useRef(null);\n var panelRef = useSyncRefs(internalPanelRef, function (element) {\n if (!element) return;\n dispatch({\n type: ActionTypes.ForceRerender\n });\n });\n useIsoMorphicEffect(function () {\n dispatch({\n type: ActionTypes.RegisterPanel,\n panel: internalPanelRef\n });\n return function () {\n return dispatch({\n type: ActionTypes.UnregisterPanel,\n panel: internalPanelRef\n });\n };\n }, [dispatch, internalPanelRef]);\n var myIndex = panels.indexOf(internalPanelRef);\n var selected = myIndex === selectedIndex;\n var slot = useMemo(function () {\n return {\n selected: selected\n };\n }, [selected]);\n var propsWeControl = {\n ref: panelRef,\n id: id,\n role: 'tabpanel',\n 'aria-labelledby': (_tabs$myIndex = tabs[myIndex]) == null ? void 0 : (_tabs$myIndex$current = _tabs$myIndex.current) == null ? void 0 : _tabs$myIndex$current.id,\n tabIndex: selected ? 0 : -1\n };\n\n if (process.env.NODE_ENV === 'test') {\n var _Object$assign2;\n\n Object.assign(propsWeControl, (_Object$assign2 = {}, _Object$assign2['data-headlessui-index'] = myIndex, _Object$assign2));\n }\n\n var passThroughProps = props;\n return render({\n props: _extends({}, passThroughProps, propsWeControl),\n slot: slot,\n defaultTag: DEFAULT_PANEL_TAG,\n features: PanelRenderFeatures,\n visible: selected,\n name: 'Tabs.Panel'\n });\n} // ---\n\n\nTab.Group = Tabs;\nTab.List = List;\nTab.Panels = Panels;\nTab.Panel = Panel;\nexport { Tab };","import React from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { Tab } from '@headlessui/react'\nimport DataTable from \"../components/Datatable/DataTable\";\nimport { COLOR_PRIMARY } from 'gatsby-env-variables'\n\n\n// Basic language component\nconst LanguagePage = ({ pageContext: { language, bibles, resources, films } }) => {\n\n const { t } = useTranslation()\n\n const tabs = [\n { name: t('bibles.title'), href: '#', count: (bibles ? bibles.length : 0), current: true },\n { name: t('resources.title'), href: '#', count: (resources ? resources.length : 0), current: false },\n { name: t('films.title'), href: '#', count: (films ? films.length : 0), current: false }\n ]\n function classNames(...classes) {\n return classes.filter(Boolean).join(' ')\n }\n\n return (\n <div>\n\n <Tab.Group>\n\n <div className=\"border-b border-gray-200 mb-8\">\n <Tab.List>\n <nav className=\"-mb-px flex space-x-8 justify-center\" aria-label=\"Tabs\">\n {tabs.map((tab) => (\n <Tab key={tab.name} aria-current={tab.current ? 'page' : undefined}>\n\n {({ selected }) => (\n <span\n className={classNames(\n selected ? `border-${COLOR_PRIMARY}-500 text-${COLOR_PRIMARY}-600` : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-200',\n 'whitespace-nowrap flex py-4 px-1 border-b-2 text-sm'\n )}\n >\n {tab.name}\n\n {tab.count ? (\n <span className={classNames(\n selected ? `bg-${COLOR_PRIMARY}-100 text-${COLOR_PRIMARY}-600` : 'bg-gray-100 text-gray-900',\n 'hidden ml-3 py-0.5 px-2.5 rounded-full text-xs md:inline-block')}>{tab.count}</span>\n ) : null}\n\n </span>\n )}\n\n </Tab>\n ))}\n </nav>\n </Tab.List>\n\n </div>\n\n <Tab.Panels>\n <Tab.Panel>\n\n <ul className=\"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3\">\n {bibles.map((bible) => (\n <li key={bible.id} className=\"col-span-1 bg-white rounded-lg shadow divide-y divide-gray-200 flex flex-col\">\n\n <div className=\"w-full flex flex-grow items-center justify-between p-6 space-x-6\">\n <div className=\"flex-1\">\n <div className=\"flex space-x-3\">\n <h3 className=\"flex-1 text-gray-900 text-sm\">{bible.title}</h3>\n <span className=\"flex-shrink-0 inline-block px-2 py-0.5 text-gray-400 text-xs\">\n {bible.date}\n </span>\n </div>\n <p className=\"text-gray-500 text-md\">{bible.title_vernacular}</p>\n </div>\n </div>\n\n <div className=\"flex divide-x divide-gray-200 items-end\">\n <div className=\"w-0 flex-1 flex\">\n <a\n href={`https://downloads.dbs.org/downloads/pdf/${bible.id}/${bible.id}.pdf`}\n target='_blank' rel=\"noreferrer\"\n className=\"relative -mr-px w-0 flex-1 inline-flex items-center justify-center py-4 text-sm text-gray-700 border border-transparent rounded-bl-lg hover:text-gray-500\">\n <span className=\"ml-3\">PDF</span>\n </a>\n </div>\n <div className=\"-ml-px w-0 flex-1 flex\">\n <a\n href={`https://downloads.dbs.org/downloads/html_zips/${bible.id}.zip`}\n className=\"relative w-0 flex-1 inline-flex items-center justify-center py-4 text-sm text-gray-700 border border-transparent rounded-br-lg hover:text-gray-500\">\n <span className=\"ml-3\">HTML</span>\n </a>\n </div>\n <div className=\"-ml-px w-0 flex-1 flex\">\n <a\n href={`/bibles/${bible.id}`}\n className=\"relative w-0 flex-1 inline-flex items-center justify-center py-4 text-sm text-gray-700 border border-transparent rounded-br-lg hover:text-gray-500\">\n <span className=\"ml-3\">ePub</span>\n </a>\n </div>\n </div>\n\n </li>\n ))}\n </ul>\n\n </Tab.Panel>\n <Tab.Panel>\n\n <DataTable\n data={resources}\n columns={[\n {accessor: 'title', Header: t('fields.title'),\n Cell: ({ row }) => (\n <a className={`text-${COLOR_PRIMARY}-600`} href={row.values.url}>\n <div className={`text-${COLOR_PRIMARY}-600 w-60 overflow-ellipsis overflow-hidden`}>{row.values.title}</div>\n </a>\n )},\n {accessor: 'url', Header: 'url', hidden:true},\n {accessor: 'type', Header: t('fields.type')},\n {accessor: 'author', Header: t('fields.author')},\n ]} />\n {/* \"iso\":\"hin\",\"type\":\"audio\",\"cover\":\"\",\"title\":\"Songs\",\"title_vernacular\":null,\"description\":\"\",\"url_source\":null,\"url\":\"https://globalrecordings.net/en/program/80919\",\"author\":\"Global Recordings Network\",\"organization_id\":\"global-recordings-network\",\"date\":\"\" */}\n\n </Tab.Panel>\n <Tab.Panel>\n\n <DataTable\n data={films}\n columns={[\n {accessor: 'title', Header: t('fields.title'),\n Cell: ({ row }) => (\n <a className={`text-${COLOR_PRIMARY}-600`} href={row.values.url}>\n <div className={`text-${COLOR_PRIMARY}-600 w-60 overflow-ellipsis overflow-hidden`}>{row.values.title}</div>\n </a>\n )},\n {accessor: 'url', Header: 'url', hidden:true},\n {accessor: 'author', Header: t('fields.author')},\n ]} />\n\n </Tab.Panel>\n </Tab.Panels>\n\n\n\n </Tab.Group>\n\n </div>)\n}\n\nexport default LanguagePage"],"names":["_reducers","ActionTypes","reducers","SetSelectedIndex","state","action","selectedIndex","index","SetOrientation","orientation","SetActivation","activation","RegisterTab","tabs","includes","tab","concat","UnregisterTab","filter","RegisterPanel","panels","panel","UnregisterPanel","ForceRerender","TabsContext","createContext","useTabsContext","component","context","useContext","err","Error","captureStackTrace","stateReducer","type","displayName","DEFAULT_TABS_TAG","Fragment","DEFAULT_TAB_TAG","Tab","props","_props$type","_panels$myIndex","_panels$myIndex$curre","id","_useTabsContext2","name","_useTabsContext2$","_useTabsContext2$2","dispatch","change","internalTabRef","useRef","tabRef","element","myIndex","indexOf","selected","handleKeyDown","useCallback","event","list","map","current","Boolean","key","preventDefault","stopPropagation","vertical","horizontal","handleFocus","_internalTabRef$curre","focus","handleSelection","_internalTabRef$curre2","as","undefined","slot","useMemo","propsWeControl","ref","onKeyDown","onFocus","onClick","role","tabIndex","passThroughProps","defaultTag","PanelRenderFeatures","Group","_props$defaultIndex","defaultIndex","_props$vertical","_props$manual","manual","onChange","_useReducer","useReducer","onChangeRef","useEffect","length","focusableTabs","hasAttribute","before","slice","after","next","find","lastChangedIndex","providerBag","Provider","value","List","_useTabsContext$","join","Panels","Panel","_tabs$myIndex","_tabs$myIndex$current","_useTabsContext4","_useTabsContext4$","internalPanelRef","panelRef","features","visible","pageContext","bibles","language","resources","films","t","useTranslation","href","count","classNames","classes","className","COLOR_PRIMARY","bible","title","date","title_vernacular","target","rel","DataTable","data","columns","accessor","Header","Cell","row","values","url","hidden"],"sourceRoot":""}