{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/app/model/collection.ts","webpack:///./src/app/model/selector.ts","webpack:///./node_modules/@angular/core/fesm5 lazy namespace object","webpack:///./src/app/selector/selector-gadget.component.ts","webpack:///./src/app/shared/view.service.ts","webpack:///./src/app/selector/list/list.component.scss","webpack:///./src/main.ts","webpack:///./src/app/app.module.ts","webpack:///./src/app/app.routes.ts","webpack:///./src/app/shared/config.service.ts","webpack:///./src/app/model/config.ts","webpack:///./src/app/model/alert-message.ts","webpack:///./src/app/shared/selector.service.ts","webpack:///./src/app/model/project.ts","webpack:///./src/app/shared/http.service.ts","webpack:///./src/app/shared/nats.service.ts","webpack:///./src/app/selector/selector-gadget.component.html","webpack:///./src/app/selector/selector-gadget.component.scss","webpack:///./src/app/app.component.ts","webpack:///./src/app/app.component.html","webpack:///./src/app/header/header.component.ts","webpack:///./src/app/header/header.component.html","webpack:///./src/app/header/header.component.scss","webpack:///./src/app/footer/footer.component.ts","webpack:///./src/app/footer/footer.component.html","webpack:///./src/app/footer/footer.component.scss","webpack:///./src/app/http_container/html-container.component.ts","webpack:///./src/app/http_container/html-container.component.html","webpack:///./src/app/http_container/html-container.component.scss","webpack:///./src/app/home/home.component.ts","webpack:///./src/app/home/home.component.html","webpack:///./src/app/home/home.component.scss","webpack:///./src/app/navigator/navigator.component.ts","webpack:///./src/app/navigator/navigator.component.html","webpack:///./src/app/navigator/navigator.component.scss","webpack:///./src/app/navigator/state.directive.ts","webpack:///./src/app/selector/list/list.component.ts","webpack:///./src/app/selector/list/list.component.html","webpack:///./src/app/preview/preview.component.ts","webpack:///./src/app/shared/socket.service.ts","webpack:///./src/app/shared/websocket.service.ts","webpack:///./src/app/shared/index.ts","webpack:///./src/app/preview/preview.component.html","webpack:///./src/app/preview/preview.component.scss","webpack:///./src/app/preview/JSONXMLPreview/JSONXMLPreview.component.ts","webpack:///./src/app/preview/JSONXMLPreview/JSONXMLPreview.component.html","webpack:///./src/app/preview/JSONXMLPreview/JSONXMLPreview.component.scss","webpack:///./src/app/preview/CSVPreview/CSVPreview.component.ts","webpack:///./src/app/preview/CSVPreview/csv.service.ts","webpack:///./src/app/preview/CSVPreview/element.ts","webpack:///./src/app/preview/CSVPreview/csvpreview.component.html","webpack:///./src/app/preview/CSVPreview/csvpreview.component.scss","webpack:///./src/app/selector/project/project.component.ts","webpack:///./src/app/selector/project/project.component.html","webpack:///./src/app/selector/project/project.component.scss","webpack:///./src/app/selector/list/selectorlistitem/selector-list-item.component.ts","webpack:///./src/app/selector/list/selectorlistitem/list-item.html","webpack:///./src/app/selector/list/selectorlistitem/selector-list-item.scss","webpack:///./src/app/components/inplace-edit/inplace-edit.component.ts","webpack:///./src/app/components/inplace-edit/inplace-edit.html","webpack:///./src/app/components/inplace-edit/inplace-edit.scss","webpack:///./src/app/alert/alert.component.ts","webpack:///./src/app/alert/alert.component.html","webpack:///./src/app/alert/alert.component.scss","webpack:///./src/app/selector/result_info/result-info.component.ts","webpack:///./src/app/selector/result_info/result-info.component.html","webpack:///./src/app/selector/result_info/result-info.component.scss","webpack:///./src/app/components/busy-indicator/busy-indicator.component.ts","webpack:///./src/app/components/busy-indicator/busy-indicator.component.html","webpack:///./src/app/components/busy-indicator/busy-indicator.component.scss","webpack:///./src/app/shared/animations.ts","webpack:///./src/app/app.component.scss"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","3","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","selector_1","Paginator","this","selector","attr","type","pageNum","Request","url","userToken","actions","Array","proxy","Collection","request","fields","paginator","paginatorUI","paginatedResults","format","path","namePattern","RegExp","selectorNamePattern","preview","deleteSelector","id","updateSelection","selectorId","obj","attrs","Type","Text","Link","Image","property_index","maxIndex","indexOf","index","match","newSelector","Field","current_selected","count","details","updateName","exec","isValid","undefined","stringify","collectionName","JSON","filter","val","nextPageSelector","isContainsDetails","ATTRS","LinkExtractor","HREF","TEXT","types","params","includeIfEmpty","it_1","filters","updateExtractor","attrName","add","it_2","isActive","Error","ImageExtractor","SRC","ALT","it_3","it_4","TextExtractor","REGEX","regexp","Extractor","fieldMapValue","Filter","param","Dump","toggleType","updateExtractorType","filterIndex","filterName","toLowerCase","idx","updateAttrs","addAttr","attrIndex","webpackEmptyAsyncContext","req","Promise","resolve","then","e","code","keys","core_1","shared_1","platform_browser_1","animations_1","SelectorGadgetComponent","_selectorService","_httpService","_viewService","title","selectors_count","export_result","collection_name","show_preview","selecting","activeTab","ngOnInit","isDevMode","jQuery","load","setTitle","updateView","setTimeout","trigger","onCollectionChanged","collection","active_tabs","current_url","post_params","action","webview","enable_panel","onNavigate","selectorview","details_mode","current_collection","update","activateWebTab","onWebTabActivated","onPreviewTabActivated","onFormatChanged","__decorate","ViewChild","Component","template","styles","providers","SelectorService","ViewService","HttpService","animations","slideUp","slideRight","Title","http_1","Subject_1","alert_message_1","http_2","enableUI","isSelecting","alert_message","Subject","resultInfo","delay","$","setHelp","str","html","errorAlert","message","alert","AlertMessage","Response","body","json","header","statusText","status","text","error","HttpErrorResponse","next","getMessage","asObservable","resultAlert","info","getResult","Injectable","platform_browser_dynamic_1","app_module_1","main","platformBrowserDynamic","bootstrapModule","AppModule","MODULE_REF","enableProdMode","document","readyState","addEventListener","forms_1","app_routes_1","app_component_1","header_component_1","selector_gadget_component_1","footer_component_1","html_container_component_1","home_component_1","navigator_component_1","state_directive_1","list_component_1","angular2_prettyjson_1","preview_component_1","JSONXMLPreview_component_1","CSVPreview_component_1","project_component_1","selector_list_item_component_1","inplace_edit_component_1","alert_component_1","result_info_component_1","busy_indicator_component_1","NgModule","imports","BrowserModule","FormsModule","AppRoutingModule","HttpClientModule","ReactiveFormsModule","PrettyJsonModule","BrowserAnimationsModule","declarations","AppComponent","HtmlContainerComponent","NavigatorComponent","SelectorListComponent","PreviewComponent","JSONXMLPreviewComponent","CSVPreviewComponent","HeaderComponent","FooterComponent","ProjectComponent","SelectorListItemComponent","StateDirective","InplaceEditComponent","HomeComponent","AlertComponent","ResultInfoComponent","BusyIndicatorComponent","bootstrap","router_1","routes","redirectTo","pathMatch","component","RouterModule","forRoot","config_1","ConfigService","init","config","localStorage","getItem","cfg","parse","Config","save","setItem","renderJSContent","angular2_uuid_1","UUID","project_1","collection_1","_1","configService","_selectors","mainProject","Project","createNewProject","addSelector","sel","addNewCollection","coll","collections","addCollection","deleteCollection","collection_index","getProject","getCollections","getCollectionByName","_i","_a","getCollectionByUrl","initCollection","name_pattern","search","updateSelector","getSelectors","getFrameWindowRef","getElementById","contentWindow","enableSelectorGadget","SelectorGadgetWrapper","disableSelectorGadget","getElemAttr","css","getElementAttr","resetAll","initSelectorGadget","collectionStringify","export_format","getSelectedCount","getCurrentSelectedCount","setSelectorPath","regex","regexIndex","setPathEx","console","log","resetSelection","suspendGadget","suspendSelectorGadget","resumeGadget","resumeSelectorGadget","getCount","absolute","base","relative","stack","split","parts","pop","join","Observable_1","core_2","_http","fetch_url","parse_url","cancelRequest","createTaskURL","billingCreditsRequest","initsg","formData","waitDelay","headers","HttpHeaders","set","post","observe","responseType","map","extractData","catch","handleError","postCollection","append","sendCancelRequest","processID","res","createTask","task","hdrs","DFK","User","APIKey","getUserCredits","errMsg","err","toString","Observable","throw","HttpClient","BehaviorSubject_1","NatsService","progressMessage$","BehaviorSubject","resultLink$","nats","natsServerAddr","publish","subject","subscribe","callback","max","payload","_this","observer","natsService","connect","on","taskID","response_sid","parse_res","error_sid","unsubscribe","complete_sid","info_sid","close","parseResult","complete","SetProgressMessage","cancel","ngOnDestroy","httpService","UserName","UserAvatar","SingOutLink","SignInLink","Balance","pricingURL","resourcesURL","webScraperURL","renderHTMLURL","extractSERPDataURL","urlToPdfURL","captureScreenshotURL","balance","goEvent","EventEmitter","riseGoEvent","event","emit","exists","Name","Avatar","UserCredits","updateUserCredits","windowOnFocus","refreshUser","uc","credits","userExists","Output","host","(window:focus)","copyright","_service","sanitizer","insertScript2Content","srcdoc","nav","history","pushState","busy","response","setIFrameContent","resp","bypassSecurityTrustHtml","onLoad","enableSelector","SelectorGadget","disableSelector","addScript","doc","script_str","inline","script","createElement","src","head","getElementsByTagName","appendChild","addCSS","css_link","rel","href","addBase","_url","URL","baseUrl","protocol","pathArray","pathname","DomSanitizer","hover","newHref","replace","viewService","onGoEvent","proxyChanged","prorocol_pattern","onGo","onProxyChanged","_el","_renderer","validateClass","onInput","setValideStyle","onFocus","onFocusout","removeClass","valid","addClass","Input","HostListener","Directive","ElementRef","Renderer","FileSaver","selectorService","click","Event","enable_add_collection","details_parent_stack","selectedItem","paginator_selecting","isImport","selectedId","oldSelector","selectedSelector","collectionChanged","formatChanged","collectionList","state","extend","onSelect","reset","onListBlur","onAddSelector","onEditCSS","assign","__proto__","onAddCollection","onSelChange","have2Update","onDeleteCollection","updateSelectorsCount","resetDetailsHistory","onAddDetails","selectorList","onDeleteSelector","selector_id","onCancel","onDone","onBack","parentCollection","onAddPaginator","scroll","paginate","element","onDeletePaginator","onSelectorItemClick","eventListener","event_id","existCollection","paginator_action","postData","onPopState","castFiledsToCorespondingSelectorType","func","onChangeFormat","onExportCollection","blob","Blob","saveAs","autoBom","onImportCollection","files","reader","FileReader","onload","col","importPaginator","size","readAsText","arr","f","pag","(window:message)","(window:popstate)","file_saver_1","socket_service_1","deep_copy_ts_1","websocket_service_1","_natsService","wsService","sockerService","closePreview","showIndicator","progress","resultLink","requestCount","responseCount","elapsedTime","counter","currentProcessID","userLoggedIn","dashboardURL","outputFormat","progressSubscription","resultLinkSubscription","pr","results","onExport","onClose","previewCollection","deepCopy","responseHandler","onError","translateMsg","onFinish","onSave","file","msg","msgObj","msgText","b64DecodeUnicode","updateResult","decodeURIComponent","atob","charCodeAt","csv_preview","xls_preview","fieldMask","initColumns","displayData","getExportResult","view","onCreateTask","open","SocketService","WebsocketService","io","location","hostname","connect1","socket","disconnect","connected","disconnected","chanel","success","event_name","off","Rx","WebSocket","onopen","send","onmessage","onerror","onclose","ws","observable","obs","OPEN","__export","csv_service_1","element_1","csvService","csvData","displayOutput","csv_data","initElementTemplates","displayTemplate","headerRow","getAttrFromValueName","hrefIndex","textIndex","getFieldName","LinkElementFactory","srcIndex","altIndex","ImageElementFactory","TextElementFactory","field","fromIndex","lastIndexOf","substring","toIndex","getElementTypeByField","escapeSpecialChars","jsonObj","tables","table","jsonString","CSVService","csv","simple_csv","alt","dataExpr","srcColumnNum","altColumnNum","csvRow","srcArray","test","altArray","cell","hrefColumnNum","textColumnNum","hrefArray","textArray","rxjs_1","fieldID","addDetailsEvent","cssChanged","editCss","pathSelected","selected","expanded","selector_panel_id","regexValue","Filters","checked","FieldAttrs","onCSSSelectorChange","addDetails","onDelete","ngAfterViewInit","fromEvent","filterMenu","nativeElement","fillExtractorfilter","self","each","prop","onRegexChange","onclickExtractor","noop","CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","edit_mode","innerValue","onTouchedCallback","onChangeCallback","v","writeValue","registerOnChange","fn","registerOnTouched","onDblClick","onBlur","onKeyDown","which","preventDefault","show","subscription","toggle","a","fade","popUp","view_service_1","withCancel","Subscription","slideDown","style","opacity","transform","transition","animate","display"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAA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J,QAAS,KAChDnoB,EAAAuZ,MAAM,OAAQvZ,EAAAkoB,MAAM,CAACK,QAAS,OAAQJ,QAAS,KAC/CnoB,EAAAqoB,WAAW,eAAgB,CACvBroB,EAAAsoB,QAAQ,mBAEZtoB,EAAAqoB,WAAW,eAAgB,CACvBroB,EAAAsoB,QAAQ,wCCtChB5wB,EAAAD,QAAA","file":"js/app.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t3: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./dist\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([242,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { Field, Type, IExtractor, LinkExtractor, ImageExtractor, TextExtractor } from './selector'\n\nexport class Paginator {\n selector = '';\n attr = '';\n type = '';\n pageNum = 10;\n}\n\nexport class Request {\n url = '';\n userToken = '';\n type = '';\n actions = Array();\n proxy = '';\n}\n\nexport class Collection {\n\tpaginator = '';\n\tpaginatorUI: Paginator = null;\n\tpaginatedResults = false;\n\tformat = '';\n\tpath = false;\n\tnamePattern = new RegExp('https?://(?:www\\.)?([^\\.]+\\.[a-zA-Z]{2,})', 'g');\n\tselectorNamePattern = RegExp('selector(\\\\d+)');\n\tpreview = true;\n\tconstructor(public name: string, public request: Request, public fields: Array) {\n\t}\n\n\tdeleteSelector(id: number) {\n\t\tthis.fields.splice(id, 1);\n\t}\n\n\tupdateSelection(selectorId: number, obj: any) {\n\t\tlet property = 'selector';\n\t\tlet t: Type = Type.Text;\n\t\tlet attrs: Array;\n\t\tif (obj.data.data.type === 'a') {\n\t\t\tattrs = new Array('href', 'text');\n\t\t\t// property = 'link';\n\t\t\tt = Type.Link;\n\t\t} else if (obj.data.data.type === 'img') {\n\t\t\tattrs = new Array('src', 'alt');\n\t\t\t// property = 'image';\n\t\t\tt = Type.Image;\n\t\t} else {\n\t\t\tattrs = new Array('text');\n\t\t}\n\t\tif (this.fields[selectorId].selector.length === 0) {\n\t\t\tlet property_index = 1;\n\t\t\tlet maxIndex = 1;\n\t\t\tfor (let i = 0; i < this.fields.length; i++) {\n\t\t\t\tif (this.fields[i].name.indexOf(property) !== -1) {\n\t\t\t\t\tlet index = this.fields[i].name.match(this.selectorNamePattern);\n\t\t\t\t\tif (index !== null && +index[1] === property_index) {\n\t\t\t\t\t\tproperty_index = maxIndex = maxIndex + 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (index !== null && maxIndex < +index[1]) {\n\t\t\t\t\t\t\tmaxIndex = +index[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.fields[selectorId].name === 'Click on element to select it') {\n\t\t\t\tproperty += property_index;\n\t\t\t}\n\t\t\tlet newSelector = new Field(property, obj.data.data.current_selected, null, obj.data.data.count);\n\t\t\tnewSelector.type = t;\n\t\t\tnewSelector.attrs = attrs;\n\t\t\tthis.fields[selectorId] = newSelector;\n\n\t\t} else {\n\t\t\tthis.fields[selectorId].selector = obj.data.data.current_selected;\n\t\t\tthis.fields[selectorId].count = obj.data.data.count;\n\t\t\tif (this.fields[selectorId].type !== t) {\n\t\t\t\tthis.fields[selectorId].type = t;\n\t\t\t\tthis.fields[selectorId].attrs = attrs;\n\t\t\t\tthis.fields[selectorId].details = null;\n\t\t\t}\n\t\t}\n\t}\n\n\tupdateName() {\n\t\treturn this.namePattern.exec(this.request.url)[1];\n\t}\n\n\tisValid() {\n\t\treturn this.name !== undefined && this.name.length > 0 && this.fields !== undefined\n\t\t && this.fields.length > 0 && this.request !== undefined && this.request.url !== undefined && this.request.url.length > 0;\n\t}\n\n\tstringify(format, collectionName): string {\n\t\tthis.name = collectionName;\n\t\tthis.format = format;\n\t\treturn JSON.stringify(this, this.filter);\n\t}\n\n\tfilter(i, val) {\n\t\tif (i === 'fieldMapValue' || /* i === 'attrs' || */\n\t\t\ti === 'mask' || i === 'count' ||\n\t\t\ti === 'namePattern' || (i === 'details' && val === null) ||\n\t\t\t(i === 'paginator' && val === '') /* || i === 'type' */ ||\n\t\t\ti === 'paginatedResults' || i === 'param' && val === '' ||\n\t\t\t(i === 'paginatorUI') || i === 'selectorNamePattern' || i === 'preview' || i === 'userToken'\n\t\t\t|| val === '' || val === []) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (i === 'paginator' && this.paginatorUI !== null) {\n\t\t\treturn {'nextPageSelector': this.paginatorUI.selector , 'pageNum': this.paginatorUI.pageNum };\n\t\t}\n\t\treturn val;\n\t}\n\n\tisContainsDetails(): boolean {\n\t\tfor (let i = 0; i < this.fields.length; i++) {\n\t\t\tif (this.fields[i].details != null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n}\n","import { Collection } from './collection'\nexport enum Type {\n\tImage = 0,\n\tText,\n\tLink,\n\tDump\n}\n\nexport enum ATTRS {\n\tHREF = 0x1,\n\tTEXT = 0x2,\n\tSRC = 0x3,\n\tALT = 0x4,\n\tREGEX = 0x5,\n\tPATH = 0x6\n}\n\nexport interface IExtractor {\n\tattrs: Array;\n\ttypes: Array;\n\tfilters: Array;\n\tparams: any;\n\tupdateExtractor(attrName: string, add: boolean);\n\t// Return is given attribute is active now\n\tisActive(attrName: string): boolean;\n}\n\nexport class LinkExtractor implements IExtractor {\n\tattrs = [\n\t\t{'name': 'href', 'value': ATTRS.HREF},\n\t\t{'name': 'text', 'value': ATTRS.TEXT}/* ,\n\t\t{'name': 'path', 'value': ATTRS.PATH} */];\n\ttypes = [];\n\tfilters: Array;\n\tparams = {includeIfEmpty: false};\n\tconstructor() {\n\t\tfor (let it = 0; it < this.attrs.length - 1; it++) {\n\t\t\tthis.types.push(this.attrs[it].name);\n\t\t}\n\t\tthis.filters = new Array();\n\t\tthis.filters.push('Trim');\n\t}\n\tupdateExtractor(attrName, add) {\n\t\tlet attrValue = -1;\n\t\tfor (let it = 0; it < this.attrs.length; it++) {\n\t\t\tif (this.attrs[it].name === attrName) {\n\t\t\t\tattrValue = this.attrs[it].value;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet index = this.types.indexOf(attrName);\n\t\tif (add) {\n\t\t\tif (index === -1) {\n\t\t\t\tif (attrName === 'path') {\n\t\t\t\t\tthis.types = [attrName];\n\t\t\t\t} else {\n\t\t\t\t\tif (this.isActive('path')) {\n\t\t\t\t\t\tthis.types = [attrName];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.types.push(attrName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.types.splice(index, 1);\n\t\t\t}\n\t\t}\n\t\tif (this.types.length === 0) {\n\t\t\tthis.updateExtractor(attrName, true);\n\t\t\tthrow new Error('Extractor type cannot be emty. You should choose one at least.');\n\t\t}\n\t}\n\n\tisActive(attrName: string): boolean {\n\t\tlet active = this.types.indexOf(attrName) !== -1;\n\t\treturn active;\n\t}\n}\n\nexport class ImageExtractor implements IExtractor {\n\tattrs = [\n\t\t{'name': 'src', 'value': ATTRS.SRC},\n\t\t{'name': 'alt', 'value': ATTRS.ALT}];\n\ttypes = [];\n\tfilters: Array;\n\tparams = {includeIfEmpty: false};\n\tconstructor() {\n\t\tfor (let it = 0; it < this.attrs.length; it++) {\n\t\t\tthis.types.push(this.attrs[it].name);\n\t\t}\n\t\tthis.filters = new Array();\n\t\tthis.filters.push('Trim');\n\t}\n\tupdateExtractor(attrName, add) {\n\t\tlet attrValue = -1;\n\t\tfor (let it = 0; it < this.attrs.length; it++) {\n\t\t\tif (this.attrs[it].name === attrName) {\n\t\t\t\tattrValue = this.attrs[it].value;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet index = this.types.indexOf(attrName);\n\t\tif (add) {\n\t\t\tif (index === -1) {\n\t\t\t\tthis.types.push(attrName);\n\t\t\t}\n\t\t} else {\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.types.splice(index, 1);\n\t\t\t}\n\t\t}\n\t\tif (this.types.length === 0) {\n\t\t\tthis.updateExtractor(attrName, true);\n\t\t\tthrow Error('Extractor type cannot be emty. You should choose one at least.');\n\t\t}\n\t}\n\n\tisActive(attrName: string): boolean {\n\t\treturn this.types.indexOf(attrName) !== -1;\n\t}\n}\n\nexport class TextExtractor implements IExtractor {\n\tattrs = [{'name': 'regex', 'value': ATTRS.REGEX}];\n\ttypes = ['text'];\n\tfilters: Array;\n\tparams = {regexp: '', includeIfEmpty: false};\n\tconstructor() {\n\t\tthis.filters = new Array();\n\t\tthis.filters.push('Trim');\n\t}\n\tupdateExtractor(attrName, add) {\n\t\tlet index = this.types.indexOf(attrName);\n\t\tif (add) {\n\t\t\tif (index === -1) {\n\t\t\t\tlet i = this.types.indexOf('text');\n\t\t\t\tif (i !== -1) {\n\t\t\t\t\tthis.types.splice(i, 1);\n\t\t\t\t}\n\t\t\t\tthis.types.push(attrName);\n\t\t\t}\n\t\t} else {\n\t\t\tif (index !== -1) {\n\t\t\t\tlet i = this.types.indexOf('regex');\n\t\t\t\tif (i !== -1) {\n\t\t\t\t\tthis.types.splice(i, 1);\n\t\t\t\t}\n\t\t\t\tthis.types.push('text');\n\t\t\t}\n\t\t}\n\t}\n\t/* isRegex(): boolean {\n\t\treturn (this.mask & ATTRS.REGEX) > 0;\n\t} */\n\n\tisActive(attrName: string): boolean {\n\t\treturn this.types.indexOf(attrName) !== -1;\n\t}\n}\n\nexport class Extractor {\n\ttype = 'text';\n\tparams: any = {includeIfEmpty: false};\n\tfieldMapValue = 1;\n\tfilter: Array;\n}\n\nexport class Filter {\n\tconstructor(public name: string, public param: string) {}\n}\n\nexport class Field {\n\t/* name = '';\n\tselector = '';\n\tdetails: Collection = null;\n\tcount = 0; */\n\tattrs = Array();\n\ttype = Type.Text;\n\tfilters = Array(new Filter('trim', ''))\n\n\tconstructor(public name: string, public selector: string, public details: Collection, public count?: number) {\n\t\t this.type = Type.Dump;\n\t}\n\n\tpublic toggleType() {\n\t\tthis.type = (this.type < 2) ? this.type + 1 : 0;\n\t\tthis.updateExtractorType();\n\t}\n\n\tpublic filterIndex(filterName: string): number {\n\t\tfilterName = filterName.toLowerCase()\n\t\tfor (let idx = 0; idx < this.filters.length; idx ++) {\n\t\t\tif (this.filters[idx].name === filterName) {\n\t\t\t\treturn idx;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}\n\n\tpublic updateAttrs(attrName: string, addAttr: boolean) {\n\t\tif (!addAttr && this.attrs.length === 1) {\n\t\t\tthrow new Error('Field should has at least one attribute to extract. Choose the one.');\n\t\t}\n\t\tattrName = attrName.toLowerCase();\n\t\tlet attrIndex = this.attrs.indexOf(attrName);\n\t\tif (addAttr) {\n\t\t\tif (attrIndex === -1) {\n\t\t\t\tif (attrName === 'path' || attrName !== 'path' && this.isActive('path')) {\n\t\t\t\t\tthis.attrs = [];\n\t\t\t\t}\n\t\t\t\tthis.attrs.push(attrName);\n\t\t\t}\n\t\t} else {\n\t\t\tif (attrIndex !== -1) {\n\t\t\t\tthis.attrs.splice(attrIndex, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic isActive(attrName: string): boolean {\n\t\treturn this.attrs.indexOf(attrName) !== -1;\n\t}\n\n\tprivate updateExtractorType() {\n\t\t/* switch (this.type) {\n\t\t\tcase Type.Image: {\n\t\t\t\tthis.extractor = new ImageExtractor()\n\t\t\t} break;\n\t\t\tcase Type.Link: {\n\t\t\t\tthis.extractor = new LinkExtractor();\n\t\t\t} break;\n\t\t\tcase Type.Text: {\n\t\t\t\tthis.extractor = new TextExtractor();\n\t\t\t}\n\t\t} */\n\t}\n}\n","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = 147;","import { Component, OnInit, ViewChild, isDevMode } from '@angular/core'\nimport { ViewService, SelectorService, HttpService } from '../shared'\nimport { Subscription } from 'rxjs'\nimport { Title } from '@angular/platform-browser';\nimport { slideUp, slideRight } from '../shared/animations';\n\n\ndeclare var jQuery: any;\n\n@Component({\n\tselector: 'selector-component',\n\ttemplate: require('./selector-gadget.component.html'),\n\tstyles: [require('./selector-gadget.component.scss'), require('../app.component.scss')],\n\tproviders: [SelectorService, ViewService, HttpService],\n\tanimations: [ slideUp, slideRight ]\n})\n\nexport class SelectorGadgetComponent implements OnInit {\n\tprivate selectors_count = 0;\n\tprivate export_result: any = '';\n\tprivate collection_name = 'Collection1';\n\tprivate busy: Subscription;\n\tprivate show_preview = false;\n\tprivate selecting = false;\n\tprivate activeTab = 'web';\n\n\t@ViewChild('previewcomponent') preview;\n\t@ViewChild('htmlcontainer') webview;\n\t@ViewChild('selectorlist') selectorview;\n\n\tconstructor(private _selectorService: SelectorService, private _httpService: HttpService,\n\t\tprivate _viewService: ViewService, private title: Title) {\n\t\t/*this._router.events.subscribe(event =>{\n\t\t\tif(event instanceof NavigationEnd &&\n\t\t\t\tevent.url==='/selector'&& event.urlAfterRedirects==='/selector'){\n\t\t\t\tthis.selectors_count = this._selectorService.getSelectors().length;\n\t\t\t\tconsole.log(event);\n\t\t\t}\n\t\t});\n\n\t\tthis._selectorService.setCollectionUrl(this._actRoute.snapshot.params['url']);*/\n\t}\n\n\tngOnInit() {\n\t\tif (isDevMode()) {\n\t\t\tjQuery('#getstarted').load('./app-getting-started.html');\n\t\t} else {\n\t\t\tjQuery('#getstarted').load('./app-getting-started');\n\t\t}\n\t\t// window.history.pushState(null, document.title, \"\");\n\t\tthis.title.setTitle('Scrape web sites. Save to JSON, CSV /Dataflow kit');\n\t}\n\n\tupdateView() {\n\t\tthis.show_preview = true;\n\t\tsetTimeout(function() {\n\t\t\tjQuery('#web>a').trigger('click');\n\t\t}, 1);\n\t}\n\n\tonCollectionChanged(collection: any) {\n\t\tlet active_tabs = jQuery('li.active');\n\t\tif (jQuery(active_tabs[0]).attr('id') === 'web') {\n\t\t\tif (this._httpService.current_url !== collection.url || collection.post_params.length > 0 ||\n\t\t\t\t(collection.url === '' && collection.action)) {\n\t\t\t\tthis.webview.enable_panel = false;\n\t\t\t\t// this._httpService.current_url = collection.url;\n\t\t\t\tthis.webview.onNavigate({url: collection.url, post_params: collection.post_params, action: collection.action});\n\t\t\t}\n\t\t} else {\n\t\t\tif (this._httpService.current_url !== 'http://' && (!this.selectorview.details_mode ||\n\t\t\t\tthis.selectorview.current_collection.fields.length > 0 )) {\n\t\t\t\tthis.preview.update(this.selectorview.current_collection);\n\t\t\t} else {\n\t\t\t\tthis.updateView();\n\t\t\t\tthis._viewService.activateWebTab();\n\t\t\t}\n\t\t\tthis.webview.enable_panel = false;\n\t\t\tthis.webview.onNavigate({url: collection.url, post_params: collection.post_params});\n\t\t}\n\t}\n\n\tonWebTabActivated() {\n\t\tif (this.selectorview.current_collection.request.url !== this._httpService.current_url) {\n\t\t\tthis.webview.onNavigate({url: this.selectorview.current_collection.request.url});\n\t\t}\n\t\tthis.activeTab = 'web';\n\t}\n\n\tonPreviewTabActivated() {\n\t\tthis.activeTab = 'preview';\n\t\tthis.preview.update(this.selectorview.current_collection);\n\t}\n\n\tonFormatChanged() {\n\t\tif (this.activeTab === 'preview') {\n\t\t\tthis.preview.update(this.selectorview.current_collection);\n\t\t}\n\t}\n}\n","import { Injectable } from '@angular/core'\nimport { Response } from '@angular/http'\nimport { Subject } from 'rxjs/Subject';\nimport { Observable } from 'rxjs/Observable'\nimport { AlertMessage } from '../model/alert-message'\nimport { HttpErrorResponse } from '@angular/common/http';\n\n\ndeclare var $: any;\n\n@Injectable()\nexport class ViewService {\n\n enableUI = false;\n isSelecting = false;\n\n private alert_message = new Subject()\n private resultInfo = new Subject()\n\n activateWebTab(delay = 0) {\n setTimeout(function() {\n $('#web>a').trigger('click');\n }, delay);\n }\n\n setHelp(str: string) {\n $('#help_article').html(str);\n }\n\n errorAlert(message: any | Response | HttpErrorResponse) {\n let alert: AlertMessage = new AlertMessage();\n if (message instanceof Response) {\n const body = message.json() || '';\n alert.header = message.statusText + ' ' + message.status;\n alert.text = body.error;\n } else if (message instanceof HttpErrorResponse) {\n alert.header = message.statusText;\n if (typeof message.error === 'string') {\n alert.text = message.error;\n }\n } else {\n alert.header = 'Error!';\n alert.text = message;\n }\n this.alert_message.next(alert);\n if (!this.enableUI) {\n this.enableUI = true;\n }\n }\n\n getMessage(): Observable {\n return this.alert_message.asObservable();\n }\n\n resultAlert(info: Object) {\n this.resultInfo.next(info);\n }\n\n getResult(): Observable {\n return this.resultInfo.asObservable();\n }\n}\n","module.exports = \"ul {\\n list-style: none; }\\n\\nli {\\n cursor: pointer;\\n transition: padding 0.3s;\\n margin-bottom: 2px; }\\n\\n/*li:hover{\\n border-left: 3px solid olive;\\n margin-left: -3px;\\n}*/\\n:host.selected ::ng-deep input,\\n:host.selected ::ng-deep i {\\n color: #d74b4b; }\\n\\n.btn-tool {\\n background-color: inherit;\\n font-size: 14pt;\\n color: #435f76;\\n position: relative;\\n float: right;\\n top: -4px !important;\\n padding: 0px;\\n right: 3px; }\\n\\n.btn-tool:hover {\\n color: #d74b4b; }\\n\\nh4 {\\n cursor: pointer; }\\n\\nh4#collection-name i {\\n font-size: 0.6em; }\\n\\ndiv.addselector-box {\\n /* border: 1px dashed black;*/\\n text-align: center;\\n margin-bottom: 15px; }\\n\\ndiv.addselector-box a {\\n cursor: pointer; }\\n\\ndiv.addselector-box button {\\n margin: 0px 5px; }\\n\\n.selector-list {\\n margin-bottom: 10px; }\\n\\n.no-padding {\\n padding-left: 0px;\\n padding-right: 0px; }\\n\\n#collection-name {\\n white-space: nowrap; }\\n\\n#collection-menu {\\n margin-left: 35px;\\n margin-top: -15px; }\\n\\n.toolbar-box {\\n padding-left: 0px;\\n padding-right: 0px;\\n position: relative;\\n top: 7px; }\\n\\n.toolbar-box * {\\n position: relative;\\n top: 4px;\\n float: right;\\n padding-left: 2px !important;\\n padding-right: 2px !important; }\\n\\n.collection-bar {\\n border-bottom: 1px solid lightgray;\\n margin-bottom: 10px; }\\n\\n.collection-bar h4 {\\n margin-bottom: 5px; }\\n\\n.collection-bar button {\\n background-color: inherit;\\n color: #435f76;\\n font-size: large;\\n position: relative;\\n top: -5px; }\\n\\n.collection-bar button:hover {\\n color: #d74b4b; }\\n\\n.hide {\\n display: none; }\\n\\n.badge-count {\\n float: left;\\n min-width: 35px; }\\n\\n.item-box {\\n padding-left: 5px !important;\\n padding-right: 5px !important;\\n text-align: center;\\n position: relative;\\n top: -2px; }\\n\\n.item-box h6 {\\n /* margin-bottom: 0px !important;*/ }\\n\\n.item-box input {\\n width: 100%; }\\n\\n.icon {\\n margin-right: 11px; }\\n\\n#paginatorDrop {\\n color: white;\\n text-decoration: none; }\\n\\n.current-collection {\\n border-bottom: 1px solid lightgray;\\n padding: 0px 7px;\\n font-weight: bold;\\n white-space: nowrap; }\\n\\n.addselector-box button:disabled {\\n pointer-events: none; }\\n\\n.paginator-types li {\\n color: #435f76; }\\n\\n.paginator-types li:hover {\\n color: #d74b4b; }\\n\\n/* .paginator {\\n border-top: 1px solid lightgray;\\n padding-top: 10px;\\n} */\\n.paginator h6,\\n.paginator span,\\n.paginator input {\\n cursor: pointer;\\n float: left; }\\n\\n.paginator h6 {\\n padding-left: 5px; }\\n\\n.selected {\\n color: #d74b4b; }\\n\\n.paginator-ico {\\n float: left;\\n position: relative;\\n top: 3px;\\n color: #3a5266;\\n cursor: pointer; }\\n\\n.paginatorMaxPage {\\n min-width: 55px;\\n position: relative;\\n left: -25px; }\\n\\n.format-label {\\n padding-left: 0px;\\n margin-right: 4%;\\n position: relative;\\n top: -9px; }\\n\\n.margin-bottom25 {\\n margin-bottom: 25px; }\\n\\n/* #paginatorMaxPage.unlimited {\\n background: transparent;\\n color: transparent;\\n }\\n\\n#paginatorMaxPage.unlimited::before {\\n content: \\\"unlimited\\\";\\n color: #3a5266;\\n } */\\n\"","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\nimport { AppModule } from './app/app.module';\n\n// depending on the env mode, enable prod mode or add debugging modules\nif (process.env.ENV === 'build') {\n enableProdMode();\n}\n\nexport function main() {\n return platformBrowserDynamic().bootstrapModule(AppModule).then(function(MODULE_REF) { if (module[\"hot\"]) { module[\"hot\"][\"accept\"](); if (MODULE_REF.instance[\"hmrOnInit\"]) { module[\"hot\"][\"data\"] && MODULE_REF.instance[\"hmrOnInit\"](module[\"hot\"][\"data\"]); } if (MODULE_REF.instance[\"hmrOnStatus\"]) { module[\"hot\"][\"apply\"](function(status) { MODULE_REF.instance[\"hmrOnStatus\"](status); }); } if (MODULE_REF.instance[\"hmrOnCheck\"]) { module[\"hot\"][\"check\"](function(err, outdatedModules) { MODULE_REF.instance[\"hmrOnCheck\"](err, outdatedModules); }); } if (MODULE_REF.instance[\"hmrOnDecline\"]) { module[\"hot\"][\"decline\"](function(dependencies) { MODULE_REF.instance[\"hmrOnDecline\"](dependencies); }); } module[\"hot\"][\"dispose\"](function(store) { MODULE_REF.instance[\"hmrOnDestroy\"] && MODULE_REF.instance[\"hmrOnDestroy\"](store); MODULE_REF.destroy(); MODULE_REF.instance[\"hmrAfterDestroy\"] && MODULE_REF.instance[\"hmrAfterDestroy\"](store); }); } return MODULE_REF; });\n}\n\nif (document.readyState === 'complete') {\n main();\n} else {\n document.addEventListener('DOMContentLoaded', main);\n}\n","import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms'\nimport { AppRoutingModule } from './app.routes'\n\nimport { AppComponent } from './app.component';\nimport { HeaderComponent } from './header/header.component'\nimport { SelectorGadgetComponent} from './selector/selector-gadget.component'\nimport { FooterComponent } from './footer/footer.component'\nimport { HtmlContainerComponent } from './http_container/html-container.component'\nimport { HomeComponent } from './home/home.component'\n\nimport { NavigatorComponent } from './navigator/navigator.component'\nimport { StateDirective } from './navigator/state.directive'\nimport { SelectorListComponent} from './selector/list/list.component'\nimport { HttpClientModule } from '@angular/common/http';\nimport { PrettyJsonModule } from 'angular2-prettyjson';\nimport { JsonPipe } from '@angular/common';\nimport { PreviewComponent } from './preview/preview.component'\nimport { JSONXMLPreviewComponent } from './preview/JSONXMLPreview/JSONXMLPreview.component'\nimport { CSVPreviewComponent } from './preview/CSVPreview/CSVPreview.component'\nimport { ProjectComponent } from './selector/project/project.component'\nimport { SelectorListItemComponent } from './selector/list/selectorlistitem/selector-list-item.component'\nimport { InplaceEditComponent} from './components/inplace-edit/inplace-edit.component'\nimport { AlertComponent } from './alert/alert.component'\nimport { ResultInfoComponent } from './selector/result_info/result-info.component'\nimport { BusyIndicatorComponent } from './components/busy-indicator/busy-indicator.component'\n\n@NgModule({\n imports: [ BrowserModule, FormsModule, AppRoutingModule, HttpClientModule,\n ReactiveFormsModule, PrettyJsonModule, BrowserAnimationsModule],\n declarations: [ AppComponent, HtmlContainerComponent,\n \t\t\t\t\tSelectorGadgetComponent, NavigatorComponent,\n \t\t\t\t\tSelectorListComponent,\n PreviewComponent, JSONXMLPreviewComponent, CSVPreviewComponent,\n HeaderComponent, FooterComponent, ProjectComponent,\n SelectorListItemComponent, StateDirective, InplaceEditComponent, HomeComponent,\n AlertComponent, ResultInfoComponent, BusyIndicatorComponent],\n providers: [\n /* { provide: JsonPipe, useClass: SafeJsonPipe } */\n ],\n bootstrap: [ AppComponent]\n})\nexport class AppModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router'\nimport { SelectorGadgetComponent } from './selector/selector-gadget.component'\nimport { HomeComponent } from './home/home.component'\n\n// Route Configuration\nconst routes: Routes = [\n\t{ path: '', redirectTo: '/dfk', pathMatch: 'full' },\n\t{ path: 'dfk', component: SelectorGadgetComponent}\n];\n\n@NgModule({\n\timports: [\n\t\tRouterModule.forRoot(routes)\n\t],\n\texports: [\n\t\tRouterModule\n\t],\n\tdeclarations: []\n})\n\nexport class AppRoutingModule { }\n","import { Injectable } from '@angular/core'\nimport { Config } from '../model/config'\n\n\nconst storeKey = 'dfkConfig';\n\n@Injectable()\nexport class ConfigService {\n private cfg: Config;\n constructor() {\n this.init();\n }\n init() {\n let config = localStorage.getItem(storeKey)\n if (config !== null) {\n this.cfg = JSON.parse(config);\n } else {\n this.cfg = new Config();\n this.save();\n }\n }\n\n save() {\n localStorage.setItem(storeKey, JSON.stringify(this.cfg));\n }\n\n get renderJS(): boolean {\n return this.cfg.renderJSContent;\n }\n\n set renderJS(value: boolean) {\n this.cfg.renderJSContent = value;\n }\n\n get userToken() {\n return this.cfg.userToken;\n }\n}\n","import { UUID } from 'angular2-uuid'\n\nexport class Config {\n userToken: string;\n renderJSContent: boolean;\n constructor() {\n this.renderJSContent = false;\n this.userToken = UUID.UUID();\n }\n}\n","export class AlertMessage {\n header: string;\n text: string;\n}\n","import { Injectable } from '@angular/core'\nimport { Project } from '../model/project'\nimport { Collection, Paginator } from '../model/collection'\nimport { Field, Filter } from '../model/selector'\nimport { ConfigService } from '.';\nimport { Array } from 'core-js';\n\n@Injectable()\nexport class SelectorService {\n\n\tprivate _selectors: Field[] = [];\n\n\tprivate mainProject: Project = new Project();\n\n\tinfo = 'Enter web site address on the top to load a webpage you want to extract data from.';\n\n\tconstructor(private configService: ConfigService) {\n\t}\n\n\tcreateNewProject() {\n\t\tif (this.mainProject) {\n\t\t\tthis.mainProject = null;\n\t\t}\n\t\tthis.mainProject = new Project();\n\t}\n\n\taddSelector(sel: Field) {\n\t\tthis._selectors.push(sel);\n\t\treturn this._selectors.length - 1;\n\t}\n\n\taddNewCollection(collection_name: string, url: string) {\n\t\tlet coll: Collection = new Collection(collection_name,\n\t\t\t{ 'url': url, 'userToken': this.configService.userToken, 'type': '', actions: [], proxy: '' },\n\t\t\t[]);\n\t\tthis.mainProject.collections.push(coll);\n\t\treturn coll;\n\t}\n\n\taddCollection(collection: Collection) {\n\t\tthis.mainProject.collections.push(collection);\n\t}\n\n\tdeleteCollection(collectionName: string) {\n\t\tlet collection_index = -1;\n\t\tfor (let index = 0; index < this.mainProject.collections.length; index++) {\n\t\t\tif (collectionName === this.mainProject.collections[index].name) {\n\t\t\t\tcollection_index = index;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\tif (collection_index >= -1) {\n\t\t\tthis.mainProject.collections.splice(collection_index, 1);\n\t\t}\n\t}\n\n\tgetProject() {\n\t\treturn this.mainProject;\n\t}\n\n\tgetCollections() {\n\t\treturn this.mainProject.collections;\n\t}\n\n\tgetCollectionByName(name: string) {\n\t\tfor (let collection of this.mainProject.collections) {\n\t\t\tif (collection.name === name) {\n\t\t\t\treturn collection;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetCollectionByUrl(url: string) {\n\t\tfor (let collection of this.mainProject.collections) {\n\t\t\tif (collection.request.url === url) {\n\t\t\t\treturn collection;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tinitCollection(collection: Collection, url: string, proxy: string) {\n\t\tcollection.request.url = url;\n\t\tif (proxy.length > 0) {\n\t\t\tcollection.request.proxy = proxy;\n\t\t}\n\t\tlet name = collection.updateName();\n\t\tlet name_pattern = new RegExp(name, 'g');\n\t\tlet count = 0;\n\t\tfor (let coll of this.mainProject.collections) {\n\t\t\tif (coll.name.search(name_pattern) !== -1) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif (count > 0) {\n\t\t\tname += count;\n\t\t}\n\t\tcollection.name = name;\n\t\tcollection.format = 'csv';\n\t}\n\n\tupdateSelector(id: number, sel: Field) {\n\t\tthis._selectors[id] = sel;\n\t}\n\n\tdeleteSelector(id: number) {\n\t\tthis._selectors.splice(id, 1);\n\t}\n\n\tgetSelectors(): Field[] {\n\t\treturn this._selectors;\n\t}\n\n\tgetFrameWindowRef() {\n\t\treturn (document.getElementById('frame_container')).contentWindow;\n\t}\n\n\tenableSelectorGadget() {\n\t\tthis.getFrameWindowRef().SelectorGadgetWrapper.enableSelectorGadget();\n\t}\n\n\tdisableSelectorGadget() {\n\t\tthis.getFrameWindowRef().SelectorGadgetWrapper.disableSelectorGadget();\n\t}\n\n\tgetElemAttr(css: string, attr: string): string {\n\t\treturn this.getFrameWindowRef().SelectorGadgetWrapper.getElementAttr(css, attr);\n\t}\n\n\tresetAll() {\n\t\tthis.getFrameWindowRef().SelectorGadgetWrapper.resetAll();\n\t}\n\n\tinitSelectorGadget() {\n\t\tthis.getFrameWindowRef().SelectorGadgetWrapper.init();\n\t}\n\n\tcollectionStringify(export_format: string, collection_name: string) {\n\t\tthis.mainProject.format = export_format;\n\t\treturn JSON.stringify(this.mainProject);\n\t}\n\n\tgetSelectedCount() {\n\t\treturn this.getFrameWindowRef().SelectorGadgetWrapper.getCurrentSelectedCount();\n\t}\n\n\tsetSelectorPath(selector: Field | Paginator) {\n\t\tlet regex = '';\n\t\tlet filters = [];\n\t\tlet path = selector.selector;\n\t\tif (selector instanceof Field) {\n\t\t\tlet regexIndex = selector.filterIndex('regex');\n\t\t\tif (regexIndex !== -1) {\n\t\t\t\tregex = selector.filters[regexIndex].param;\n\t\t\t}\n\t\t\tfilters = selector.filters;\n\t\t}\n\t\ttry {\n\t\t\tthis.getFrameWindowRef().SelectorGadgetWrapper.setPathEx(path, filters, regex);\n\t\t} catch (e) {\n\t\t\tconsole.log('Failed to set path: ' + e.message);\n\t\t}\n\t\treturn this.getFrameWindowRef().SelectorGadgetWrapper.getCurrentSelectedCount();\n\t}\n\n\tresetSelection() {\n\t\tthis.getFrameWindowRef().SelectorGadgetWrapper.resetAll();\n\t}\n\n\tsuspendGadget() {\n\t\tthis.getFrameWindowRef().SelectorGadgetWrapper.suspendSelectorGadget();\n\t}\n\n\tresumeGadget() {\n\t\tthis.getFrameWindowRef().SelectorGadgetWrapper.resumeSelectorGadget();\n\t}\n\n\tgetCount(selector: string) {\n\t\treturn this.getFrameWindowRef().SelectorGadgetWrapper.getCount(selector);\n\t}\n\n\tabsolute(base, relative): string {\n\t\tlet stack = base.split('/'),\n\t\t\tparts = relative.split('/');\n\t\tstack.pop(); // remove current file name (or empty string)\n\t\t// (omit if \"base\" is the current folder without trailing slash)\n\t\tfor (let i = 0; i < parts.length; i++) {\n\t\t\tif (parts[i] === '.') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (parts[i] === '..') {\n\t\t\t\tstack.pop();\n\t\t\t} else {\n\t\t\t\tstack.push(parts[i]);\n\t\t\t}\n\t\t}\n\t\treturn stack.join('/');\n\t}\n}\n","import { Collection } from './collection'\n\nexport class Project {\n format = '';\n collections: Collection[] = [];\n}\n","import { Injectable } from '@angular/core'\nimport { Http, Response, Headers } from '@angular/http';\nimport { Observable } from 'rxjs/Observable';\nimport { isDevMode } from '@angular/core'\nimport 'rxjs/add/observable/throw';\n\n// Operators\nimport 'rxjs/add/operator/catch';\nimport 'rxjs/add/operator/map';\n\nimport luaScript from '../model/mock-data'\nimport { ConfigService } from '.';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\n\ndeclare var DFK: any;\n\n@Injectable()\nexport class HttpService {\n\n\tcontent: string;\n\tcurrent_url = 'http://';\n\tproxy = '';\n\tfetch_url: string;\n\tparse_url: string;\n\tbaseUrl: string;\n\tcreateTaskURL: string;\n\tcancelRequest: string;\n\tbillingCreditsRequest: string;\n\n\tconstructor(private _http: HttpClient, private configService: ConfigService) {\n\t\tif (isDevMode()) {\n\t\t\tthis.fetch_url = 'http://localhost:8082/fetch';\n\t\t\tthis.parse_url = 'http://localhost:8082/parse';\n\t\t\tthis.cancelRequest = 'http://localhost:8082/cancel/';\n\t\t\tthis.createTaskURL = 'http://localhost:8082/v1/task/create?api_key=';\n\t\t\tthis.billingCreditsRequest = 'http://localhost:8082/v1/credits?api_key=';\n\t\t} else {\n\t\t\tthis.createTaskURL = 'https://api.dataflowkit.com/v1/task/create?api_key=';\n\t\t\tthis.fetch_url = 'https://api.dataflowkit.com/fetch';\n\t\t\tthis.parse_url = 'https://api.dataflowkit.com/parse';\n\t\t\tthis.cancelRequest = 'https://api.dataflowkit.com/cancel/';\n\t\t\tthis.billingCreditsRequest = 'https://api.dataflowkit.com/v1/credits?api_key=';\n\t\t\t/* this.fetch_url = 'http://134.209.92.232:8000/fetch';\n\t\t\tthis.parse_url = 'http://134.209.92.232:8001/parse';\n\t\t\tthis.cancelRequest = 'http://134.209.92.232:8082/process/'; */\n\t\t}\n\t}\n\n\tload(url: string, post_params = '', action = null) {\n\t\t// return this.http.get('app/import.html').map(res=>res.text());\n\t\tlet actions = new Array();\n\t\t// actions.push({'paginate': {'maxpage': 10, 'element': ''}})\n\t\tif (action !== null) {\n\t\t\tactions.push(action)\n\t\t}\n\t\tactions.push({ 'initsg': {} });\n\t\tif (url === '') {\n\t\t\turl = this.current_url;\n\t\t}\n\t\tlet json = JSON.stringify({\n\t\t\t'url': url,\n\t\t\t'formData': post_params,\n\t\t\t'userToken': this.configService.userToken,\n\t\t\t'type': 'chrome',\n\t\t\t'initSelectorGadget': true,\n\t\t\t'proxy': (this.proxy !== undefined && this.proxy.length > 0) ? this.proxy : '',\n\t\t\t'waitDelay': 1.5,\n\t\t\t'actions': actions\n\t\t});\n\t\tlet headers = new HttpHeaders();\n\t\tif (post_params !== '') {\n\t\t\theaders.set('Content-Type', 'multipart/form-data');\n\t\t} else {\n\t\t\theaders.set('Content-Type', 'application/json');\n\t\t}\n\t\t// this.current_url = url;\n\n\t\treturn this._http.post(this.fetch_url, json,\n\t\t\t{\n\t\t\t\tobserve: 'response',\n\t\t\t\theaders: headers,\n\t\t\t\tresponseType: 'text'\n\t\t\t})/* .map(res => res.json()) */;\n\t}\n\n\tget(url: string): Observable {\n\t\treturn this._http.get(url)\n\t\t\t.map(this.extractData)\n\t\t\t.catch(this.handleError);\n\t}\n\n\tpostCollection(collection: string) {\n\t\tlet params = collection;\n\t\tlet headers = new HttpHeaders();\n\t\theaders.append('Content-Type', 'application/json');\n\t\treturn this._http.post(this.parse_url, params,\n\t\t\t{\n\t\t\t\t'headers': headers\n\t\t\t})/* .map(res => res.text()) */;\n\t}\n\n\tsendCancelRequest(processID: string) {\n\t\treturn this._http.get(this.cancelRequest + processID);\n\t}\n\n\tprivate extractData(res: Response) {\n\t\tlet body = res.text();\n\t\tif (body !== '') {\n\t\t\tconsole.log('Response is not empty!');\n\t\t}\n\t\treturn body;\n\t}\n\n\tcreateTask(task: string) {\n\t\tlet hdrs = new HttpHeaders().set('Content-Type', 'application/json');\n\t\treturn this._http.post(this.createTaskURL + DFK.User.APIKey, task, { headers: hdrs });\n\t}\n\n\tgetUserCredits(APIKey: string) {\n\t\treturn this._http.get(this.billingCreditsRequest + APIKey);\n\t}\n\n\tprivate handleError(error: Response | any) {\n\t\tlet errMsg: string;\n\t\tif (error instanceof Response) {\n\t\t\tconst body = error.json() || '';\n\t\t\tconst err = body.error || JSON.stringify(body);\n\t\t\terrMsg = `${error.status} - ${error.statusText || ''} ${err}`;\n\t\t} else {\n\t\t\terrMsg = error.message ? error.message : error.toString();\n\t\t}\n\t\tconsole.error(errMsg);\n\t\treturn Observable.throw(errMsg);\n\t}\n}\n","import { Injectable, OnDestroy, isDevMode } from '@angular/core'\nimport { Observable } from 'rxjs/Observable';\nimport { Observer } from 'rxjs/Observer';\nimport { BehaviorSubject } from 'rxjs/BehaviorSubject';\n\ntype subjectCallback = (data: string) => void;\n\n@Injectable()\nexport class NatsService implements OnDestroy {\n private nats: any;\n private natsServerAddr: string;\n private taskID: string;\n private natsService: any;\n progressMessage$: BehaviorSubject = new BehaviorSubject('Parsing...');\n resultLink$: BehaviorSubject = new BehaviorSubject('');\n constructor() {\n this.nats = require('websocket-nats');\n if (isDevMode()) {\n this.natsServerAddr = 'ws://localhost:4223';\n } else {\n this.natsServerAddr = 'wss://ws.dataflowkit.com';\n }\n }\n\n publish(subject: string, data: string) {\n this.nats.publish(subject, data);\n }\n\n subscribe(subject: string, callback: subjectCallback) {\n this.nats.subscribe(subject, callback);\n }\n\n request(subject: string, data: string, callback: subjectCallback) {\n this.nats.request(subject, data, {'max': 1}, callback);\n }\n\n parse(payload: string): Observable {\n return Observable.create(observer => {\n this.natsService = this.nats.connect(this.natsServerAddr);\n this.natsService.on('connect', () => {\n this.natsService.request('parse', payload, null, (id) => {\n this.taskID = id;\n let response_sid = this.natsService.subscribe('task_' + this.taskID, (parse_res) => {\n observer.next(parse_res);\n });\n\n let error_sid = this.natsService.subscribe('task_' + this.taskID + '_error', (err) => {\n this.natsService.unsubscribe(response_sid);\n this.natsService.unsubscribe(error_sid);\n this.natsService.unsubscribe(complete_sid);\n this.natsService.unsubscribe(info_sid);\n this.natsService.close();\n observer.error(err);\n });\n\n let complete_sid = this.natsService.subscribe('task_' + this.taskID + '_finished', (parseResult) => {\n console.log('Recieved complete message');\n this.natsService.unsubscribe(response_sid);\n this.natsService.unsubscribe(error_sid);\n this.natsService.unsubscribe(complete_sid);\n this.natsService.unsubscribe(info_sid);\n this.natsService.close();\n this.resultLink$.next(parseResult);\n observer.complete();\n });\n\n let info_sid = this.natsService.subscribe('task_' + this.taskID + '_info', (info) => {\n this.SetProgressMessage(info);\n });\n\n this.natsService.publish(id, 'I got it');\n this.SetProgressMessage('Processing...');\n });\n });\n this.natsService.on('error', (err) => {\n observer.error('NATS server connection failed.');\n });\n });\n }\n\n SetProgressMessage(message: string) {\n this.progressMessage$.next(message);\n }\n\n cancel() {\n this.natsService.publish('cancel_' + this.taskID, 'Cancel');\n this.SetProgressMessage('Canceling...');\n }\n\n ngOnDestroy() {\n /* this.nats.close(); */\n }\n}\n","module.exports = \"
\\n
\\n
\\n \\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n
\\n
\\n
\\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\"","module.exports = \"span.selector-counter {\\n cursor: pointer; }\\n\\n#add_selector {\\n width: 32px !important;\\n height: 32px !important;\\n background-color: #29e;\\n color: white;\\n border-radius: 50%;\\n padding: 4%;\\n font-size: 24pt; }\\n\\nli#help {\\n float: right; }\\n\\n.info-block {\\n border: solid 1px #5bc0de;\\n border-radius: 5px;\\n background-color: #5bc0de;\\n color: #ffffff;\\n padding: 1em;\\n margin-top: 10px;\\n margin-bottom: 10px; }\\n\\n.main {\\n position: relative;\\n margin-top: 10px;\\n padding-left: 20px;\\n padding-right: 20px; }\\n\\n#error-alert {\\n display: none;\\n margin-top: 15px; }\\n\\n.selector-block {\\n /* margin-top: 62px; */ }\\n\\n.webdata-block {\\n border-left: .5px lightgray solid; }\\n\\n#getstarted {\\n margin-top: 30px; }\\n\\n.disabled li {\\n opacity: 0.4;\\n pointer-events: none; }\\n\\n.create-task-box {\\n position: absolute;\\n bottom: 0;\\n border: 1px lightgray solid;\\n text-align: center; }\\n\\n/* .create-task-box {\\n border-top: 1px solid lightgray;\\n padding-top: 20px;\\n text-align: center;\\n} */\\n\"","import { Component} from '@angular/core';\nimport { ConfigService } from './shared'\n\n@Component({\n selector: 'dataflowkit',\n template: require('./app.component.html'),\n styles: [require('./app.component.scss')],\n providers: [ConfigService]\n})\n\nexport class AppComponent {\n constructor(private configService: ConfigService) {}\n }\n","module.exports = \"
\\n \\n \\n \\n \\n \\n \\n \\n
\\n

Copyright © 2017 - 2020, Slotix s.r.o.

\\n
\\n
\"","import { Component, Output, EventEmitter, OnInit, isDevMode } from '@angular/core'\nimport { slideRight } from '../shared/animations';\nimport { AnyTxtRecord } from 'dns';\nimport { HttpService } from '../shared';\n\ndeclare var DFK: any;\n\n@Component({\n selector: 'dfk-header',\n template: require('./header.component.html'),\n styles: [require('./header.component.scss')],\n providers: [HttpService],\n animations: [slideRight],\n host: {\n '(window:focus)': 'windowOnFocus()'\n }\n})\n\nexport class HeaderComponent implements OnInit {\n\n private UserName = '';\n private UserAvatar = '';\n private SingOutLink = '';\n private SignInLink = '';\n private Balance = '';\n\n private pricingURL = '';\n private resourcesURL = '';\n private webScraperURL = '';\n private renderHTMLURL = '';\n private extractSERPDataURL = '';\n private urlToPdfURL = '';\n private captureScreenshotURL = '';\n private balance = '';\n\n @Output() goEvent = new EventEmitter();\n\n constructor(private httpService: HttpService) {\n if (isDevMode()) {\n\t\t\tthis.pricingURL = 'http://localhost:8081/pricing';\n this.resourcesURL = 'http://localhost:8081/help';\n this.webScraperURL = 'http://localhost:8081/web-scraper';\n this.renderHTMLURL = 'http://localhost:8081/render-web';\n this.extractSERPDataURL = 'http://localhost:8081/serp';\n this.urlToPdfURL = 'http://localhost:8081/url-to-pdf';\n this.captureScreenshotURL = 'http://localhost:8081/url-to-screenshot';\n this.SingOutLink = 'http://localhost:8005/signout';\n this.SignInLink = 'http://localhost:8005/signin';\n\t\t} else {\n this.pricingURL = 'https://dataflowkit.com/pricing';\n this.resourcesURL = 'https://dataflowkit.com/help';\n this.webScraperURL = 'https://dataflowkit.com/web-scraper';\n this.renderHTMLURL = 'https://dataflowkit.com/render-web';\n this.extractSERPDataURL = 'https://dataflowkit.com/serp';\n this.urlToPdfURL = 'https://dataflowkit.com/url-to-pdf';\n this.captureScreenshotURL = 'https://dataflowkit.com/url-to-screenshot';\n this.SingOutLink = 'https://account.dataflowkit.com/signout';\n this.SignInLink = 'https://account.dataflowkit.com/signin';\n\t\t}\n }\n\n riseGoEvent(event) {\n this.goEvent.emit(event);\n }\n\n ngOnInit() {\n if (DFK.User.exists()) {\n this.UserName = DFK.User.Name;\n this.UserAvatar = DFK.User.Avatar;\n // DFK.User.refreshCredits();\n this.httpService.getUserCredits(DFK.User.APIKey).subscribe(\n UserCredits => this.updateUserCredits(UserCredits),\n error => console.error(error)\n );\n } else {\n this.UserName = '';\n this.UserAvatar = '';\n }\n }\n\n windowOnFocus() {\n DFK.User.refreshUser();\n if (DFK.User.exists()) {\n this.UserName = DFK.User.Name;\n this.UserAvatar = DFK.User.Avatar;\n // DFK.User.refreshCredits();\n this.httpService.getUserCredits(DFK.User.APIKey).subscribe(\n UserCredits => this.updateUserCredits(UserCredits),\n error => console.error(error)\n );\n } else {\n this.UserName = '';\n this.UserAvatar = '';\n }\n }\n\n updateUserCredits(uc) {\n this.balance = uc.credits;\n }\n\n userExists(): boolean {\n return DFK.User.exists();\n }\n}\n","module.exports = \"
\\n
\\n
\\n
\\n \\\"dfk\\n
\\n \\n
\\n\\n \\n
\\n\\n
\"","module.exports = \".logo-box {\\n float: left; }\\n\\n.logo img {\\n height: 36px;\\n position: relative;\\n top: 8px; }\\n\\n.title {\\n font-size: 1.8em;\\n font-family: 'Oswald', 'Trebuchet MS', 'Open Sans', arial, sans-serif;\\n position: absolute; }\\n\\nheader.navbar {\\n background-color: #2b3d4c;\\n color: white; }\\n\\nspan.navbar-text {\\n font-size: 2em;\\n margin-top: -0.05em;\\n font-family: 'Oswald', 'Trebuchet MS', 'Open Sans', arial, sans-serif;\\n margin-left: 0px; }\\n\\n.navbar-nav > li > a {\\n text-transform: none;\\n font-family: 'Open Sans', arial, sans-serif; }\\n\\n.header-block {\\n margin-left: 6px;\\n margin-right: 26px; }\\n\\n.navbar-brand-img img {\\n height: 50px; }\\n\\n.navbar-nav a {\\n color: #fff; }\\n\\n.navbar-nav a:hover {\\n color: #4d4d4d; }\\n\\n.navbar-profile-avatar {\\n position: relative;\\n top: -1px;\\n width: 30px;\\n margin-right: .65em;\\n border: 2px solid #87a3bc;\\n border-top-right-radius: 3px;\\n border-top-left-radius: 3px;\\n border-bottom-right-radius: 3px;\\n border-bottom-left-radius: 3px; }\\n\\n.nav .open > a > span {\\n color: #4d4d4d; }\\n\\n@media (min-width: 768px) {\\n .dropdown-link {\\n color: #4d4d4d !important; }\\n .divider-vertical {\\n height: 50px;\\n /* any height */\\n border-left: 1px solid gray;\\n /* right or left is the same */\\n float: left;\\n /* so BS grid doesn't break */\\n opacity: 0.5;\\n /* optional */\\n margin: 0 15px;\\n /* optional */ } }\\n\\n.arrange {\\n top: -4px; }\\n\\n.nav-balance {\\n top: 5px; }\\n\\na.button {\\n -webkit-appearance: button;\\n -moz-appearance: button;\\n appearance: button;\\n text-decoration: none;\\n background-color: #42ac78;\\n color: white; }\\n\\na.button:hover {\\n -webkit-appearance: button;\\n -moz-appearance: button;\\n appearance: button;\\n text-decoration: none;\\n background-color: #369e6b;\\n color: white !important; }\\n\"","import { Component } from '@angular/core'\n\n@Component({\n selector: 'dfk-footer',\n template: require('./footer.component.html'),\n styles: [require('./footer.component.scss')]\n})\n\nexport class FooterComponent {\n public copyright = '@Copyright 2018';\n}\n","module.exports = \"
\\n
\\n {{copyright}}\\n
\\n
\"","module.exports = \"div.md-col-12 {\\n text-align: center; }\\n\"","import { Component, OnInit, OnDestroy } from '@angular/core'\nimport { ViewService, HttpService } from '../shared/'\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser'\nimport { Subscription } from 'rxjs'\nimport { HttpResponse } from '@angular/common/http'\n\ndeclare var jQuery: any;\n\n@Component({\n\tselector: 'html-container',\n\ttemplate: require('./html-container.component.html'),\n\tstyles: [require('./html-container.component.scss')]\n})\n\nexport class HtmlContainerComponent implements OnInit, OnDestroy {\n\n\tprivate SelectorGadget: any;\n\tprivate insertScript2Content = false;\n\tprivate busy: Subscription;\n\tprivate srcdoc: SafeHtml = '';\n\n\tconstructor(private _service: HttpService, private sanitizer: DomSanitizer,\n\t\tprivate _viewService: ViewService) {\n\t}\n\n\tonNavigate(nav) {\n\t\twindow.history.pushState({key: 'link', value: this._service.current_url}, document.title, '');\n\t\tthis.busy = this._service.load(nav.url, nav.post_params, nav.action).subscribe(response =>\n\t\t\t\t\t\t\t\t\t\tthis.setIFrameContent(response),\n\t\t\t\t\t\t\t\t\t\terror => this._viewService.errorAlert(error),\n\t\t\t\t\t\t\t\t\t\t() => console.log('Finished'));\n\t}\n\n\tgetFrameWindowRef()\t{\n\t\treturn (document.getElementById('frame_container')).contentWindow;\n\t}\n\n\tngOnInit() {\n\t}\n\n\tngOnDestroy() {\n\t}\n\n\tsetIFrameContent(resp: HttpResponse) {\n//////////////\n/////////////////////////////////////\n///////////////////////////////////////////////////////\n///////////////////////////////////////////\n//////////////////////////////////////////////////\n/////////////////////////////////\n///\n\n////////////////////////////////////////////\n/////////////////////////////////////////////\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n///////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////////////////////////////////////////////////\n//////////////////////////////////////////////\n////////////\n\n\t\tthis.srcdoc = this.sanitizer.bypassSecurityTrustHtml(resp.body);\n\t\tthis._service.current_url = resp.headers.get('Url');\n\t}\n\n\tonLoad() {\n//////////////\n//////////////////////////////////////\n//////////\n//////\n///////////////////////////////////////////////////\n//////////////////////////////////////////\n////////////////////////////////////////////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n//////\n////////////\n\t}\n\n\tenableSelector() {\n\t\tthis.SelectorGadget.enableSelector();\n\t}\n\n\tdisableSelector() {\n\t\tthis.SelectorGadget.disableSelector();\n\t}\n\n\taddScript(doc: HTMLDocument, script_str: string, inline: boolean) {\n\t\tlet script: HTMLScriptElement = doc.createElement('script');\n\t\tscript.type = 'text/javascript';\n\t\tif (!inline) {\n\t\t\tscript.src = script_str;\n\t\t} else {\n\t\t\tscript.text = script_str;\n\t\t}\n\n\t\tlet head = doc.getElementsByTagName('head')[0];\n\t\tif (head) {\n\t\t\thead.appendChild(script);\n\t\t} else {\n\t\t\tdoc.body.appendChild(script);\n\t\t}\n\t}\n\n\taddCSS(doc: HTMLDocument, css_link: string) {\n\t\tlet css = doc.createElement('link');\n\t\tcss.rel = 'stylesheet';\n\t\tcss.href = css_link;\n\t\tlet head = doc.getElementsByTagName('head')[0];\n\t\tif (head) {\n\t\t\thead.appendChild(css);\n\t\t} else {\n\t\t\tdoc.body.appendChild(css);\n\t\t}\n\t}\n\n\taddBase(url: string) {\n\t\tlet _url = new URL(url);\n\t\tlet baseUrl = _url.protocol + '//' + _url.host + '/';\n\t\tlet pathArray = _url.pathname.split('/');\n\t\tfor (let i = 1; i < pathArray.length - 1; i++) {\n\t\t\tbaseUrl += pathArray[i] + '/';\n\t\t}\n\t\tlet doc = this.getFrameWindowRef().document;\n\t\tlet base = doc.createElement('base');\n\t\tbase.href = baseUrl;\n\t\tlet head = doc.getElementsByTagName('head')[0];\n\t\tif (head) {\n\t\t\thead.appendChild(base);\n\t\t} else {\n\t\t\tdoc.body.appendChild(base);\n\t\t}\n\t}\n}\n\nlet xhrReplacement = ``;\n","module.exports = \"\\n\\n\"","module.exports = \"iframe {\\n width: 100%;\\n height: 78vh; }\\n\"","import { Component, OnInit } from '@angular/core'\nimport { Title } from '@angular/platform-browser';\nimport { slideUp } from '../shared/animations';\n\ndeclare var $: any;\n\n@Component({\n selector: 'home',\n template: require('./home.component.html'),\n styles: [require('./home.component.scss')],\n animations: [slideUp]\n})\n\nexport class HomeComponent implements OnInit {\n constructor(private title: Title) {}\n\n ngOnInit() {\n $('#lnkMail').hover(function () {\n let newHref = $(this).attr('href').replace('spam', 'sk');\n $(this).attr('href', newHref);\n });\n this.title.setTitle('Web scraping - golang opensource framework/Dataflow kit');\n }\n}\n\n\n","module.exports = \"
\\n
\\n
\\n
\\n\\n
\\n

Τα Πάντα ῥεῖ

\\n\\n

Dataflow Kit is Web scraping open source framework written in Go.

\\n

Turn websites data into spreadsheets, JSON or APIs with a simple point-and-click toolkit

\\n
\\n \\n Try Dataflow Kit\\n \\n
\\n
\\n\\n
\\n \\\"spider\\\"\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n

Advanced Data Extraction.

\\n
\\n
\\n

DFK platform provides easy and comfortable way to extract data from web pages.

\\n

Fetched data can be stored in structured form like spreadsheet or database. CSV, Microsoft Excel, JSON or\\n XML output data formats are currently supported.\\n

\\n

It can be used in many ways for data mining, data processing or archiving.

\\n\\n
    \\n
  • \\n Point, click and extract.
  • \\n
  • \\n Work on any interactive site
  • \\n
  • \\n Scrape a website behind a login form
  • \\n
  • \\n Extract data from multiple pages.
  • \\n
  • \\n Scrape infinite scrolled pages.
  • \\n
  • \\n Scrape details from linked pages.
  • \\n
  • \\n Follow the direction of robots.txt
  • \\n
  • \\n Save results as CSV, JSON, XML
  • \\n
  • \\n Convert resulted JSON to the most popular RDBMS or Clouds with  DBConvert JSON to SQL
  • \\n
\\n
\\n \\n

See Dataflow kit in action.

\\n

\\n \\n\\n

\\n \\n Try Dataflow Kit\\n \\n
\\n
\\n
\\n
\\n
\\n

Internals

\\n
\\n
\\n

Dataflow kit is composed of 2 daemons:

\\n
    \\n
  • \\n \\n fetch.d is the daemon that downloads html pages. It sends requests to\\n Splash server. Splash is a javascript rendering service. It is used to retrieve actual data before\\n sending it to parse.d daemon.\\n
  • \\n
  • \\n \\n parse.d is the daemon that extracts data from downloaded web page following the rules described\\n in configuration JSON file. Extracted data are returned in CSV, JSON or XML format.\\n
  • \\n
\\n
\\n
\\n
\\n\\n
\\n
\\n
\\n
\\n\\n

Open source

\\n\\n\\n

Dataflow kit is completely open source and we welcome all contributors who are interested in collaborating.\\n

\\n

Whether you want to help with issues, coding features, releasing the project, scripting, tests, benchmarking,\\n documentation, updating samples or share an information about Dataflow kit.

\\n

Please star DFK GitHub repository.

\\n
\\n \\n Dataflow kit on Github\\n \\n\\n
\\n\\n
\\n
\\n
\\n \\n
\\n\\n
\\n\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n

Connect With Us

\\n
\\n \\n
\\n
\\n
\\n

Keep In Touch

\\n
\\n
    \\n
  • \\n Špitálska 53\\n
    Bratislava, 811 01,\\n
    Slovakia\\n
  • \\n
  • \\n \\n ks.xitols@md\\n
  • \\n
\\n
\\n
\\n
\\n

Privacy & Terms

\\n
\\n \\n
\\n
\\n
\\n
\\n\"","module.exports = \".light {\\n color: #354b5e !important;\\n background-color: white !important; }\\n\\n.dark {\\n color: white !important;\\n background-color: #354b5e !important; }\\n\\nh3.dark {\\n text-align: center; }\\n\\n.text-block {\\n font-size: 1.4em; }\\n\\ndiv.footer {\\n padding-bottom: 10px; }\\n\\n#lnkMail {\\n unicode-bidi: bidi-override;\\n direction: rtl; }\\n\\n.margin-bottom-50 {\\n margin-bottom: 100px; }\\n\"","import { Component, Input, Output, EventEmitter } from '@angular/core'\nimport { HttpService, ViewService } from '../shared'\n\n@Component({\n\tselector: 'navigator',\n\ttemplate: require('./navigator.component.html'),\n\tstyles: [require('./navigator.component.scss'), require('../app.component.scss')]\n})\n\nexport class NavigatorComponent {\n\t@Output() onGoEvent = new EventEmitter();\n\t@Output() proxyChanged = new EventEmitter();\n\tprorocol_pattern = new RegExp('https?:\\/\\/');\n\tconstructor(private httpService: HttpService, private viewService: ViewService) {\n\t}\n\n\tonGo() {\n\t\tif (!this.prorocol_pattern.exec(this.httpService.current_url)) {\n\t\t\tthis.httpService.current_url = 'http://' + this.httpService.current_url;\n\t\t}\n\t\tthis.onGoEvent.emit({url: this.httpService.current_url});\n\t}\n\n\tonProxyChanged() {\n\t\tthis.proxyChanged.emit({proxy: this.httpService.proxy})\n\t}\n}\n","module.exports = \"
\\n\\t
\\n\\t\\t
\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t
\\n\\t\\t
\\n\\t\\t\\t\\n\\t\\t
\\n\\t
\\n
\"","module.exports = \".btn-submit {\\n margin-top: 23px;\\n color: white; }\\n\\n.btn-ok {\\n background-color: #435f76;\\n color: white;\\n position: relative;\\n left: -15px;\\n height: 74px; }\\n\\n@media (max-width: 991px) {\\n .btn-ok {\\n background-color: #435f76;\\n color: white;\\n position: relative;\\n left: -15px;\\n height: 99px;\\n top: 23px; } }\\n\\n.btn-fail {\\n background-color: #d74b4b;\\n color: white; }\\n\\ndiv.center {\\n text-align: right; }\\n\\n.navbar-item-container {\\n position: relative;\\n top: 7px;\\n /* width: 50%; */\\n margin: auto; }\\n\\n.navbar-item-container > button {\\n float: left; }\\n\\n#navigate-url-form {\\n position: relative; }\\n\\nselect {\\n margin: 5px 0px 5px 0px; }\\n\\n.less-margin-bottom {\\n margin-bottom: 0px !important; }\\n\\n/*\\n.input-wrapper{\\n position: relative;\\n margin-left: 0px;\\n}\\n\\n.input-wrapper:before{\\n content: \\\"\\\";\\n background: transparent;\\n position: absolute;\\n z-index: 1000;\\n left: 0px;\\n top: 2px;\\n margin: 0;\\n border-top: 15px solid transparent;\\n border-left: 20px solid #2b3d4c;\\n border-bottom: 15px solid transparent\\n}\\n\\n.input-wrapper > input{\\n padding-left:25px;\\n}\\n*/\\n\"","import { Directive, Input, ElementRef, HostListener, Renderer } from '@angular/core'\n\ndeclare var $: any;\n\n@Directive({\n selector: '[state]'\n})\n\nexport class StateDirective {\n @Input('state') valid: any;\n private validateClass = '';\n constructor( private _el: ElementRef, private _renderer: Renderer) {\n }\n\n @HostListener('input', ['$event'])\n onInput(event) {\n this.setValideStyle();\n }\n\n @HostListener('focus', ['$event'])\n onFocus(event) {\n this.setValideStyle();\n }\n\n @HostListener('focusout', ['$event'])\n onFocusout(event) {\n $('.form-group').removeClass(this.validateClass);\n }\n\n setValideStyle() {\n if (this.valid) {\n this.validateClass = 'has-success';\n } else {\n this.validateClass = 'has-error';\n }\n $('.form-group').addClass(this.validateClass);\n }\n}\n","import { Component, OnInit, OnDestroy, AfterViewInit, Output, EventEmitter, ViewChild, HostListener } from '@angular/core'\nimport { ViewService, SelectorService, HttpService } from '../../shared'\nimport { Field, Type, ImageExtractor, TextExtractor, LinkExtractor, Filter } from '../../model/selector'\nimport { Collection, Paginator } from '../../model/collection'\n\ndeclare var $: any;\nlet FileSaver = require('file-saver');\n\n@Component({\n\tselector: 'selector-list',\n\ttemplate: require('./list.component.html'),\n\tstyles: [require('./list.component.scss'), require('../../app.component.scss')],\n\thost: {\n\t\t'(window:message)': 'eventListener($event)',\n\t\t'(window:popstate)': 'onPopState($event)'\n\t}\n})\n\nexport class SelectorListComponent implements OnInit, OnDestroy {\n\n\tselectorList: Field[];\n\tcollectionList: Collection[];\n\n\tprivate click = new Event('click');\n\n\tprivate enable_add_collection = false;\n\tprivate details_parent_stack: Array = new Array();\n\tprivate selectedItem: any = null;\n\n\tprivate details_mode = false;\n\n\tprivate paginator_selecting = false;\n\n\tcurrent_collection: Collection = null;\n\n\tprivate isImport = false;\n\n\t// old stuff\n\tprivate selectedId = -1;\n\tprivate oldSelector = null;\n\tselectedSelector = {};\n\n\t@Output() collectionChanged = new EventEmitter();\n\t@Output() formatChanged = new EventEmitter();\n\n\tconstructor(private selectorService: SelectorService, private httpService: HttpService, private viewService: ViewService) {\n\n\t}\n\n\tngOnInit() {\n\t\tthis.collectionList = this.selectorService.getCollections();\n\t\tif (window.history.state !== null) {\n\t\t\t$.extend(this.current_collection, window.history.state);\n\t\t\tif (this.current_collection) {\n\t\t\t\tthis.collectionChanged.emit({ url: this.current_collection.request.url, name: this.current_collection.name });\n\t\t\t}\n\t\t}\n\t}\n\n\tonSelect(selector, selectorId: number) {\n\t\tthis.selectedItem = selector;\n\t\tthis.selectedId = selectorId;\n\t\t/* if (selector.type === Type.Text && selector.extractor.params.regexp.length > 0) {\n\t\t\tthis.selectedItem.count = this.selectorService.setSelectorPath(selector.selector, selector.extractor.params.regexp);\n\t\t} else {\n\t\t\tthis.selectedItem.count = this.selectorService.setSelectorPath(selector.selector);\n\t\t} */\n\t\tthis.selectorService.setSelectorPath(selector);\n\t}\n\n\treset() {\n\t\tthis.current_collection = null;\n\t}\n\n\tonListBlur(event) {\n\t\tif (!this.viewService.isSelecting) {\n\t\t\tthis.selectedItem = null;\n\t\t\tthis.selectorService.resetSelection();\n\t\t\tthis.selectedId = -1;\n\t\t}\n\t}\n\n\tonAddSelector() {\n\t\tif (!this.viewService.isSelecting) {\n\t\t\tthis.viewService.activateWebTab();\n\t\t\tthis.selectorService.enableSelectorGadget();\n\t\t\tthis.viewService.isSelecting = true;\n\n\t\t\tthis.selectedId = this.current_collection.fields.push(new Field('Click on element to select it', '', null));\n\t\t\tthis.selectedItem = this.current_collection.fields[--this.selectedId];\n\t\t\tthis.selectorService.info = `\n\t\t\t\tClick on the first element on the page to be matched by selector. It will be highlighted in Green.\n\t\t\t\tDataflow Kit will suggest similar elements that you may also want to select and mark them in Yellow.\n\t\t\t\tClick \\' Apply \\' when you'll finish.\n\t\t\t`;\n\t\t} else {\n\t\t\tthis.viewService.isSelecting = false;\n\t\t\tthis.selectorService.disableSelectorGadget();\n\t\t\tthis.selectorService.info = 'Click \\' Add new selector \\' to start select extracting data';\n\t\t\tif (this.current_collection.fields[this.current_collection.fields.length - 1].selector === '') {\n\t\t\t\tthis.current_collection.fields.splice(this.current_collection.fields.length - 1, 1);\n\t\t\t} else {\n\t\t\t\tif (this.current_collection.name === 'Collection') {\n\t\t\t\t\tthis.selectorService.initCollection(this.current_collection, this.httpService.current_url, this.httpService.proxy);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.selectedId = -1;\n\t\t\twindow.history.pushState({ key: 'collection', value: this.current_collection }, document.title, '');\n\t\t}\n\t}\n\n\tonEditCSS(selectorId: number): void {\n\t\tthis.viewService.activateWebTab();\n\t\tthis.selectorService.enableSelectorGadget();\n\t\tthis.viewService.isSelecting = true;\n\t\tthis.selectedId = selectorId;\n\t\tthis.oldSelector = Object.assign({}, this.current_collection.fields[this.selectedId]);\n\t\tthis.oldSelector.__proto__ = Field.prototype;\n\t\t// this.oldSelector = this.current_collection.fields[this.selectedId];\n\t}\n\n\tonAddCollection() {\n\t\tthis.viewService.activateWebTab();\n\t\tthis.viewService.enableUI = true;\n\t\tthis.selectorService.info = 'Click \\' Add new selector \\' to start select extracting data';\n\t\tthis.current_collection = this.selectorService.addNewCollection('Collection', '');\n\t}\n\n\tonSelChange(collection: Collection) {\n\t\t/*if (this.details_mode === true) {\n\t\t\tthis.details_mode = false;\n\t\t}*/\n\t\tlet have2Update = false;\n\t\tif (this.current_collection != null && this.current_collection.request.url === '') {\n\t\t\tthis.onDeleteCollection();\n\t\t}\n\t\tthis.httpService.proxy = collection.request.proxy;\n\t\tif (this.httpService.current_url !== collection.request.url) {\n\t\t\tthis.viewService.enableUI = false;\n\t\t\tthis.collectionChanged.emit({ url: collection.request.url, name: collection.name });\n\t\t} else {\n\t\t\thave2Update = true;\n\t\t}\n\t\tthis.current_collection = collection;\n\t\tif (have2Update) {\n\t\t\tthis.updateSelectorsCount();\n\t\t}\n\t}\n\n\tresetDetailsHistory() {\n\t\tthis.details_mode = false;\n\t\tthis.details_parent_stack.length = 0;\n\t}\n\n\tonAddDetails(details: Collection) {\n\t\tthis.details_mode = true;\n\t\tthis.details_parent_stack.push(this.current_collection);\n\n\t\tthis.current_collection = details;\n\t\tthis.selectorList = details.fields;\n\t\tthis.collectionChanged.emit({ url: details.request.url });\n\t\tthis.viewService.enableUI = false;\n\t}\n\n\tonDeleteSelector(selector_id: number) {\n\t\tif (!this.viewService.isSelecting) {\n\t\t\tthis.current_collection.deleteSelector(selector_id);\n\t\t}\n\t}\n\n\tonCancel() {\n\t\tif (this.selectedId !== -1 && (this.current_collection.fields[this.selectedId].type === Type.Dump ||\n\t\t\tthis.oldSelector == null)) {\n\t\t\tthis.current_collection.deleteSelector(this.selectedId);\n\t\t\tthis.selectedId = -1;\n\t\t} else if (this.oldSelector == null) {\n\t\t\tthis.current_collection.paginatorUI = null;\n\t\t}\n\t\tif (this.selectedId >= 0 && this.oldSelector !== null) {\n\t\t\tthis.current_collection.fields[this.selectedId] = this.oldSelector;\n\t\t\tthis.oldSelector = null;\n\t\t}\n\t\tthis.selectedId = -1;\n\t\tthis.viewService.isSelecting = false;\n\t\tthis.selectorService.disableSelectorGadget();\n\t\tthis.selectorService.info = 'Click \\' Add new selector \\' to start select extracting data';\n\t}\n\n\tonDone() {\n\t}\n\n\tonBack() {\n\t\tthis.current_collection = this.details_parent_stack.pop();\n\t\tthis.onSelChange(this.current_collection);\n\t\tif (this.details_parent_stack.length === 0) {\n\t\t\tthis.details_mode = false;\n\t\t}\n\t}\n\n\tonDeleteCollection() {\n\t\tif (!this.details_mode) {\n\t\t\tthis.selectorService.deleteCollection(this.current_collection.name);\n\t\t\tif (this.selectorService.getCollections().length > 0) {\n\t\t\t\tthis.current_collection = this.selectorService.getCollections()[0];\n\t\t\t} else {\n\t\t\t\tthis.current_collection = null;\n\t\t\t}\n\t\t\tthis.viewService.activateWebTab();\n\t\t} else {\n\t\t\tlet parentCollection = this.details_parent_stack.pop();\n\t\t\tfor (let selector of parentCollection.fields) {\n\t\t\t\tif (selector.details === this.current_collection) {\n\t\t\t\t\tselector.details = null;\n\t\t\t\t\tthis.onSelChange(parentCollection);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonAddPaginator(type: string) {\n\t\tthis.viewService.activateWebTab();\n\t\tthis.current_collection.paginatorUI = new Paginator();\n\t\t/* this.current_collection.paginator.maxPages = 10; */\n\t\tthis.current_collection.paginatorUI.type = type;\n\t\tif (type === 'next') {\n\t\t\tthis.viewService.isSelecting = true;\n\t\t\tthis.selectorService.enableSelectorGadget();\n\t\t\tthis.current_collection.paginatorUI.attr = 'href';\n\t\t\tthis.current_collection.request.type = '';\n\t\t} else {\n\t\t\tthis.current_collection.request.type = 'chrome';\n\t\t\tthis.current_collection.request.actions.push({\n\t\t\t\t'scroll': {\n\t\t\t\t\t'paginate': 10,\n\t\t\t\t\t'element': ''\n\t\t\t\t}\n\t\t\t});\n\t\t\t// = '[{\"paginate\":{\"maxpage\":10, \"element\":\"\"}}]';\n\t\t\tif (type === 'more') {\n\t\t\t\tthis.viewService.isSelecting = true;\n\t\t\t\tthis.selectorService.enableSelectorGadget();\n\t\t\t}\n\t\t}\n\t\tif (type !== 'infinite') {\n\t\t\tthis.selectedItem = this.current_collection.paginatorUI;\n\t\t}\n\t}\n\n\tonDeletePaginator() {\n\t\tthis.current_collection.paginatorUI = null;\n\t\tthis.current_collection.request.type = '';\n\t\tthis.current_collection.request.actions = [];\n\t\tthis.current_collection.paginator = '';\n\t}\n\n\tonSelectorItemClick(selector: Field) {\n\t\tthis.selectedSelector = selector;\n\t\tthis.selectorService.setSelectorPath(selector);\n\t}\n\n\tngOnDestroy() {\n\t\t// this.selectorService.resumeGadget();\n\t}\n\n\teventListener(event: any) {\n\t\tconsole.log(event);\n\t\tif (event.data.event_id === 'scripts_loaded') {\n\t\t\tthis.viewService.enableUI = true;\n\t\t\tif (this.current_collection == null) {\n\t\t\t\tthis.onAddCollection();\n\t\t\t} else {\n\t\t\t\tlet existCollection: Collection = this.selectorService.getCollectionByUrl(this.httpService.current_url);\n\t\t\t\tif (existCollection !== null) {\n\t\t\t\t\tif (existCollection.request.url !== this.current_collection.request.url) {\n\t\t\t\t\t\tif (this.current_collection.request.url === '') {\n\t\t\t\t\t\t\tthis.onDeleteCollection();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.current_collection = existCollection;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// during import process we have to manualy update selector's count field\n\t\t\t\t\t\tthis.updateSelectorsCount();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (this.current_collection.request.url !== '' && !this.details_mode && !this.isImport) {\n\t\t\t\t\t\tthis.onAddCollection();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.isImport = false;\n\t\t\t\t\t\tthis.updateSelectorsCount();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (event.data.event_id === 'selection_changed') {\n\t\t\tif (this.selectedItem.name === undefined) {\n\t\t\t\tif (this.current_collection.paginatorUI.type === 'next') {\n\t\t\t\t\tthis.current_collection.paginatorUI.selector = event.data.data.current_selected;\n\t\t\t\t\tthis.current_collection.paginator = event.data.data.current_selected;\n\t\t\t\t} else {\n\t\t\t\t\tthis.current_collection.paginatorUI.selector = event.data.data.current_selected;\n\t\t\t\t\tlet paginator_action = null;\n\t\t\t\t\tfor (let i = 0; i < this.current_collection.request.actions.length; i++) {\n\t\t\t\t\t\tpaginator_action = this.current_collection.request.actions[i]\n\t\t\t\t\t\tif ('scroll' in paginator_action) {\n\t\t\t\t\t\t\tpaginator_action.scroll.element = event.data.data.current_selected;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/* this.current_collection.request.actions.push({\n\t\t\t\t\t\t'scroll': {\n\t\t\t\t\t\t\t'paginate': 10,\n\t\t\t\t\t\t\t'element': event.data.data.current_selected\n\t\t\t\t\t\t}\n\t\t\t\t\t}) */\n\t\t\t\t\t/* this.current_collection.request.actions = '[{\"paginate\":{\"maxpage\":10, \"element\":\"' +\n\t\t\t\t\tevent.data.data.current_selected + '\"}}]' */\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.current_collection.updateSelection(this.selectedId, event);\n\t\t\t}\n\t\t}\n\t\tif (event.data.event_id === 'navigate') {\n\t\t\t// window.history.pushState({key: 'link', value: this.httpService.current_url}, document.title, '');\n\t\t\tthis.collectionChanged.emit({ url: event.data.href, post_params: event.data.postData, action: event.data.action });\n\t\t\tthis.viewService.enableUI = false;\n\t\t}\n\t}\n\n\tonPopState(event) {\n\t\tconsole.log(event.state);\n\t\tif (event.state !== null) {\n\t\t\tswitch (event.state.key) {\n\t\t\t\tcase 'collection':\n\t\t\t\t\tthis.current_collection = event.state.value;\n\t\t\t\t\tthis.castFiledsToCorespondingSelectorType(this.current_collection.fields);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'link':\n\t\t\t\t\tthis.collectionChanged.emit({ url: event.state.value, post_params: '', func: '' });\n\t\t\t\t\tthis.viewService.enableUI = false\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tonChangeFormat(format: string) {\n\t\tif (this.current_collection != null) {\n\t\t\tthis.current_collection.format = format;\n\t\t\tthis.formatChanged.emit();\n\t\t}\n\t}\n\n\tonExportCollection() {\n\t\tlet blob = new Blob([this.current_collection.stringify(this.current_collection.format, this.current_collection.name)],\n\t\t\t{ type: 'text/plain;charset=utf-8' });\n\t\tFileSaver.saveAs(blob, this.current_collection.name + '.collection.json', { autoBom: true });\n\t}\n\n\tonImportCollection(files: FileList) {\n\t\tif (files.length > 1) {\n\t\t\tthis.viewService.errorAlert('Multiple files not allowed.');\n\t\t\treturn;\n\t\t}\n\t\tlet reader = new FileReader();\n\t\treader.onload = () => {\n\t\t\tlet col = JSON.parse(reader.result);\n\t\t\tcol.__proto__ = Collection.prototype;\n\t\t\tif (!col.isValid()) {\n\t\t\t\tthis.viewService.errorAlert('Invalid collection file.');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.castFiledsToCorespondingSelectorType(col.fields);\n\t\t\tthis.importPaginator(col);\n\t\t\tthis.onSelChange(col);\n\t\t\tthis.selectorService.addCollection(col);\n\t\t\tthis.isImport = true;\n\t\t}\n\t\tif (files[0].size > 512000) {\n\t\t\tthis.viewService.errorAlert('Selected file is too large.');\n\t\t\treturn;\n\t\t}\n\t\treader.readAsText(files[0]);\n\t}\n\n\tonProxyChanged(event) {\n\t\tif (this.current_collection !== null && this.current_collection.request !== null && this.current_collection.request.url.length > 0) {\n\t\t\tthis.current_collection.request.proxy = event.proxy;\n\t\t}\n\t}\n\n\tcastFiledsToCorespondingSelectorType(arr: Array) {\n\t\tfor (let i = 0; i < arr.length; i++) {\n\t\t\tif (arr[i].details != null) {\n\t\t\t\tthis.castFiledsToCorespondingSelectorType(arr[i].details.fields);\n\t\t\t\tarr[i].details.__proto__ = Collection.prototype;\n\t\t\t\tthis.importPaginator(arr[i].details);\n\t\t\t}\n\t\t\tarr[i].__proto__ = Field.prototype;\n\t\t\tfor (let f = 0; f < arr[i].filters.length; f++) {\n\t\t\t\tarr[i].filters[f].__proto__ = Filter.prototype;\n\t\t\t}\n\t\t}\n\t}\n\n\timportPaginator(col: Collection) {\n\t\tif (col.hasOwnProperty('paginator') && col.paginator !== null) {\n\t\t\tlet paginator: any = col.paginator;\n\t\t\tcol.paginatorUI = new Paginator();\n\t\t\tcol.paginatorUI.selector = paginator.nextPageSelector;\n\t\t\tcol.paginatorUI.attr = 'href';\n\t\t\tcol.paginatorUI.type = 'next';\n\t\t\tcol.paginatorUI.pageNum = paginator.pageNum;\n\t\t} else if (col.request.hasOwnProperty('actions') && col.request.actions.length > 0) {\n\t\t\tfor (let i = 0; i < col.request.actions.length; i++) {\n\t\t\t\tif (col.request.actions[i].hasOwnProperty('scroll')) {\n\t\t\t\t\tcol.paginatorUI = new Paginator();\n\t\t\t\t\tcol.paginatorUI.attr = 'href';\n\t\t\t\t\tlet pag = col.request.actions[i].scroll;\n\t\t\t\t\tif (pag.hasOwnProperty('element') && pag.element !== '') {\n\t\t\t\t\t\tcol.paginatorUI.selector = pag.element;\n\t\t\t\t\t\tcol.paginatorUI.type = 'more';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcol.paginatorUI.type = 'infinite';\n\t\t\t\t\t}\n\t\t\t\t\tif (!pag.hasOwnProperty('paginate')) {\n\t\t\t\t\t\t// default value\n\t\t\t\t\t\tcol.paginatorUI.pageNum = 10;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcol.paginatorUI.pageNum = pag.paginate;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*let pagArr = JSON.parse(col.request.actions);\n\t\t\t if (pagArr instanceof Array && 'paginate' in pagArr[0]) {\n\t\t\t\tcol.paginatorUI = new Paginator();\n\t\t\t\tcol.paginatorUI.attr = 'href';\n\t\t\t\tlet pag = pagArr[0];\n\t\t\t\tif ('element' in pag.paginate && pag.paginate.element !== '') {\n\t\t\t\t\tcol.paginatorUI.selector = pag.paginate.element;\n\t\t\t\t\tcol.paginatorUI.type = 'more';\n\t\t\t\t} else {\n\t\t\t\t\tcol.paginatorUI.type = 'infinite';\n\t\t\t\t}\n\t\t\t} */\n\t\t}\n\t}\n\n\tupdateSelectorsCount() {\n\t\tfor (let idx = 0; idx < this.current_collection.fields.length; idx++) {\n\t\t\tthis.current_collection.fields[idx].count = this.selectorService.getCount(this.current_collection.fields[idx].selector);\n\t\t}\n\t}\n}\n","module.exports = \"
\\n
\\n \\n
\\n \\n \\n \\n \\n \\n
\\n
\\n \\n
\\n
\\n \\n
\\n
\\n

\\n {{current_collection!=null?current_collection.name:\\\"Selector List\\\"}} 

\\n
    \\n
  •  {{collection.name}}
  • \\n
\\n
\\n
\\n \\n \\n \\n \\n \\n
\\n
\\n \\n
\\n
\\n \\n
\\n \\n
\\n \\n
\\n
\\n \\n \\n \\n \\n
Paginator
\\n
\\n
\\n \\n \\n
\\n
\\n \\n
\\n \\n \\n
\\n \\n
\\n
\\n
\\n \\n \\n \\n \\n \\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\"","import { Component, OnInit, Input, Output, EventEmitter, ViewChild, OnDestroy, isDevMode } from '@angular/core'\nimport { ViewService, HttpService, NatsService } from '../shared'\nimport { Subscription, Subject } from 'rxjs'\nimport { Collection } from '../model/collection'\nimport { saveAs } from 'file-saver';\nimport { SocketService } from '../shared/socket.service';\nimport { deepCopy } from 'deep-copy-ts'\nimport { WebsocketService } from '../shared/websocket.service';\n\ndeclare var DFK: any;\n\n@Component({\n\tselector: 'preview',\n\ttemplate: require('./preview.component.html'),\n\tstyles: [require('./preview.component.scss'), require('../app.component.scss')],\n\tproviders: [NatsService, SocketService, WebsocketService]\n})\n\nexport class PreviewComponent implements OnInit, OnDestroy {\n\n\t@Output() closePreview = new EventEmitter();\n\t@Input() collection: Collection;\n\t@ViewChild('csvpreview') csv_preview;\n\t@ViewChild('xlspreview') xls_preview;\n\texport_result: any = '';\n\tbusy: Subscription;\n\tshowIndicator = false;\n\tprogressSubscription: Subscription;\n\tresultLinkSubscription: Subscription;\n\tprogress = 'Page ';\n\tresultLink = '';\n\trequestCount = 0;\n\tresponseCount = 0;\n\telapsedTime = '';\n\tcounter = 1;\n\tcurrentProcessID = '';\n\tuserLoggedIn = false;\n\tdashboardURL = '';\n\n\tprivate outputFormat = 'csv';\n\n\tconstructor(private _httpService: HttpService,\n\t\tprivate _viewService: ViewService,\n\t\tprivate _natsService: NatsService,\n\t\tprivate wsService: WebsocketService,\n\t\tprivate sockerService: SocketService) {\n\t\tif (isDevMode()) {\n\t\t\tthis.dashboardURL = 'http://localhost:8005/tasks';\n\t\t} else {\n\t\t\tthis.dashboardURL = 'https://account.dataflowkit.com/tasks';\n\t\t}\n\t}\n\n\tngOnInit() {\n\t\tthis.busy = null;\n\t\tthis.progressSubscription = this.sockerService.progressMessage$.subscribe(message => this.progress = message);\n\t\tthis.resultLinkSubscription = this.sockerService.resultLink$.subscribe(pr => {\n\t\t\tif (pr !== '') {\n\t\t\t\tlet parseResult = JSON.parse(pr);\n\t\t\t\tthis._viewService.resultAlert(parseResult);\n\t\t\t\tif (parseResult.results !== '') {\n\t\t\t\t\tthis.resultLink = parseResult.results;\n\t\t\t\t}\n\t\t\t\t/* this.requestCount = parseResult.Requests.initial;\n\t\t\t\tthis.responseCount = parseResult['Responses'];\n\t\t\t\tthis.elapsedTime = parseResult['Took']; */\n\t\t\t}\n\t\t});\n\t}\n\n\tupdate(collection?: Collection) {\n\t\tif (collection !== undefined) {\n\t\t\tthis.collection = collection;\n\t\t\tif (collection.format !== 'xlsx') {\n\t\t\t\tthis.outputFormat = collection.format;\n\t\t\t} else {\n\t\t\t\tthis.outputFormat = 'csv';\n\t\t\t}\n\t\t}\n\t\tthis.onExport(this.outputFormat, true);\n\t}\n\n\tonClose() {\n\t\tthis.closePreview.emit();\n\t}\n\n\tonExport(format: string, preview: boolean) {\n\t\t// this.outputFormat = format.toLocaleLowerCase();\n\t\tthis.collection.preview = preview;\n\t\tif (preview) {\n\t\t\tthis.export_result = '';\n\t\t}\n\t\tthis.counter = 0;\n\t\tthis.progress = 'Initializing...';\n\t\tlet previewCollection: any = new Collection('preview', null, null);\n\t\tpreviewCollection = deepCopy(this.collection);\n\t\tpreviewCollection.__proto__ = Collection.prototype;\n\t\tpreviewCollection.format = format;\n\t\tlet payload = previewCollection.stringify(format, this.collection.name);\n\t\tthis._viewService.enableUI = false;\n\t\tthis._viewService.isSelecting = true;\n\t\tthis._httpService.postCollection(payload).subscribe(\n\t\t\tresponse => this.responseHandler(format, response),\n\t\t\terr => this.onError(err)\n\t\t);\n\t\t// this.responseHandler('json', {'id': 'some_id'});\n\t\t/* this.sockerService.connect();\n\t\tlet parse = this._natsService.parse(payload);\n\t\tthis.showIndicator = true;\n\t\tthis._viewService.enableUI = false;\n\t\tthis.busy = parse.subscribe(\n\t\t\tparse_res => this.updateResult(format, parse_res),\n\t\t\terr => this.onError(err),\n\t\t\t() => this.onFinish()\n\t\t); */\n\n\t\t/*this.export_result = '';\n\t\tthis.busy = this._httpService.postCollection(this._selectorService.getCollectionByName(this.collectionName)\n\t\t.stringify(format, this.collectionName))\n\t\t.subscribe(res => this.updateResult(format, res),\n\t\t\t\t\terror => this._viewService.errorAlert(error),\n\t\t\t\t\t() => console.log('post data finished'));*/\n\t}\n\n\tresponseHandler(format: string, response: any) {\n\t\tthis.currentProcessID = response.id;\n\t\t/* this.busy = this.sockerService.connect1(response.id).subscribe(\n\t\t\tparse_res => this.updateResult(format, parse_res),\n\t\t\terr => this.onError(err),\n\t\t\t() => this.onFinish()\n\t\t); */\n\t\tthis.busy = this.wsService.connect(this.currentProcessID).subscribe(\n\t\t\tresp => this.translateMsg(format, resp),\n\t\t\terr => this.onError(err),\n\t\t\t() => this.onFinish()\n\t\t)\n\t}\n\n\tonError(err) {\n\t\tthis._viewService.errorAlert(err);\n\t\tthis.onCancel();\n\t}\n\n\tonFinish() {\n\t\tthis.currentProcessID = '';\n\t\tif (this.busy !== undefined && this.busy !== null) {\n\t\t\tthis.busy.unsubscribe();\n\t\t\tthis.busy = null;\n\t\t}\n\t\tthis._viewService.isSelecting = false;\n\t\tthis._viewService.enableUI = true;\n\t}\n\n\tonSave() {\n\t\tlet file = new Blob([(this.outputFormat === 'json') ?\n\t\t\tJSON.stringify(this.export_result) : this.export_result], { type: 'text;charset=utf-8' });\n\t\tsaveAs(file, this.collection.name + '.' + this.outputFormat);\n\t}\n\n\ttranslateMsg(format, msg) {\n\t\tlet msgObj = JSON.parse(msg.data);\n\t\tlet msgText = this.b64DecodeUnicode(msgObj.data); // atob(msgObj.data);\n\t\tswitch (msgObj.type) {\n\t\t\tcase '_info':\n\t\t\t\tthis.progress = msgText;\n\t\t\t\tbreak;\n\t\t\tcase '_finish':\n\t\t\t\tthis.onFinish();\n\t\t\t\tbreak;\n\t\t\tcase '_error':\n\t\t\t\tthis.onError(msgText);\n\t\t\t\tbreak;\n\t\t\tcase '_':\n\t\t\t\tthis.updateResult(format, msgText);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tb64DecodeUnicode(str) {\n\t\t// Going backwards: from bytestream, to percent-encoding, to original string.\n\t\treturn decodeURIComponent(atob(str).split('').map(function (c) {\n\t\t\treturn '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\n\t\t}).join(''));\n\t}\n\n\tupdateResult(format: string, resp: string) {\n\t\tif (format === 'json') {\n\t\t\ttry {\n\t\t\t\tthis.export_result = JSON.parse(resp);\n\t\t\t} catch (e) {\n\t\t\t\tthis.onError(e);\n\t\t\t\tconsole.log(resp);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.export_result = resp;\n\t\t}\n\t\tif (format === 'csv' || format === 'xlsx') {\n\t\t\tif (this.collection == null) {\n\t\t\t\tthis._viewService.errorAlert(this.collection.name + ' not found!');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet preview = (format === 'csv') ? this.csv_preview : this.xls_preview;\n\t\t\tpreview.fieldMask = [];\n\t\t\tpreview.header = [];\n\t\t\tthis.initColumns(preview, this.collection);\n\t\t\ttry {\n\t\t\t\tpreview.displayData(this.export_result, this._httpService.baseUrl);\n\t\t\t} catch (err) {\n\t\t\t\tthis._viewService.errorAlert(err);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetExportResult(): string {\n\t\treturn (this.outputFormat === 'json') ? JSON.stringify(this.export_result) : this.export_result;\n\t}\n\n\tngOnDestroy() {\n\t\tthis.resultLinkSubscription.unsubscribe();\n\t\tthis.progressSubscription.unsubscribe();\n\t}\n\n\tonCancel() {\n\t\tif (this.currentProcessID !== '') {\n\t\t\tthis._httpService.sendCancelRequest(this.currentProcessID).subscribe();\n\t\t}\n\t\tthis.onFinish();\n\t}\n\n\tprivate initColumns(view: any, collection: Collection): void {\n\t\tfor (let selector of collection.fields) {\n\t\t\tif (selector.attrs.indexOf('path') >= 0) {\n\t\t\t\tthis.initColumns(view, selector.details)\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tview.header.push(selector.name);\n\t\t}\n\t}\n\n\tprivate onChangeFormat(format: string) {\n\t\tthis.outputFormat = format;\n\t\tthis.resultLink = '';\n\t}\n\n\tprivate onCreateTask() {\n\t\tlet task = '{\"type\":\"extract\",\"payload\":' + this.collection.stringify(this.collection.format, this.collection.name) +\n\t\t\t',\"name\":\"' + this.collection.name + '\"}';\n\t\tthis._httpService.createTask(task).subscribe(\n\t\t\tresponse => window.open(this.dashboardURL),\n\t\t\terror => this._viewService.errorAlert(error)\n\t\t);\n\t}\n\n\tuserExists(): boolean {\n\t\treturn DFK.User.exists();\n\t}\n}\n","import {Injectable, isDevMode} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport * as io from 'socket.io-client';\nimport { BehaviorSubject } from 'rxjs/BehaviorSubject';\n\n@Injectable()\nexport class SocketService {\n private host: string;\n private socket: any;\n\n public progressMessage$: BehaviorSubject = new BehaviorSubject('Parsing...');\n public resultLink$: BehaviorSubject = new BehaviorSubject('');\n\n constructor() {\n if (isDevMode()) {\n this.host = window.location.protocol + '//' + window.location.hostname + ':' + 5000 + '/socket.io/';\n } else {\n this.host = window.location.protocol + '//' + window.location.hostname + '/socket.io/';\n }\n }\n\n connect1 (taskID: string): Observable {\n return Observable.create(observer => {\n this.socket = io(this.host)\n\n this.socket.on('connect', () => {\n this.socket.on('task_' + taskID + '_', (results: string) => {\n observer.next(results);\n });\n\n this.socket.on('task_' + taskID + '_error', (err: string) => {\n observer.error(err);\n });\n\n this.socket.on('task_' + taskID + '_info', (msg: string) => {\n this.progressMessage$.next(msg);\n });\n\n this.socket.on('task_' + taskID + '_finish', (parseResult) => {\n this.socket.disconnect();\n this.resultLink$.next(parseResult);\n // observer.complete();\n });\n this.socket.emit('init', taskID);\n });\n\n this.socket.on('error', (err: string) => {\n observer.error(err);\n })\n\n this.socket.on('disconnect', () => {\n console.log('disconnected');\n observer.complete();\n })\n });\n }\n\n connect () {\n this.socket = io(this.host);\n this.socket.on('connect', () => this.connected());\n this.socket.on('disconnect', () => this.disconnected());\n this.socket.on('error', (error: string) => {\n console.log(`ERROR: \"${error}\" (${this.host})`);\n });\n this.socket.connect();\n }\n\n disconnect () {\n this.socket.disconnect();\n }\n\n emit(chanel, message) {\n return new Observable(observer => {\n console.log(`emit to ${chanel}:`, message);\n this.socket.emit(chanel, message, function (data) {\n if (data.success) {\n observer.next(data.msg);\n } else {\n observer.error(data.msg);\n }\n observer.complete();\n });\n });\n }\n\n on(event_name) {\n console.log(`listen to ${event_name}:`);\n return new Observable(observer => {\n this.socket.off(event_name);\n this.socket.on(event_name, (data) => {\n observer.next(data);\n });\n });\n }\n\n private connected() {\n console.log('Connected');\n }\n\n private disconnected() {\n console.log('Disconnected');\n }\n}\n","import { Injectable, isDevMode } from '@angular/core';\nimport { Observable } from 'rxjs/Observable';\nimport * as Rx from 'rxjs/Rx';\n\n@Injectable()\nexport class WebsocketService {\n private host = '';\n private subject: Rx.Subject;\n constructor() {\n if (isDevMode()) {\n this.host = 'ws://' + window.location.hostname + ':' + 5000 + '/ws';\n } else {\n this.host = 'wss://' + window.location.hostname + '/ws';\n }\n }\n\n connect(taskID: string): Observable {\n return Observable.create(observer => {\n let socket = new WebSocket(this.host);\n\n socket.onopen = (e) => {\n /* socket.on('task_' + taskID + '_', (results: string) => {\n observer.next(results); */\n socket.send(taskID);\n }\n\n socket.onmessage = observer.next.bind(observer);\n socket.onerror = observer.error.bind(observer);\n socket.onclose = observer.complete.bind(observer);\n });\n }\n\n public connect1(): Rx.Subject {\n if (!this.subject) {\n this.subject = this.create(this.host);\n }\n return this.subject;\n }\n\n private create(url): Rx.Subject {\n let ws = new WebSocket(url);\n\n let observable = Rx.Observable.create((obs: Rx.Observer) => {\n ws.onmessage = obs.next.bind(obs);\n ws.onerror = obs.error.bind(obs);\n ws.onclose = obs.complete.bind(obs);\n return ws.close.bind(ws);\n });\n let observer = {\n next: (data: Object) => {\n if (ws.readyState === WebSocket.OPEN) {\n ws.send(JSON.stringify(data));\n }\n }\n };\n return Rx.Subject.create(observer, observable);\n }\n}\n","export * from './config.service';\nexport * from './view.service';\nexport * from './selector.service';\nexport * from './http.service';\nexport * from './nats.service'\n","module.exports = \"
\\n
\\n \\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n \\n
\\n \\n \\n \\n
\\n
\\n \\n
\\n
\\n
\\n
\\n
\"","module.exports = \".preview_container {\\n /* border: 1px solid black;\\n box-shadow: 0 0 10px 5px rgba(221, 221, 221, 1);\\n background-color: antiquewhite;\\n opacity: .95; */\\n height: 78vh;\\n padding: 10px;\\n width: 100%; }\\n\\ndiv.tab-content {\\n overflow-y: scroll;\\n height: 68vh; }\\n\\n.export-buttouns-container {\\n padding-top: 25px;\\n text-align: center; }\\n\\n.formats {\\n margin-right: 10px; }\\n\\n@media (max-width: 991px) {\\n div.tab-content {\\n height: 62vh;\\n overflow-y: scroll; } }\\n\"","import { Component, Input } from '@angular/core'\n\n@Component({\n selector: 'JSONXMLPreview',\n template: require('./JSONXMLPreview.component.html'),\n styles: [require('./JSONXMLPreview.component.scss')]\n})\n\nexport class JSONXMLPreviewComponent {\n\n @Input() data = '';\n}\n","module.exports = \"\\n\"","module.exports = \"\"","import { Component, Input } from '@angular/core'\nimport { CSVService } from './csv.service'\nimport { IElementFactory, ImageElementFactory, LinkElementFactory, TextElementFactory } from './element';\n\n@Component({\n selector: 'csv-preview',\n template: require('./csvpreview.component.html'),\n styles: [require('./csvpreview.component.scss')],\n providers: [CSVService]\n})\n\nexport class CSVPreviewComponent {\n public csvData = [];\n public header: any[] = [];\n\n private displayOutput: Array> = [];\n private displayTemplate: Array;\n\n constructor(private csvService: CSVService) {\n }\n\n displayData(csv_data: string) {\n this.csvData = this.csvService.parse(csv_data);\n this.displayOutput = [];\n this.initElementTemplates(this.csvData[0]);\n for (let i = 1; i < this.csvData.length; i++) {\n this.displayOutput.push(new Array());\n for (let j = 0; j < this.displayTemplate.length; j++) {\n this.displayOutput[i - 1].push(this.displayTemplate[j].createElement(this.csvData[i]));\n }\n }\n }\n\n private initElementTemplates(headerRow: Array) {\n this.displayTemplate = new Array();\n for (let index = 0; index < headerRow.length; index++) {\n let attrName = this.getAttrFromValueName(headerRow[index]);\n switch (attrName) {\n case 'href': {\n let hrefIndex = index;\n let textIndex = -1;\n if (index + 1 < headerRow.length && // check whether index out of range\n this.getAttrFromValueName(headerRow[index + 1]) === 'text' && // check whether next field is text\n // check whether next field is a same selector\n this.getFieldName(headerRow[index]) === this.getFieldName(headerRow[index + 1])) {\n textIndex = ++index;\n }\n this.displayTemplate.push(new LinkElementFactory(hrefIndex, textIndex));\n } break;\n case 'src': {\n let srcIndex = index;\n let altIndex = -1;\n if (index + 1 < headerRow.length && // check whether index out of range\n this.getAttrFromValueName(headerRow[index + 1]) === 'alt' && // check whether next field is text\n // check whether next field is a same selector\n this.getFieldName(headerRow[index]) === this.getFieldName(headerRow[index + 1])) {\n altIndex = ++index;\n }\n this.displayTemplate.push(new ImageElementFactory(srcIndex, altIndex));\n } break;\n case 'alt':\n case 'text':\n case 'regex': {\n if (index + 1 < headerRow.length && // check whether index out of range\n // check whether next field is a same selector\n this.getFieldName(headerRow[index]) === this.getFieldName(headerRow[index + 1]) &&\n this.getAttrFromValueName(headerRow[index]) !== this.getAttrFromValueName(headerRow[index + 1])) {\n let nextFieldAttr = this.getAttrFromValueName(headerRow[index + 1]);\n switch (nextFieldAttr) {\n case 'src': {\n this.displayTemplate.push(new ImageElementFactory(index + 1, index));\n } break;\n case 'href': {\n this.displayTemplate.push(new LinkElementFactory(index + 1, index));\n } break;\n default: {\n throw new Error('Unknown selector type.');\n }\n }\n index++;\n } else {\n this.displayTemplate.push(new TextElementFactory(index));\n }\n } break;\n default: {\n // TODO: sdelat' krasivo\n if (index + 1 < headerRow.length && // check whether index out of range\n // check whether next field is a same selector\n this.getFieldName(headerRow[index]) === this.getFieldName(headerRow[index + 1]) &&\n this.getAttrFromValueName(headerRow[index]) !== this.getAttrFromValueName(headerRow[index + 1])) {\n let nextFieldAttr = this.getAttrFromValueName(headerRow[index + 1]);\n switch (nextFieldAttr) {\n case 'src': {\n this.displayTemplate.push(new ImageElementFactory(index + 1, index));\n } break;\n case 'href': {\n this.displayTemplate.push(new LinkElementFactory(index + 1, index));\n } break;\n default: {\n throw new Error('Unknown selector type.');\n }\n }\n index++;\n } else {\n this.displayTemplate.push(new TextElementFactory(index));\n }\n //throw new Error('Unknown selector type.');\n }\n }\n }\n }\n\n private getAttrFromValueName(field: string) {\n let fromIndex = field.lastIndexOf('_');\n if (fromIndex === -1) {\n throw new Error('Attibute name not found');\n }\n return field.substring(fromIndex + 1);\n }\n\n private getFieldName(field: string) {\n let toIndex = field.lastIndexOf('_');\n if (toIndex === -1) {\n throw new Error('Field name not found');\n }\n return field.substring(0, toIndex);\n }\n\n private getElementTypeByField(field: string) {\n switch (this.getAttrFromValueName(field)) {\n case 'src': {\n return 0;\n }\n case 'href': {\n return 2;\n }\n default: {\n return 1;\n }\n }\n }\n\n update(data: string) {\n let str = this.escapeSpecialChars(data);\n let jsonObj = JSON.parse(str);\n this.displayData(jsonObj.tables[0].table);\n }\n\n escapeSpecialChars(jsonString) {\n\n return jsonString.replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\f/g, '\\\\f');\n }\n}\n","import { Injectable } from '@angular/core'\n\ndeclare var $:any;\n\n@Injectable()\nexport class CSVService{\n\n parse(csv:string):Array{\n return $.simple_csv(csv);\n }\n}","export interface IElementFactory {\n createElement(csvRow: Array): string;\n}\n\nexport class ImageElementFactory implements IElementFactory {\n srcColumnNum: number;\n altColumnNum: number;\n dataExpr = /data:\\w+\\/\\w+/\n\n constructor(src: number, alt = -1) {\n this.srcColumnNum = src;\n this.altColumnNum = alt;\n }\n\n public createElement(csvRow: Array): string {\n let value = '';\n let srcArray = csvRow[this.srcColumnNum].split(';');\n if (this.dataExpr.test(srcArray[0])) {\n srcArray = [csvRow[this.srcColumnNum]];\n }\n let altArray = new Array();\n if (this.altColumnNum >= 0) {\n altArray = csvRow[this.altColumnNum].split(';');\n }\n let cell = '';\n for (let index = 0; index < srcArray.length; index++) {\n if (srcArray.length === altArray.length) {\n cell += `${altArray[index]}
`;\n } else {\n cell += `
`;\n }\n }\n return cell;\n }\n}\n\nexport class LinkElementFactory implements IElementFactory {\n hrefColumnNum: number;\n textColumnNum: number;\n\n constructor(href: number, text = -1) {\n this.hrefColumnNum = href;\n this.textColumnNum = text;\n }\n\n public createElement(csvRow: Array): string {\n let hrefArray = csvRow[this.hrefColumnNum].split(';');\n let textArray = new Array();\n let cell = '';\n if (this.textColumnNum >= 0) {\n textArray = csvRow[this.textColumnNum].split(';');\n }\n for (let index = 0; index < hrefArray.length; index++) {\n if (hrefArray.length === textArray.length) {\n cell += `${textArray[index]}
`;\n } else {\n cell += `${hrefArray[index]}
`;\n }\n }\n return cell;\n }\n}\n\nexport class TextElementFactory implements IElementFactory {\n textColumnNum: number;\n\n constructor(text: number) {\n this.textColumnNum = text;\n }\n\n public createElement(csvRow: Array): string {\n let textArray = csvRow[this.textColumnNum].split(';');\n let cell = '';\n for (let index = 0; index < textArray.length; index++) {\n cell += `${textArray[index]}
`;\n }\n return cell;\n }\n}\n","module.exports = \"\\n \\n \\n \\n \\n \\n \\n \\n
#{{column_name}}
{{i+1}}\\n
\"","module.exports = \":host ::ng-deep img {\\n max-height: 350px; }\\n\"","import { Component } from '@angular/core'\n\n@Component({\n selector: 'project',\n template:require('./project.component.html'),\n styles:[require('./project.component.scss')]\n})\n\nexport class ProjectComponent{\n \n}","module.exports = \"
\\n
\\n
\\n
\\n

Project

\\n
\\n
\\n
\\n Name\\n \\n
\\n
\\n
\\n
\\n
\"","module.exports = \"\"","import { Component, Input, OnInit, Output, EventEmitter, ViewChild, ElementRef, AfterViewInit } from '@angular/core'\nimport { Field, Type, Filter } from '../../../model/selector'\nimport { Collection } from '../../../model/collection'\nimport { Observable } from 'rxjs/Observable'\nimport { fromEvent } from 'rxjs'\nimport 'rxjs/add/operator/debounceTime';\nimport 'rxjs/add/operator/distinctUntilChanged';\nimport { ViewService, SelectorService } from '../../../shared'\nimport { Array } from 'core-js'\n// import { Filters } from '../../../model/mock-data'\n\ndeclare var $: any;\n\n@Component({\n selector: 'field',\n template: require('./list-item.html'),\n styles: [require('./selector-list-item.scss'), require('../list.component.scss'), require('../../../app.component.scss')]\n})\n\nexport class SelectorListItemComponent implements OnInit, AfterViewInit {\n @Input() fieldID = -1;\n @Output() addDetailsEvent = new EventEmitter();\n @Output() deleteSelector = new EventEmitter();\n @Output() cssChanged = new EventEmitter();\n @Output() editCss = new EventEmitter();\n @Output() pathSelected = new EventEmitter();\n\n @ViewChild('zpanel') expand_panel;\n @ViewChild('filtermenu') filterMenu: ElementRef;\n\n @Input() field: Field = null;\n private selected = false;\n private expanded = false;\n private selector_panel_id = 'selector-panel-';\n private regexValue = '';\n Filters = [\n { name: ['Trim'], checked: true },\n { name: ['Normal', 'UPPERCASE', 'lowercase', 'Capitalize']},\n { name: ['Concatinate'], checked: false }\n ];\n FieldAttrs = [\n ['src', 'alt'],\n ['text'],\n ['href', 'text']\n ]\n/*\n link_extractors: Array> = [\n [\n {name: 'src', extractor: {type: 'attr', params: {attr: 'src', includeIfEmpty: false}, fieldMapValue: 0}},\n {name: 'alt', extractor: {type: 'attr', params: {attr: 'alt', includeIfEmpty: false}, fieldMapValue: 0}}\n ],\n [\n // {name: 'text', extractor: {type: 'text', params: {includeIfEmpty: false}, fieldMapValue: 1}},\n {name: 'regex', extractor: {type: 'regex', params: {regexp: '', includeIfEmpty: false}, fieldMapValue: 1}}\n ],\n [\n {name: 'text', extractor: {type: 'text', params: {includeIfEmpty: false}, fieldMapValue: 1}},\n {name: 'href', extractor: {type: 'attr', params: {attr: 'href', includeIfEmpty: false}, fieldMapValue: 1}}\n ]\n ];\n*/\n constructor(private _selectorService: SelectorService, private viewService: ViewService) {\n }\n\n onCSSSelectorChange() {\n // this.cssChanged.emit();\n this._selectorService.setSelectorPath(this.field);\n }\n\n ngOnInit() {\n this.selector_panel_id += this.fieldID;\n let regexIndex = this.field.filterIndex('regex');\n if (regexIndex !== -1) {\n this.regexValue = this.field.filters[regexIndex].param;\n }\n }\n\n updateExtractor(event) {\n // this.selector.extractor = event;\n }\n\n addDetails() {\n if (this.field.details == null) {\n let url: string = this._selectorService.getElemAttr(this.field.selector, 'href');\n if (url.search('^http(s)?') === -1) {\n let base = this._selectorService.getElemAttr('base', 'href');\n url = this._selectorService.absolute(base, url);\n }\n if (url.length > 0) {\n this.field.details = new Collection(this.field.name + 'details',\n {'url': url, 'userToken': '', 'type': '', actions: [], proxy: ''},\n []);\n }\n }\n this.addDetailsEvent.emit(this.field.details);\n }\n\n onDelete() {\n this.deleteSelector.emit(this.fieldID)\n }\n\n ngAfterViewInit() {\n let filterStream = fromEvent(this.filterMenu.nativeElement, 'click').subscribe(\n e => this.fillExtractorfilter());\n }\n\n fillExtractorfilter() {\n this.field.filters = [];\n let self = this;\n $('#filters_' + this.fieldID + '>li>input').each(function() {\n if ($(this).prop('checked') === true && $(this).attr('value') !== 'normal') {\n let filterName = $(this).attr('value');\n self.field.filters.push(new Filter(filterName, (filterName === 'regex') ? self.regexValue : ''));\n }\n });\n }\n\n onRegexChange() {\n if (this.regexValue === '') {\n return;\n }\n let regexIndex = this.field.filterIndex('regex');\n if (regexIndex !== -1) {\n this.field.filters[regexIndex].param = this.regexValue;\n } else {\n this.field.filters.push(new Filter('regex', this.regexValue));\n }\n this._selectorService.setSelectorPath(this.field);\n }\n\n onclickExtractor(attrName: string, add: boolean) {\n if (this.field.type === Type.Text) {\n return;\n }\n try {\n if (attrName === 'path' && add) {\n this.pathSelected.emit(true);\n } else {\n this.pathSelected.emit(false);\n }\n this.field.updateAttrs(attrName, add);\n\n } catch (e) {\n this.viewService.errorAlert((e).message);\n }\n\n /* let self = this;\n this.selector.extractor.type = '';\n $('#extractor_' + this.selector_id + '>label>input').each(function() {\n if ($(this).prop('checked') && self.selector.type !== Type.Text) {\n if (this.selector.extractor.type === '') {\n if ($(this).attr('value') === 'text') {\n self.selector.extractor.type = $(this).attr('value');\n } else {\n self.selector.extractor.type = 'attr';\n self.selector.extractor.params = {attr: $(this).attr('value'), includeIfEmpty: false}\n }\n } else {\n if (self.selector.type = Type.Image) {\n self.selector.extractor.type = 'image';\n } else {\n self.selector.extractor.type = 'link';\n }\n }\n } else {\n if ($(this).prop('checked')) {\n self.selector.extractor.type = 'regex';\n }\n }\n });\n console.log(this.selector.extractor);*/\n }\n\n toggleType() {\n this.field.toggleType();\n }\n}\n","module.exports = \"
\\n
\\n {{field.count}}\\n \\n \\n \\n
\\n
\\n
\\n \\n
\\n \\n \\n \\n \\n \\n
\\n
\\n
\\n \\n
\\n
0\\\"\\n class=\\\"btn-group btn-group-xs attrs\\\" id=\\\"attrs_{{fieldID}}\\\">\\n \\n
\\n Filters\\n
    \\n \\n
  • \\n 1?'radio':'checkbox'\\\" value=\\\"{{name}}\\\" id=\\\"{{name}}+{{fieldID}}\\\"\\n [name]=\\\"filter.name.length > 1?'radio':''\\\" [checked]=\\\"filter.checked || (i==0 && filter.name.length > 1)\\\"/>\\n \\n
  • \\n
    \\n \\n
  • \\n \\n \\n
  • \\n \\n
    \\n
\\n
\\n \\n \\n \\n \\n \\n
\\n
\"","module.exports = \"/*.item{\\n border: 1px solid cornflowerblue;\\n}*/\\n/*.details{\\n border-top: 1px solid cornflowerblue;\\n}\\n\\n.widget-body{\\n min-height: 50px;\\n}*/\\n/*button{\\n display: none;\\n position: relative;\\n font-size: 0.9em;\\n}*/\\n/*.panel:hover button {\\n display: block;\\n}*/\\n.addDetails {\\n cursor: pointer;\\n margin-left: 5px;\\n margin-top: 2px;\\n float: left; }\\n\\n/*div.count{\\n margin-top: 3px;\\n}*/\\n.selected > button {\\n display: block; }\\n\\n/*span, inplace-edit{\\n font-family: 'Oswald', 'Trebuchet MS', 'Open Sans', arial, sans-serif;\\n}*/\\n.row:hover button {\\n display: block; }\\n\\n.selector-item {\\n margin-bottom: 5px; }\\n\\n.panel {\\n margin: 0px !important; }\\n\\n.panel-heading {\\n padding: 0px !important; }\\n\\n.title {\\n margin-left: 15px; }\\n\\n.btn-container {\\n float: right; }\\n\\n.right {\\n float: right; }\\n\\n.attrs {\\n margin-left: 15px;\\n float: left; }\\n\\n.type {\\n border-bottom: dashed 1px;\\n color: #337ab7;\\n cursor: pointer;\\n padding-left: 6px;\\n position: absolute;\\n left: 100px; }\\n\\n.selector-name-block {\\n padding-left: 0px;\\n padding-right: 10px; }\\n\\n.selector-css-block {\\n padding-left: 0px;\\n padding-right: 0px; }\\n\\n.selector-count-block {\\n min-width: 45px; }\\n\\n.selector-count {\\n border-top-left-radius: 5px;\\n border-bottom-left-radius: 5px;\\n background: #435f76;\\n padding-left: 5px;\\n padding-right: 5px;\\n color: white;\\n /* width: 100%; */\\n position: relative;\\n min-width: 35px;\\n float: left;\\n margin-left: 15px; }\\n\\n.selector-count:after {\\n content: \\\"\\\";\\n background: transparent;\\n position: absolute;\\n z-index: 100;\\n right: -10px;\\n top: 0px;\\n margin: 0;\\n border-top: 9px solid transparent;\\n border-left: 10px solid #435f76;\\n border-bottom: 9px solid transparent; }\\n\\n.selector-btn {\\n border: none;\\n width: 100%;\\n background: #435f76;\\n position: absolute;\\n color: white;\\n border-top-right-radius: 5px;\\n border-bottom-right-radius: 5px; }\\n\\n.selector-btn > a {\\n color: white; }\\n\\n.selector-btn:before {\\n content: \\\"\\\";\\n background: transparent;\\n position: absolute;\\n z-index: 100;\\n left: 0px;\\n top: 1px;\\n margin: 0;\\n border-top: 9px solid transparent;\\n border-left: 10px solid #f4f4f4;\\n border-bottom: 9px solid transparent; }\\n\\n.toggle-btn.active {\\n background-color: #435f76;\\n color: white; }\\n\\n.toggle-btn {\\n background-color: transparent;\\n color: #435f76; }\\n\\n.toggle-btn:hover {\\n background-color: initial;\\n border-color: red;\\n color: #d74b4b; }\\n\\n.expand-collapse {\\n position: relative;\\n float: right;\\n right: 6px; }\\n\\n.toggle-btn.active:hover {\\n background-color: red; }\\n\\n.dropdown-menu > li > a > input {\\n width: unset;\\n position: relative;\\n top: 2px; }\\n\\n.item-box > div {\\n float: left;\\n position: relative;\\n left: 10px;\\n min-width: 65px; }\\n\\n.collapse-border {\\n border-bottom: .5px solid lightgrey;\\n margin-bottom: 5px; }\\n\\n.separator {\\n border-bottom: .5px solid lightgrey; }\\n\\n.selector-type {\\n float: left;\\n position: relative;\\n top: 3px;\\n color: #3a5266;\\n cursor: pointer; }\\n\\n.selector-type + h6 {\\n float: left;\\n margin-left: 55px;\\n position: absolute;\\n top: -2px; }\\n\\n.item-box label {\\n float: left; }\\n\\n.attrs {\\n margin-left: -10px; }\\n\"","import { Component, Input, forwardRef } from '@angular/core'\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\n\nconst noop = () => {\n};\n\nexport const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InplaceEditComponent),\n multi: true\n};\n\n@Component({\n selector: 'inplace-edit',\n template: require('./inplace-edit.html'),\n styles: [require('./inplace-edit.scss')],\n providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR]\n})\n\nexport class InplaceEditComponent implements ControlValueAccessor {\n\n private edit_mode = false;\n\n // The internal data model\n private innerValue: any = '';\n\n // Placeholders for the callbacks which are later providesd\n // by the Control Value Accessor\n private onTouchedCallback: () => void = noop;\n private onChangeCallback: (_: any) => void = noop;\n\n // get accessor\n get value(): any {\n return this.innerValue;\n };\n\n // set accessor including call the onchange callback\n set value(v: any) {\n if (v !== this.innerValue) {\n this.innerValue = v;\n this.onChangeCallback(v);\n }\n }\n\n // From ControlValueAccessor interface\n writeValue(value: any) {\n if (value !== this.innerValue) {\n this.innerValue = value;\n }\n }\n\n // From ControlValueAccessor interface\n registerOnChange(fn: any) {\n this.onChangeCallback = fn;\n }\n\n // From ControlValueAccessor interface\n registerOnTouched(fn: any) {\n this.onTouchedCallback = fn;\n }\n\n onDblClick() {\n this.edit_mode = true;\n }\n\n // Set touched on blur\n onBlur() {\n this.edit_mode = false;\n this.onTouchedCallback();\n // this.change.emit(\"{'value':this.text}\");\n }\n\n onKeyDown(event) {\n if (event.which === 13) {\n this.edit_mode = false;\n event.preventDefault();\n this.onTouchedCallback();\n // this.change.emit(\"{'value':this.text}\");\n }\n\n if (event.which === 27) {\n// scope.newValue = scope.value;\n this.edit_mode = false;\n event.preventDefault();\n this.onTouchedCallback();\n // this.change.emit(\"{'value':this.text}\");\n }\n }\n}\n","module.exports = \"\\n\"","module.exports = \"input {\\n width: 100%;\\n padding-left: 5px;\\n background: transparent; }\\n\\ninput:read-only {\\n border: none;\\n cursor: pointer; }\\n\\ninput:hover {\\n color: red; }\\n\\nbutton {\\n display: none; }\\n\\ndiv.row:hover button {\\n display: block; }\\n\\n.input-wrapper {\\n position: relative;\\n margin-left: 0px;\\n background: #435f76; }\\n\\n.input-wrapper:before {\\n content: \\\"\\\";\\n background: transparent;\\n position: absolute;\\n z-index: 100;\\n left: 0px;\\n top: 1px;\\n margin: 0;\\n border-top: 9px solid transparent;\\n border-left: 10px solid #f4f4f4;\\n border-bottom: 9px solid transparent; }\\n\\n.input-wrapper:after {\\n content: \\\"\\\";\\n background: transparent;\\n position: absolute;\\n z-index: 100;\\n left: 100%;\\n top: 0px;\\n margin: 0;\\n border-top: 10px solid transparent;\\n border-left: 10px solid #435f76;\\n border-bottom: 10px solid transparent; }\\n\\n:host.disabled {\\n pointer-events: none;\\n opacity: 0.4; }\\n\"","import { Component, OnInit, OnDestroy} from '@angular/core'\nimport { trigger, state, transition, style, animate } from '@angular/animations'\nimport { ViewService } from '../shared';\nimport { Subscription } from 'rxjs';\nimport { AlertMessage } from '../model/alert-message';\nimport { fade, popUp } from '../shared/animations'\n\n@Component({\n selector: 'alert',\n template: require('./alert.component.html'),\n styles: [require('./alert.component.scss')],\n animations: [fade, popUp]\n})\n\nexport class AlertComponent implements OnInit, OnDestroy {\n\n private show = false;\n private alert: AlertMessage;\n private subscription: Subscription = null;\n\n constructor(private viewService: ViewService) {}\n\n get stateName() {\n return this.show ? 'show' : 'hide';\n }\n\n private toggle() {\n this.show = !this.show;\n }\n\n update(alert: AlertMessage) {\n this.alert = alert;\n if (!this.show && alert.text !== '') {\n this.toggle();\n }\n }\n\n ngOnInit() {\n this.subscription = this.viewService.getMessage().subscribe((a) => {\n this.update(a);\n });\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n}\n","module.exports = \"
\\n {{alert?.header}}\\n  {{alert?.text}}\\n \\n
\"","module.exports = \"\"","import { Component, OnInit, OnDestroy } from '@angular/core'\nimport { Subscription } from 'rxjs'\nimport { ViewService } from '../../shared/view.service'\nimport { fade, popUp } from '../../shared/animations'\n\n@Component({\n selector: 'result-info',\n template: require('./result-info.component.html'),\n styles: [require('./result-info.component.scss')],\n animations: [fade, popUp]\n})\n\nexport class ResultInfoComponent implements OnDestroy, OnInit {\n private show = false;\n private resultInfo: Object = null;\n private subscription: Subscription = null;\n constructor(private _viewService: ViewService) {}\n\n ngOnInit() {\n this.subscription = this._viewService.getResult().subscribe(info => this.update(info));\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n get stateName() {\n return this.show ? 'show' : 'hide';\n }\n\n update(info: Object) {\n if (!this.show) {\n this.toggle();\n }\n this.resultInfo = info;\n }\n\n private toggle(): void {\n this.show = !this.show;\n }\n}\n","module.exports = \"
\\n \\n Requests: {{resultInfo?.requestCount}}\\n Responses: {{resultInfo?.responseCount}}\\n Elapsed: {{(resultInfo?.endTime - resultInfo?.startTime)*1000 | date:'mm:ss'}}\\n
\"","module.exports = \"#result-info span {\\n display: block; }\\n\"","import { Component, Input, Output, EventEmitter } from '@angular/core'\nimport { Subscription } from 'rxjs';\nimport { slideDown } from '../../shared/animations'\n\n@Component({\n selector: 'busy-indicator',\n template: require('./busy-indicator.component.html'),\n styles: [require('./busy-indicator.component.scss')],\n animations: [slideDown]\n})\n\nexport class BusyIndicatorComponent {\n @Input() busy: Subscription;\n @Input() message = 'Please wait...';\n @Input() withCancel = true;\n @Output() cancel = new EventEmitter();\n constructor() {}\n}\n","module.exports = \"
\\n
\\n

{{message}}

\\n
\\n
\\n\\n\"","module.exports = \".busy {\\n border: 1px solid lightgray;\\n width: 300px;\\n text-align: center;\\n position: absolute;\\n left: 35%;\\n background: white;\\n border-top: 0px;\\n border-bottom-left-radius: 5px;\\n border-bottom-right-radius: 5px;\\n top: 39px;\\n z-index: 555; }\\n\\n.busy p {\\n font-size: 16px;\\n margin: 6px 0 0 6px; }\\n\\n.busy button {\\n margin-top: 1px; }\\n\\n.busy i {\\n font-size: 32px;\\n color: #d74b4b;\\n cursor: pointer; }\\n\\n.lds-dual-ring {\\n display: inline-block;\\n width: 40px;\\n height: 40px; }\\n\\n.lds-dual-ring:after {\\n content: \\\" \\\";\\n display: block;\\n width: 36px;\\n height: 36px;\\n margin: 1px;\\n border-radius: 50%;\\n border: 10px solid #000;\\n border-color: #d74b4b transparent #435f76 transparent;\\n animation: lds-dual-ring 1s linear infinite; }\\n\\n@keyframes lds-dual-ring {\\n 0% {\\n transform: rotate(0deg); }\\n 100% {\\n transform: rotate(360deg); } }\\n\"","import { state, style, trigger, animate, transition } from '@angular/animations'\n\nexport let slideRight = trigger('slideRight', [\n state('void', style({opacity: 0, transform: 'translateX(-100%) rotateX(180deg)'})),\n transition('void => *', [\n animate(700)\n ])\n]);\n\nexport let slideUp = trigger('slideUp', [\n state('void', style({opacity: 0, transform: 'translateY(200%)'})),\n transition('void => *', [\n animate(700)\n ])\n]);\n\nexport let slideDown = trigger('slideDown', [\n state('void', style({opacity: 0, transform: 'translateY(-50%)'})),\n transition('void => *', [\n animate(200)\n ])\n])\n\n\nexport let fade = trigger('fade', [\n state('void', style({opacity: 0})),\n transition(':enter', [\n animate(2000)\n ])\n]);\n\nexport let popUp = trigger('popUp', [\n state('show', style({display: 'block', opacity: 1})),\n state('hide', style({display: 'none', opacity: 0})),\n transition('hide => show', [\n animate('600ms ease-in')\n ]),\n transition('show => hide', [\n animate('600ms ease-out')\n ])\n]);\n","module.exports = \"@charset \\\"UTF-8\\\";\\n.main-container {\\n min-width: 480px; }\\n\\n.copyright {\\n text-align: center;\\n position: fixed;\\n bottom: 0px;\\n background-color: #2b3d4c;\\n color: white;\\n width: 100%;\\n /* height: 35px; */ }\\n\\n.tltip::after {\\n z-index: 5556;\\n background: #404040;\\n border-radius: 8px 8px 8px 0px;\\n box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);\\n color: #FFF;\\n content: attr(data-tooltip);\\n /* Главная часть кода, определяющая содержимое всплывающей подсказки */\\n margin-top: -24px;\\n padding: 3px 7px;\\n position: absolute;\\n display: none;\\n transition: all 0.4s ease-in-out;\\n /* Добавить плавности по вкусу */\\n font-size: 10pt;\\n font-family: 'Trebuchet MS', 'Open Sans', arial, sans-serif;\\n white-space: nowrap; }\\n\\n.tltip:hover::after {\\n display: block;\\n left: 25px;\\n top: -3px; }\\n\\n.disabledall button:not(#import), .disabledall h4,\\n.disabledall span, .disabledall h6, .disabledall input,\\n.disabledall li,\\n:host.disabledall ::ng-deep span,\\n:host.disabledall ::ng-deep button,\\n:host.disabledall ::ng-deep h6,\\n:host.disabledall ::ng-deep a,\\n:host.disabledall ::ng-deep input,\\n:host.disabledall ::ng-deep label,\\n:host.disabledall ::ng-deep i {\\n pointer-events: none;\\n opacity: 0.4; }\\n\\n:host.disabled ::ng-deep * {\\n pointer-events: none;\\n opacity: 0.8;\\n text-decoration: line-through; }\\n\""],"sourceRoot":""}