/* FW LINE 46:127318f30c1d */functionflatten(c){varb=newArray();for(vardinc){vare=c[d];if(einstanceofArray){b=b.concat(flatten(e))}else{b.push(e)}}returnb}varFW={_scrapers:newArray()};FW._Base=function(){this.callHook=function(b,c,e,a){if(typeofthis["hooks"]==="object"){vard=this["hooks"][b];if(typeofd==="function"){d(c,e,a)}}};this.evaluateThing=function(f,e,c){varb=typeoff;if(b==="string"){returnf}else{if(b==="object"){if(finstanceofArray){vard=this.evaluateThing;vara=f.map(function(g){returnd(g,e,c)});returnflatten(a)}else{returnf.evaluate(e,c)}}else{if(b==="function"){returnf(e,c)}else{returnundefined}}}}};FW.Scraper=function(a){FW._scrapers.push(newFW._Scraper(a))};FW._Scraper=function(a){for(xina){this[x]=a[x]}this._singleFieldNames=["abstractNote","applicationNumber","archive","archiveLocation","artworkMedium","artworkSize","assignee","audioFileType","audioRecordingType","billNumber","blogTitle","bookTitle","callNumber","caseName","code","codeNumber","codePages","codeVolume","committee","company","conferenceName","country","court","date","dateDecided","dateEnacted","dictionaryTitle","distributor","docketNumber","documentNumber","DOI","edition","encyclopediaTitle","episodeNumber","extra","filingDate","firstPage","forumTitle","genre","history","institution","interviewMedium","ISBN","ISSN","issue","issueDate","issuingAuthority","journalAbbreviation","label","language","legalStatus","legislativeBody","letterType","libraryCatalog","manuscriptType","mapType","medium","meetingName","nameOfAct","network","number","numberOfVolumes","numPages","pages","patentNumber","place","postType","presentationType","priorityNumbers","proceedingsTitle","programTitle","programmingLanguage","publicLawNumber","publicationTitle","publisher","references","reportNumber","reportType","reporter","reporterVolume","rights","runningTime","scale","section","series","seriesNumber","seriesText","seriesTitle","session","shortTitle","studio","subject","system","thesisType","title","type","university","url","version","videoRecordingType","volume","websiteTitle","websiteType"];this._makeAttachments=function(q,b,f,s){if(finstanceofArray){f.forEach(function(k){this._makeAttachments(q,b,k,s)},this)}else{if(typeoff==="object"){varp=f.urls||f.url;varm=f.types||f.type;vare=f.titles||f.title;varh=this.evaluateThing(p,q,b);varo=this.evaluateThing(e,q,b);varr=this.evaluateThing(m,q,b);varl=(rinstanceofArray);varn=(oinstanceofArray);if(!(hinstanceofArray)){h=[h]}for(varjinh){varc=h[j];varg;vard;if(l){g=r[j]}else{g=r}if(n){d=o[j]}else{d=o}s.attachments.push({url:c,title:d,type:g})}}}};this.makeItems=function(o,b,m,c,l){varq=newZotero.Item(this.itemType);q.url=b;for(varhinthis._singleFieldNames){varn=this._singleFieldNames[h];if(this[n]){varg=this.evaluateThing(this[n],o,b);if(ginstanceofArray){q[n]=g[0]}else{q[n]=g}}}varr=["creators","tags"];for(varfinr){varp=r[f];vard=this.evaluateThing(this[p],o,b);if(d){for(vareind){q[p].push(d[e])}}}this._makeAttachments(o,b,this["attachments"],q);c(q,this,o,b);l([q])}};FW._Scraper.prototype=newFW._Base;FW.MultiScraper=function(a){FW._scrapers.push(newFW._MultiScraper(a))};FW._MultiScraper=function(a){for(xina){this[x]=a[x]}this._mkSelectItems=function(e,d){varb=newObject;for(varcine){b[d[c]]=e[c]}returnb};this._selectItems=function(d,c,e){varb=newArray();Zotero.selectItems(this._mkSelectItems(d,c),function(f){for(varginf){b.push(g)}e(b)})};this._mkAttachments=function(g,d,f){varb=this.evaluateThing(this["attachments"],g,d);varc=newObject();if(b){for(vareinf){c[f[e]]=b[e]}}returnc};this._makeChoices=function(f,p,c,d,h){if(finstanceofArray){f.forEach(function(k){this._makeTitlesUrls(k,p,c,d,h)},this)}else{if(typeoff==="object"){varm=f.urls||f.url;vare=f.titles||f.title;varn=this.evaluateThing(m,p,c);varj=this.evaluateThing(e,p,c);varl=(jinstanceofArray);if(!(ninstanceofArray)){n=[n]}for(varginn){varb=n[g];varo;if(l){o=j[g]}else{o=j}h.push(b);d.push(o)}}}};this.makeItems=function(j,b,g,c,f){Zotero.debug("EnteringMultiS